diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..a10698a --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,7 @@ +echo "[pre-commit] Running OpenAPI TypeScript generation…" +yarn openapi-ts + +echo "[pre-commit] Staging generated files (src/generated, src/schema/sonarqube-all.yaml)…" +git add src/generated src/schema/sonarqube-all.yaml + +echo "[pre-commit] Done." diff --git a/package.json b/package.json index 2e55599..d2f4612 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "types": "dist/index.d.ts" }, "scripts": { + "prepare": "husky", "test": "NODE_ENV=test jest", "test:watch": "NODE_ENV=test jest --watch", "lint": "yarn eslint src", @@ -28,6 +29,7 @@ "@types/jest": "^30.0.0", "@types/node": "^24.10.1", "eslint": "^9.36.0", + "husky": "^9.1.7", "jest": "^30.2.0", "msw": "^2.11.2", "openapi-merge-cli": "^1.3.2", diff --git a/src/generated/schemas.gen.ts b/src/generated/schemas.gen.ts index b1b9721..2fec593 100644 --- a/src/generated/schemas.gen.ts +++ b/src/generated/schemas.gen.ts @@ -5,13 +5,14 @@ export const UserCreateRestRequestSchema = { properties: { email: { type: 'string', + format: 'email', description: 'User email', maxLength: 100, minLength: 1, }, local: { type: 'boolean', - default: 'true', + default: true, description: 'Specify if the user should be authenticated from SonarQube server or from an external authentication system. Password should not be set when local is set to false.', }, @@ -101,10 +102,12 @@ export const EmailConfigurationCreateRestRequestSchema = { host: { type: 'string', description: 'URL of your SMTP server', + minLength: 1, }, port: { type: 'string', description: 'Port of your SMTP server (usually 25, 587 or 465)', + minLength: 1, }, securityProtocol: { type: 'string', @@ -115,15 +118,18 @@ export const EmailConfigurationCreateRestRequestSchema = { fromAddress: { type: 'string', description: 'Address emails will come from', + minLength: 1, }, fromName: { type: 'string', description: 'Name emails will come from (usually "SonarQube")', + minLength: 1, }, subjectPrefix: { type: 'string', description: 'Prefix added to email so they can be easily recognized (usually "[SonarQube]")', + minLength: 1, }, authMethod: { type: 'string', @@ -135,6 +141,7 @@ export const EmailConfigurationCreateRestRequestSchema = { type: 'string', description: 'For Basic and OAuth authentication: username used to authenticate to the SMTP server', + minLength: 1, }, oauthAuthenticationHost: { type: 'string', @@ -229,72 +236,955 @@ export const EmailConfigurationResourceSchema = { }, } as const; -export const AwarenessBannerClickedRequestSchema = { +export const LicenseProfilesCreateRestRequestSchema = { type: 'object', properties: { - bannerType: { + name: { type: 'string', - enum: ['ENABLE', 'LEARN_MORE'], + description: 'The name of the license policy', + }, + default: { + type: 'boolean', + description: 'Whether this license policy is the default or not', }, }, + required: ['name'], } as const; -export const AwarenessBannerClickedResponseSchema = { +export const LicenseProfileResourceSchema = { type: 'object', properties: { id: { type: 'string', - readOnly: true, + }, + name: { + type: 'string', + }, + default: { + type: 'boolean', + }, + actions: { + $ref: '#/components/schemas/LicenseProfileSingleActions', + }, + updatedAt: { + type: 'string', }, }, } as const; -export const FixSuggestionPostRequestSchema = { +export const LicenseProfileSingleActionsSchema = { type: 'object', properties: { - issueId: { + edit: { + type: 'boolean', + }, + setAsDefault: { + type: 'boolean', + }, + associateProjects: { + type: 'boolean', + }, + delete: { + type: 'boolean', + }, + }, +} as const; + +export const UpdateAssigneeRestRequestSchema = { + type: 'object', + properties: { + issueReleaseKey: { type: 'string', - description: 'Issue key', + description: 'Issue release key', + }, + assigneeLogin: { + type: 'string', + description: 'Assignee login', }, }, - required: ['issueId'], + required: ['issueReleaseKey'], } as const; -export const ChangeDtoSchema = { +export const AffectedPackageResourceSchema = { type: 'object', properties: { - startLine: { - type: 'integer', - format: 'int32', + purl: { + type: 'string', }, - endLine: { + recommendation: { + type: 'string', + description: "The maintainer's overall recommendation, if available", + enum: ['ignore', 'upgrade', 'upgrade_or_workaround'], + }, + recommendationDetails: { + $ref: '#/components/schemas/VulnerabilityRecommendationDetailsResource', + }, + versionOptions: { + type: 'array', + items: { + $ref: '#/components/schemas/VersionOptionResource', + }, + }, + affectedVersions: { + type: 'array', + items: { + type: 'string', + }, + }, + unaffectedVersions: { + type: 'string', + }, + }, +} as const; + +export const IssueReleaseBranchResourceSchema = { + type: 'object', + properties: { + uuid: { + type: 'string', + }, + key: { + type: 'string', + }, + pullRequest: { + type: 'boolean', + }, + projectKey: { + type: 'string', + }, + projectName: { + type: 'string', + }, + legacyProjectUuid: { + type: 'string', + }, + organizationUuid: { + type: 'string', + format: 'uuid', + }, + }, +} as const; + +export const IssueReleaseDetailsResourceSchema = { + type: 'object', + properties: { + key: { + type: 'string', + }, + severity: { + type: 'string', + }, + originalSeverity: { + type: 'string', + }, + manualSeverity: { + type: 'string', + }, + showIncreasedSeverityWarning: { + type: 'boolean', + }, + release: { + $ref: '#/components/schemas/ReleaseSearchResource', + }, + type: { + type: 'string', + enum: ['VULNERABILITY', 'PROHIBITED_LICENSE'], + }, + quality: { + type: 'string', + enum: ['MAINTAINABILITY', 'RELIABILITY', 'SECURITY'], + }, + status: { + type: 'string', + }, + createdAt: { + type: 'string', + }, + assignee: { + $ref: '#/components/schemas/UserResource', + }, + commentCount: { type: 'integer', format: 'int32', }, - newCode: { + vulnerability: { + $ref: '#/components/schemas/VulnerabilityResource', + }, + spdxLicenseId: { type: 'string', }, + transitions: { + type: 'array', + items: { + type: 'string', + enum: ['CONFIRM', 'REOPEN', 'SAFE', 'FIXED', 'ACCEPT'], + }, + }, + actions: { + type: 'array', + items: { + type: 'string', + enum: ['COMMENT', 'ASSIGN', 'SET_SEVERITY'], + }, + uniqueItems: true, + }, + branch: { + $ref: '#/components/schemas/IssueReleaseBranchResource', + }, }, } as const; -export const FixSuggestionResponseSchema = { +export const ReleaseSearchResourceSchema = { type: 'object', properties: { - id: { + key: { + type: 'string', + }, + branchUuid: { + type: 'string', + }, + packageUrl: { + type: 'string', + }, + packageManager: { + type: 'string', + }, + packageName: { + type: 'string', + }, + version: { + type: 'string', + }, + licenseExpression: { + type: 'string', + }, + known: { + type: 'boolean', + }, + knownPackage: { + type: 'boolean', + }, + newlyIntroduced: { + type: 'boolean', + }, + directSummary: { + type: 'boolean', + }, + scopeSummary: { + type: 'string', + }, + productionScopeSummary: { + type: 'boolean', + }, + dependencyFilePaths: { + type: 'array', + items: { + type: 'string', + }, + }, + }, +} as const; + +export const UserResourceSchema = { + type: 'object', + properties: { + login: { + type: 'string', + }, + name: { + type: 'string', + }, + avatar: { + type: 'string', + }, + active: { + type: 'boolean', + }, + }, +} as const; + +export const VersionOptionResourceSchema = { + type: 'object', + properties: { + version: { + type: 'string', + description: 'The version being presented as an option', + }, + vulnerabilityIds: { + type: 'array', + description: 'Vulnerability IDs affecting this version', + items: { + type: 'string', + }, + }, + prerelease: { + type: 'boolean', + description: 'Is this version a pre-release version', + }, + fixLevel: { + type: 'string', + description: 'Describes which vulnerabilities are fixed', + enum: ['COMPLETE', 'PARTIAL', 'NONE', 'UNKNOWN'], + }, + descriptionCode: { + type: 'string', + description: 'How the frontend should label this version', + enum: [ + 'VERSION_IN_USE', + 'NEAREST_PARTIAL', + 'NEAREST_COMPLETE', + 'LATEST_PARTIAL', + 'LATEST_COMPLETE', + 'LATEST_STABLE', + 'LATEST_PRERELEASE', + 'UNKNOWN', + ], + }, + }, +} as const; + +export const VulnerabilityRecommendationDetailsResourceSchema = { + type: 'object', + properties: { + impactScore: { + type: 'integer', + format: 'int32', + }, + impactDescription: { + type: 'string', + }, + realIssue: { + type: 'boolean', + }, + falsePositiveReason: { + type: 'string', + }, + includesDev: { + type: 'boolean', + }, + specificMethodsAffected: { + type: 'boolean', + }, + specificMethodsDescription: { + type: 'string', + }, + otherConditions: { + type: 'boolean', + }, + otherConditionsDescription: { + type: 'string', + }, + workaroundAvailable: { + type: 'boolean', + }, + workaroundDescription: { + type: 'string', + }, + visibility: { + type: 'string', + }, + }, +} as const; + +export const VulnerabilityReportResourceSchema = { + type: 'object', + properties: { + id: { + type: 'string', + }, + url: { + type: 'string', + }, + type: { + type: 'string', + }, + cvssScore: { + type: 'string', + }, + cvssSeverity: { + type: 'string', + }, + withdrawnAt: { + type: 'string', + }, + }, +} as const; + +export const VulnerabilityResourceSchema = { + type: 'object', + properties: { + vulnerabilityId: { + type: 'string', + }, + reports: { + type: 'array', + items: { + $ref: '#/components/schemas/VulnerabilityReportResource', + }, + }, + description: { + type: 'string', + }, + epssPercentile: { + type: 'string', + }, + epssProbability: { + type: 'string', + }, + knownExploited: { + type: 'boolean', + }, + cweIds: { + type: 'array', + items: { + type: 'string', + }, + }, + publishedOn: { + type: 'string', + }, + affectedPackages: { + type: 'array', + items: { + $ref: '#/components/schemas/AffectedPackageResource', + }, + }, + withdrawn: { + type: 'boolean', + }, + }, +} as const; + +export const IssueReleaseSetSeverityRestRequestSchema = { + type: 'object', + properties: { + issueReleaseKey: { + type: 'string', + description: 'Issue release key', + }, + quality: { + type: 'string', + description: 'Software Quality', + enum: ['MAINTAINABILITY', 'RELIABILITY', 'SECURITY'], + }, + severity: { + type: 'string', + description: 'Severity', + enum: ['INFO', 'LOW', 'MEDIUM', 'HIGH', 'BLOCKER'], + }, + }, + required: ['issueReleaseKey', 'quality', 'severity'], +} as const; + +export const IssueReleaseClearSeverityWarningRestRequestSchema = { + type: 'object', + properties: { + issueReleaseKey: { + type: 'string', + description: 'Issue release key', + }, + }, + required: ['issueReleaseKey'], +} as const; + +export const IssueReleaseStatusTransitionRequestSchema = { + type: 'object', + properties: { + issueReleaseKey: { + type: 'string', + description: 'Issue release key', + }, + transitionKey: { + type: 'string', + description: 'Transition key', + enum: ['CONFIRM', 'REOPEN', 'SAFE', 'FIXED', 'ACCEPT'], + }, + comment: { + type: 'string', + description: 'Transition comment', + }, + }, + required: ['issueReleaseKey', 'transitionKey'], +} as const; + +export const IssueReleaseAddCommentRestRequestSchema = { + type: 'object', + properties: { + issueReleaseKey: { + type: 'string', + description: 'Issue release key', + }, + comment: { + type: 'string', + description: 'comment', + }, + }, + required: ['issueReleaseKey'], +} as const; + +export const AzureBillingRestResponseSchema = { + type: 'object', + properties: { + success: { + type: 'boolean', + }, + message: { + type: 'string', + }, + }, +} as const; + +export const PostJiraWorkItemRequestResourceSchema = { + type: 'object', + properties: { + resourceId: { + type: 'string', + description: 'Resource identifier', + minLength: 1, + writeOnly: true, + }, + resourceType: { + type: 'string', + description: 'Resource type', + enum: ['SONAR_ISSUE', 'DEPENDENCY_RISK'], + writeOnly: true, + }, + sonarProjectId: { + type: 'string', + description: 'Sonar project identifier', + minLength: 1, + writeOnly: true, + }, + workTypeId: { + type: 'string', + description: 'Work type identifier', + minLength: 1, + writeOnly: true, + }, + summary: { + type: 'string', + description: 'Work item summary', + minLength: 1, + writeOnly: true, + }, + description: { + type: 'string', + description: 'Work item description', + minLength: 1, + writeOnly: true, + }, + }, + required: [ + 'description', + 'resourceId', + 'resourceType', + 'sonarProjectId', + 'summary', + 'workTypeId', + ], +} as const; + +export const JiraWorkItemResourceSchema = { + type: 'object', + properties: { + id: { + type: 'string', + description: 'Work item identifier', + readOnly: true, + }, + jiraIssueId: { + type: 'string', + description: 'Jira issue identifier', + readOnly: true, + }, + jiraIssueKey: { + type: 'string', + description: 'Jira issue key', + readOnly: true, + }, + jiraIssueUrl: { + type: 'string', + description: 'Jira issue URL', + readOnly: true, + }, + jiraIssueStatus: { + type: 'string', + description: 'Jira issue status', + readOnly: true, + }, + }, +} as const; + +export const PostJiraProjectBindingRequestResourceSchema = { + type: 'object', + properties: { + sonarProjectId: { + type: 'string', + description: 'Sonar project identifier', + minLength: 1, + writeOnly: true, + }, + jiraOrganizationId: { + type: 'string', + description: 'Jira instance binding identifier', + writeOnly: true, + }, + jiraProjectKey: { + type: 'string', + description: 'Jira project key', + minLength: 1, + writeOnly: true, + }, + }, + required: ['jiraOrganizationId', 'jiraProjectKey', 'sonarProjectId'], +} as const; + +export const JiraProjectBindingResourceSchema = { + type: 'object', + properties: { + id: { + type: 'string', + format: 'uuid', + description: 'Jira project binding identifier', + readOnly: true, + }, + sonarProjectId: { + type: 'string', + description: 'Sonar project identifier', + readOnly: true, + }, + jiraOrganizationId: { + type: 'string', + description: 'Jira instance binding identifier', + readOnly: true, + }, + jiraProjectKey: { + type: 'string', + description: 'Jira project key', + readOnly: true, + }, + }, +} as const; + +export const PostJiraOrganizationBindingRequestResourceSchema = { + type: 'object', + properties: { + state: { + type: 'string', + description: 'Base64-encoded OAuth state parameter', + minLength: 1, + writeOnly: true, + }, + authorizationCode: { + type: 'string', + description: 'OAuth authorization code (no whitespace)', + minLength: 1, + writeOnly: true, + }, + }, + required: ['authorizationCode', 'state'], +} as const; + +export const JiraOrganizationBindingResourceSchema = { + type: 'object', + properties: { + id: { + type: 'string', + description: 'Jira instance binding identifier', + readOnly: true, + }, + sonarOrganizationUuid: { + type: 'string', + format: 'uuid', + description: 'Sonar organization UUID', + readOnly: true, + }, + jiraInstanceUrl: { + type: 'string', + description: 'Jira instance URL', + readOnly: true, + }, + createdBy: { + type: 'string', + description: 'User who created or reauthorized the jira connection', + readOnly: true, + }, + createdAt: { + type: 'integer', + format: 'int64', + description: 'Creation timestamp', + readOnly: true, + }, + isTokenShared: { + type: 'boolean', + description: 'TODO', + readOnly: true, + }, + }, +} as const; + +export const OAuthResourceSchema = { + type: 'object', + properties: { + cloudId: { + type: 'string', + description: "The resource's cloud ID", + readOnly: true, + }, + url: { + type: 'string', + description: "The resource's URL", + readOnly: true, + }, + }, +} as const; + +export const PostJiraOrganizationBindingResponseResourceSchema = { + type: 'object', + properties: { + binding: { + $ref: '#/components/schemas/JiraOrganizationBindingResource', + description: + 'The successfully created binding (present if binding was created)', + readOnly: true, + }, + resources: { + type: 'array', + description: 'Array of available resources to bind the instance to', + items: { + $ref: '#/components/schemas/OAuthResource', + }, + readOnly: true, + }, + }, + required: ['resources'], +} as const; + +export const UserBindingCreationRequestSchema = { + type: 'object', + description: 'User binding creation request', + properties: { + bindingData: { + $ref: '#/components/schemas/UserBindingCreationRequestBindingData', + }, + userId: { + type: 'string', + minLength: 1, + }, + }, + required: ['bindingData', 'userId'], +} as const; + +export const UserBindingCreationRequestBindingDataSchema = { + type: 'object', + properties: { + code: { + type: 'string', + minLength: 1, + }, + }, + required: ['code'], +} as const; + +export const UserBindingResponseSchema = { + type: 'object', + properties: { + id: { + type: 'string', + format: 'uuid', + }, + user_id: { + type: 'string', + }, + slack_user_id: { + type: 'string', + }, + slack_workspace_id: { + type: 'string', + }, + slack_workspace_name: { + type: 'string', + }, + created_at: { + type: 'integer', + format: 'int64', + }, + }, +} as const; + +export const IntegrationConfigurationPostRequestSchema = { + type: 'object', + properties: { + integrationType: { + type: 'string', + enum: ['SLACK'], + }, + clientId: { + type: 'string', + minLength: 1, + }, + clientSecret: { + type: 'string', + minLength: 1, + }, + signingSecret: { + type: 'string', + minLength: 1, + }, + }, + required: ['clientId', 'clientSecret', 'integrationType', 'signingSecret'], +} as const; + +export const IntegrationConfigurationResponseSchema = { + type: 'object', + properties: { + id: { + type: 'string', + format: 'uuid', + }, + integrationType: { + type: 'string', + enum: ['SLACK'], + }, + clientId: { + type: 'string', + }, + appId: { + type: 'string', + }, + }, +} as const; + +export const AwarenessBannerClickedRequestSchema = { + type: 'object', + properties: { + bannerType: { + type: 'string', + enum: ['ENABLE', 'LEARN_MORE'], + }, + }, +} as const; + +export const AwarenessBannerClickedResponseSchema = { + type: 'object', + properties: { + id: { + type: 'string', + readOnly: true, + }, + }, +} as const; + +export const FixSuggestionPostRequestSchema = { + type: 'object', + properties: { + projectKey: { + type: 'string', + }, + issueId: { + type: 'string', + description: 'Issue key', + }, + issue: { + $ref: '#/components/schemas/Issue', + description: 'Issue', + }, + }, +} as const; + +export const IssueSchema = { + type: 'object', + properties: { + message: { + type: 'string', + }, + startLine: { + type: 'integer', + format: 'int32', + }, + endLine: { + type: 'integer', + format: 'int32', + }, + ruleKey: { + type: 'string', + }, + sourceCode: { + type: 'string', + }, + }, + required: ['endLine', 'message', 'ruleKey', 'sourceCode', 'startLine'], +} as const; + +export const ChangeDtoSchema = { + type: 'object', + properties: { + startLine: { + type: 'integer', + format: 'int32', + }, + endLine: { + type: 'integer', + format: 'int32', + }, + newCode: { + type: 'string', + }, + }, +} as const; + +export const FixSuggestionResponseSchema = { + type: 'object', + properties: { + id: { + type: 'string', + format: 'uuid', + }, + issueId: { + type: 'string', + }, + explanation: { + type: 'string', + }, + changes: { + type: 'array', + items: { + $ref: '#/components/schemas/ChangeDto', + }, + }, + }, +} as const; + +export const LicenseRestRequestSchema = { + type: 'object', + properties: { + licenseKey: { + type: 'string', + description: 'New license key', + }, + }, +} as const; + +export const LicenseUploadActivationRequestSchema = { + type: 'object', + properties: { + license: { type: 'string', - format: 'uuid', + description: 'Contents of a valid .lic file', }, - issueId: { + licenseKey: { type: 'string', + description: 'License key for the license', }, - explanation: { + }, +} as const; + +export const LegacyLicenseRestRequestSchema = { + type: 'object', + properties: { + licenseKey: { type: 'string', - }, - changes: { - type: 'array', - items: { - $ref: '#/components/schemas/ChangeDto', - }, + description: 'New license key', }, }, } as const; @@ -390,11 +1280,13 @@ export const GitlabConfigurationCreateRestRequestSchema = { applicationId: { type: 'string', description: 'Gitlab Application id', + minLength: 1, }, url: { type: 'string', description: 'Url of Gitlab instance for authentication (for instance https://gitlab.com)', + minLength: 1, }, synchronizeGroups: { type: 'boolean', @@ -487,6 +1379,7 @@ export const GithubConfigurationCreateRestRequestSchema = { type: 'string', description: "The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps.", + minLength: 1, }, synchronizeGroups: { type: 'boolean', @@ -497,11 +1390,13 @@ export const GithubConfigurationCreateRestRequestSchema = { type: 'string', description: 'The API url for a GitHub instance. https://api.github.com/ for Github.com, https://github.company.com/api/v3/ when using Github Enterprise', + minLength: 1, }, webUrl: { type: 'string', description: 'The WEB url for a GitHub instance. https://github.com/ for Github.com, https://github.company.com/ when using GitHub Enterprise.\n', + minLength: 1, }, allowedOrganizations: { type: 'array', @@ -602,20 +1497,24 @@ export const BoundProjectCreateRestRequestSchema = { projectKey: { type: 'string', description: 'Key of the project to create', + minLength: 1, }, projectName: { type: 'string', description: 'Name of the project to create', + minLength: 1, }, devOpsPlatformSettingId: { type: 'string', description: 'Identifier of DevOps platform configuration to use. Use /dop-translation/dop-settings to retrieve the settings and their ID', + minLength: 1, }, repositoryIdentifier: { type: 'string', description: 'Identifier of the DevOps platform repository to import:\n- repository slug for GitHub and Bitbucket (Cloud and Server)\n- repository id for GitLab\n- repository name for Azure DevOps\n', + minLength: 1, }, projectIdentifier: { type: 'string', @@ -1011,26 +1910,41 @@ export const GroupMembershipRestResponseSchema = { }, } as const; -export const UpdateFieldListStringSchema = { +export const AtlassianAuthenticationDetailsResourceSchema = { type: 'object', properties: { - value: { - type: 'array', - items: { - type: 'string', - }, + clientId: { + type: 'string', + description: 'Atlassian 3LO App Client ID', + writeOnly: true, }, - defined: { - type: 'boolean', + secret: { + type: 'string', + description: 'Atlassian 3LO App Secret', + writeOnly: true, }, }, } as const; -export const UpdateFieldStringSchema = { +export const AtlassianAuthenticationDetailsResultResourceSchema = { type: 'object', properties: { - value: { + clientId: { type: 'string', + description: 'Atlassian 3LO App Client ID', + readOnly: true, + }, + }, +} as const; + +export const UpdateFieldListStringSchema = { + type: 'object', + properties: { + value: { + type: 'array', + items: { + type: 'string', + }, }, defined: { type: 'boolean', @@ -1042,8 +1956,10 @@ export const UserUpdateRestRequestSchema = { type: 'object', properties: { login: { - $ref: '#/components/schemas/UpdateFieldString', + type: 'string', description: 'User login', + maxLength: 100, + minLength: 2, }, name: { type: 'string', @@ -1053,12 +1969,16 @@ export const UserUpdateRestRequestSchema = { }, email: { type: 'string', + format: 'email', description: 'Email', maxLength: 100, minLength: 1, }, scmAccounts: { $ref: '#/components/schemas/UpdateFieldListString', + items: { + type: 'string', + }, }, externalProvider: { type: 'string', @@ -1074,96 +1994,420 @@ export const UserUpdateRestRequestSchema = { }, externalId: { type: 'string', - description: 'New external id in the authentication system.', - maxLength: 255, + description: 'New external id in the authentication system.', + maxLength: 255, + minLength: 1, + }, + }, +} as const; + +export const EmailConfigurationUpdateRestRequestSchema = { + type: 'object', + properties: { + host: { + type: 'string', + description: 'URL of your SMTP server', + }, + port: { + type: 'string', + description: 'Port of your SMTP server (usually 25, 587 or 465)', + }, + securityProtocol: { + type: 'string', + description: + 'Security protocol used to connect to your SMTP server (SSLTLS is recommended)', + enum: ['NONE', 'SSLTLS', 'STARTTLS'], + }, + fromAddress: { + type: 'string', + description: 'Address emails will come from', + }, + fromName: { + type: 'string', + description: 'Name emails will come from (usually "SonarQube")', + }, + subjectPrefix: { + type: 'string', + description: + 'Prefix added to email so they can be easily recognized (usually "[SonarQube]")', + }, + authMethod: { + type: 'string', + description: + 'Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange', + enum: ['BASIC', 'OAUTH'], + }, + username: { + type: 'string', + description: + 'For Basic and OAuth authentication: username used to authenticate to the SMTP server', + }, + basicPassword: { + type: 'string', + description: + 'For basic authentication: password used to authenticate to the SMTP server', + }, + oauthAuthenticationHost: { + type: 'string', + description: + 'For OAuth authentication: host of the Identity Provider issuing access tokens', + }, + oauthClientId: { + type: 'string', + description: + 'For OAuth authentication: Client ID provided by Microsoft Exchange when registering the application', + }, + oauthClientSecret: { + type: 'string', + description: + 'For OAuth authentication: Client password provided by Microsoft Exchange when registering the application', + }, + oauthTenant: { + type: 'string', + description: 'For OAuth authentication: Microsoft tenant', + }, + }, +} as const; + +export const LicenseProfilesUpdateRestRequestSchema = { + type: 'object', + properties: { + name: { + type: 'string', + description: 'The name of the license policy', + }, + default: { + type: 'boolean', + description: 'Whether this license policy is the default or not', + }, + }, +} as const; + +export const LicensePolicyLicenseUpdateRestRequestSchema = { + type: 'object', + properties: { + policy: { + type: 'string', + description: 'The new status of this license.', + enum: ['DENY', 'ALLOW'], + }, + }, + required: ['policy'], +} as const; + +export const LicensePolicyLicenseResourceSchema = { + type: 'object', + properties: { + id: { + type: 'string', + }, + spdxLicenseId: { + type: 'string', + }, + name: { + type: 'string', + }, + category: { + type: 'string', + enum: [ + 'UNKNOWN', + 'COPYLEFT_WEAK', + 'COPYLEFT_STRONG', + 'COPYLEFT_NETWORK', + 'COPYLEFT_MAXIMAL', + 'PERMISSIVE_STANDARD', + 'PERMISSIVE_AMATEUR', + ], + }, + policy: { + type: 'string', + description: 'The policy status of this license.', + enum: ['DENY', 'ALLOW'], + }, + }, +} as const; + +export const LicenseProfileCategoryUpdateRestRequestSchema = { + type: 'object', + properties: { + policy: { + type: 'string', + description: 'The new status of this category.', + enum: ['DENY', 'ALLOW'], + }, + }, + required: ['policy'], +} as const; + +export const LicenseProfileCategoryResourceSchema = { + type: 'object', + properties: { + id: { + type: 'string', + }, + key: { + type: 'string', + enum: [ + 'UNKNOWN', + 'COPYLEFT_WEAK', + 'COPYLEFT_STRONG', + 'COPYLEFT_NETWORK', + 'COPYLEFT_MAXIMAL', + 'PERMISSIVE_STANDARD', + 'PERMISSIVE_AMATEUR', + ], + }, + policy: { + type: 'string', + description: 'The policy status of this category.', + enum: ['DENY', 'ALLOW'], + }, + }, +} as const; + +export const AssignedProjectsUpdateRestRequestSchema = { + type: 'object', + properties: { + licenseProfileUuid: { + type: 'string', + description: + 'The id of the license profile that should be used when analyzing the project for license issues.', + }, + projectKey: { + type: 'string', + description: + 'The key of the project that should be assigned to the license profile.', + }, + }, + required: ['licenseProfileUuid', 'projectKey'], +} as const; + +export const IssueReleaseUpdateCommentRestRequestSchema = { + type: 'object', + properties: { + issueReleaseChangeKey: { + type: 'string', + description: 'Issue release change key', + }, + comment: { + type: 'string', + description: 'Comment text', + }, + }, + required: ['comment', 'issueReleaseChangeKey'], +} as const; + +export const FeatureEnablementRequestSchema = { + type: 'object', + properties: { + enablement: { + type: 'boolean', + description: 'Whether SCA is enabled or not', + }, + }, +} as const; + +export const FeatureEnablementResourceSchema = { + type: 'object', + properties: { + enablement: { + type: 'boolean', + }, + }, +} as const; + +export const JiraWorkTypesSelectionResourceSchema = { + type: 'object', + properties: { + sonarProjectId: { + type: 'string', + description: 'The Sonar project ID', + writeOnly: true, + }, + selectedWorkTypes: { + type: 'array', + description: 'An array with the selected work type ids', + items: { + type: 'string', + }, + writeOnly: true, + }, + }, +} as const; + +export const PatchJiraProjectBindingRequestResourceSchema = { + type: 'object', + properties: { + sonarProjectId: { + type: 'string', + description: 'Sonar project identifier', + minLength: 1, + writeOnly: true, + }, + jiraProjectKey: { + type: 'string', + description: 'Jira project key', minLength: 1, + writeOnly: true, }, }, + required: ['jiraProjectKey', 'sonarProjectId'], } as const; -export const EmailConfigurationUpdateRestRequestSchema = { +export const PatchJiraOrganizationBindingRequestResourceSchema = { type: 'object', properties: { - host: { + sonarOrganizationUuid: { type: 'string', - description: 'URL of your SMTP server', + format: 'uuid', + description: 'Sonar organization UUID', + writeOnly: true, }, - port: { + jiraCloudId: { type: 'string', - description: 'Port of your SMTP server (usually 25, 587 or 465)', + description: 'Jira cloud ID to bind with the organization', + minLength: 1, + writeOnly: true, }, - securityProtocol: { + jiraInstanceUrl: { type: 'string', - description: - 'Security protocol used to connect to your SMTP server (SSLTLS is recommended)', - enum: ['NONE', 'SSLTLS', 'STARTTLS'], + description: 'Jira instance URL', + minLength: 1, + writeOnly: true, }, - fromAddress: { + }, + required: ['jiraCloudId', 'jiraInstanceUrl', 'sonarOrganizationUuid'], +} as const; + +export const PatchJiraOrganizationBindingEditResourceSchema = { + type: 'object', + properties: { + sonarOrganizationUuid: { type: 'string', - description: 'Address emails will come from', + format: 'uuid', + description: 'Sonar organization UUID', + writeOnly: true, }, - fromName: { - type: 'string', - description: 'Name emails will come from (usually "SonarQube")', + isTokenShared: { + type: 'boolean', + description: 'TODO', + writeOnly: true, }, - subjectPrefix: { + }, + required: ['isTokenShared', 'sonarOrganizationUuid'], +} as const; + +export const RuleTypeMappingSchema = { + type: 'object', + properties: { + type: { type: 'string', - description: - 'Prefix added to email so they can be easily recognized (usually "[SonarQube]")', + description: 'Rule type', + enum: ['CODE_SMELL', 'BUG', 'VULNERABILITY', 'SECURITY_HOTSPOT'], }, - authMethod: { - type: 'string', - description: - 'Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange', - enum: ['BASIC', 'OAUTH'], + severities: { + type: 'array', + description: 'List of severities', + items: { + type: 'string', + enum: ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO'], + }, }, - username: { - type: 'string', - description: - 'For Basic and OAuth authentication: username used to authenticate to the SMTP server', + }, + required: ['severities', 'type'], +} as const; + +export const SandboxSettingsResourceSchema = { + type: 'object', + properties: { + enabled: { + type: 'boolean', + description: 'Whether sandbox is enabled globally', }, - basicPassword: { - type: 'string', - description: - 'For basic authentication: password used to authenticate to the SMTP server', + defaultValue: { + type: 'boolean', + description: 'Default value for projects', }, - oauthAuthenticationHost: { - type: 'string', - description: - 'For OAuth authentication: host of the Identity Provider issuing access tokens', + allowOverride: { + type: 'boolean', + description: 'Allow projects to override settings', }, - oauthClientId: { - type: 'string', - description: - 'For OAuth authentication: Client ID provided by Microsoft Exchange when registering the application', + softwareQualities: { + type: 'array', + description: 'Software quality mappings (MQR mode)', + items: { + $ref: '#/components/schemas/SoftwareQualityMapping', + }, }, - oauthClientSecret: { - type: 'string', - description: - 'For OAuth authentication: Client password provided by Microsoft Exchange when registering the application', + types: { + type: 'array', + description: 'Rule type mappings (Standard Experience mode)', + items: { + $ref: '#/components/schemas/RuleTypeMapping', + }, }, - oauthTenant: { + }, +} as const; + +export const SoftwareQualityMappingSchema = { + type: 'object', + properties: { + softwareQuality: { type: 'string', - description: 'For OAuth authentication: Microsoft tenant', + description: 'Software quality', + enum: ['MAINTAINABILITY', 'RELIABILITY', 'SECURITY'], + }, + impactSeverities: { + type: 'array', + description: 'List of impact severities', + items: { + type: 'string', + enum: ['INFO', 'LOW', 'MEDIUM', 'HIGH', 'BLOCKER'], + }, }, }, + required: ['impactSeverities', 'softwareQuality'], } as const; -export const FeatureEnablementRequestSchema = { +export const SandboxSettingsProjectResourceSchema = { type: 'object', properties: { - enablement: { + enabled: { type: 'boolean', - description: 'Whether SCA is enabled or not', + description: 'Whether sandbox is enabled for this project', + }, + softwareQualities: { + type: 'array', + description: 'Software quality mappings (MQR mode)', + items: { + $ref: '#/components/schemas/SoftwareQualityMapping', + }, + }, + types: { + type: 'array', + description: 'Rule type mappings (Standard Experience mode)', + items: { + $ref: '#/components/schemas/RuleTypeMapping', + }, + }, + overridden: { + type: 'boolean', + description: 'Whether project settings override instance settings', }, }, } as const; -export const FeatureEnablementResourceSchema = { +export const IntegrationConfigurationPatchRequestSchema = { type: 'object', properties: { - enablement: { - type: 'boolean', + clientId: { + type: 'string', + }, + clientSecret: { + type: 'string', + }, + signingSecret: { + type: 'string', }, }, } as const; @@ -1228,6 +2472,9 @@ export const GitlabConfigurationUpdateRestRequestSchema = { }, allowedGroups: { $ref: '#/components/schemas/UpdateFieldListString', + items: { + type: 'string', + }, }, provisioningType: { type: 'string', @@ -1286,6 +2533,9 @@ export const GithubConfigurationUpdateRestRequestSchema = { }, allowedOrganizations: { $ref: '#/components/schemas/UpdateFieldListString', + items: { + type: 'string', + }, }, provisioningType: { type: 'string', @@ -1425,50 +2675,206 @@ export const EmailConfigurationSearchRestResponseSchema = { $ref: '#/components/schemas/EmailConfigurationResource', }, }, - page: { - $ref: '#/components/schemas/PageRestResponse', + page: { + $ref: '#/components/schemas/PageRestResponse', + }, + }, +} as const; + +export const CategorySchema = { + type: 'object', + properties: { + activeRules: { + type: 'integer', + format: 'int32', + }, + issues: { + type: 'integer', + format: 'int32', + }, + key: { + type: 'string', + }, + }, +} as const; + +export const GetAccessibilityReportResponseSchema = { + type: 'object', + properties: { + categories: { + type: 'array', + items: { + $ref: '#/components/schemas/Category', + }, + }, + }, +} as const; + +export const SelfTestHttpCallResourceSchema = { + type: 'object', + properties: { + attemptedUrl: { + type: 'string', + }, + attemptedMethod: { + type: 'string', + }, + responseCode: { + type: 'integer', + format: 'int32', + }, + responseBody: { + type: 'string', + }, + responseBodyAppearsValid: { + type: 'boolean', + }, + responseHeaders: { + type: 'array', + items: { + type: 'array', + items: { + type: 'string', + }, + }, + }, + }, +} as const; + +export const SelfTestResponseSchema = { + type: 'object', + properties: { + featureEnabled: { + type: 'boolean', + }, + selfTestPassed: { + type: 'boolean', + }, + cliVersionCheck: { + $ref: '#/components/schemas/SelfTestHttpCallResource', + }, + vulnerabilityDetailsCheck: { + $ref: '#/components/schemas/SelfTestHttpCallResource', + }, + }, +} as const; + +export const SelfTestSpringConfigurationResponseSchema = { + type: 'object', + properties: { + springVersion: { + type: 'string', + }, + }, +} as const; + +export const RiskReportItemSchema = { + type: 'object', + properties: { + projectKey: { + type: 'string', + }, + projectName: { + type: 'string', + }, + branchKey: { + type: 'string', + }, + riskTitle: { + type: 'string', + }, + riskType: { + type: 'string', + enum: ['VULNERABILITY', 'PROHIBITED_LICENSE'], + }, + riskSeverity: { + type: 'string', + enum: ['INFO', 'LOW', 'MEDIUM', 'HIGH', 'BLOCKER'], + }, + riskStatus: { + type: 'string', + enum: ['OPEN', 'ACCEPT', 'CONFIRM', 'SAFE', 'FIXED'], + }, + statusChanges: { + type: 'array', + items: { + $ref: '#/components/schemas/StatusChange', + }, + }, + vulnerabilityId: { + type: 'string', + }, + cvssScore: { + type: 'number', + }, + cweIds: { + type: 'array', + items: { + type: 'string', + }, + }, + publishedOn: { + type: 'string', + }, + createdAt: { + type: 'string', + }, + packageUrl: { + type: 'string', + }, + riskUrl: { + type: 'string', + }, + dependencyChains: { + type: 'array', + items: { + type: 'array', + items: { + type: 'string', + }, + }, + }, + scope: { + type: 'string', + }, + productionScope: { + type: 'boolean', }, }, } as const; -export const ReleaseSearchResourceSchema = { +export const StatusChangeSchema = { type: 'object', properties: { - key: { - type: 'string', - }, - packageUrl: { + comment: { type: 'string', }, - packageManager: { + newStatus: { type: 'string', }, - packageName: { + createdAt: { type: 'string', }, - version: { + }, +} as const; + +export const BranchResourceSchema = { + type: 'object', + properties: { + uuid: { type: 'string', }, - licenseExpression: { + key: { type: 'string', }, - known: { - type: 'boolean', - }, - newInPullRequest: { - type: 'boolean', - }, - directSummary: { + pullRequest: { type: 'boolean', }, - scopeSummary: { + projectKey: { type: 'string', }, - dependencyFilePaths: { - type: 'array', - items: { - type: 'string', - }, + projectName: { + type: 'string', }, }, } as const; @@ -1488,6 +2894,16 @@ export const ReleasesSearchRestResponseSchema = { $ref: '#/components/schemas/ScaReleaseByPackageManagerCountDto', }, }, + branches: { + type: 'array', + items: { + $ref: '#/components/schemas/BranchResource', + }, + }, + countWithoutFilters: { + type: 'integer', + format: 'int32', + }, page: { $ref: '#/components/schemas/PageRestResponse', }, @@ -1537,7 +2953,7 @@ export const DependencyResourceSchema = { }, }, }, - newInPullRequest: { + newlyIntroduced: { type: 'boolean', }, }, @@ -1552,12 +2968,23 @@ export const IssueResourceSchema = { severity: { type: 'string', }, + showIncreasedSeverityWarning: { + type: 'boolean', + }, type: { type: 'string', + enum: ['VULNERABILITY', 'PROHIBITED_LICENSE'], + }, + quality: { + type: 'string', + enum: ['MAINTAINABILITY', 'RELIABILITY', 'SECURITY'], }, createdAt: { type: 'string', }, + assignee: { + $ref: '#/components/schemas/UserResource', + }, vulnerabilityId: { type: 'string', }, @@ -1582,6 +3009,9 @@ export const ReleaseDetailResourceSchema = { key: { type: 'string', }, + branchUuid: { + type: 'string', + }, packageUrl: { type: 'string', }, @@ -1600,7 +3030,10 @@ export const ReleaseDetailResourceSchema = { known: { type: 'boolean', }, - newInPullRequest: { + knownPackage: { + type: 'boolean', + }, + newlyIntroduced: { type: 'boolean', }, directSummary: { @@ -1624,10 +3057,88 @@ export const ReleaseDetailResourceSchema = { $ref: '#/components/schemas/IssueResource', }, }, + branch: { + $ref: '#/components/schemas/BranchResource', + }, + }, +} as const; + +export const LicenseProfileCollectionActionsSchema = { + type: 'object', + properties: { + create: { + type: 'boolean', + }, + }, +} as const; + +export const LicenseProfileIndexRestResponseSchema = { + type: 'object', + properties: { + licenseProfiles: { + type: 'array', + items: { + $ref: '#/components/schemas/LicenseProfileResource', + }, + }, + actions: { + $ref: '#/components/schemas/LicenseProfileCollectionActions', + }, + }, +} as const; + +export const LicenseProfileDetailsResourceSchema = { + type: 'object', + properties: { + profile: { + $ref: '#/components/schemas/LicenseProfileResource', + }, + categories: { + type: 'array', + items: { + $ref: '#/components/schemas/LicenseProfileCategoryResource', + }, + }, + licenses: { + type: 'array', + items: { + $ref: '#/components/schemas/LicensePolicyLicenseResource', + }, + }, + }, +} as const; + +export const AssignableProjectResourceSchema = { + type: 'object', + properties: { + projectKey: { + type: 'string', + }, + projectName: { + type: 'string', + }, + assignedToLicenseProfile: { + type: 'boolean', + }, + }, +} as const; + +export const AssignableProjectsIndexRestResponseSchema = { + type: 'object', + properties: { + assignableProjects: { + type: 'array', + items: { + $ref: '#/components/schemas/AssignableProjectResource', + }, + }, + page: { + $ref: '#/components/schemas/PageRestResponse', + }, }, } as const; -export const DependencyRiskResourceSchema = { +export const IssueReleaseResourceSchema = { type: 'object', properties: { key: { @@ -1636,15 +3147,39 @@ export const DependencyRiskResourceSchema = { severity: { type: 'string', }, + originalSeverity: { + type: 'string', + }, + manualSeverity: { + type: 'string', + }, + showIncreasedSeverityWarning: { + type: 'boolean', + }, release: { $ref: '#/components/schemas/ReleaseSearchResource', }, type: { type: 'string', + enum: ['VULNERABILITY', 'PROHIBITED_LICENSE'], + }, + quality: { + type: 'string', + enum: ['MAINTAINABILITY', 'RELIABILITY', 'SECURITY'], + }, + status: { + type: 'string', }, createdAt: { type: 'string', }, + assignee: { + $ref: '#/components/schemas/UserResource', + }, + commentCount: { + type: 'integer', + format: 'int32', + }, vulnerabilityId: { type: 'string', }, @@ -1657,244 +3192,316 @@ export const DependencyRiskResourceSchema = { cvssScore: { type: 'string', }, + withdrawn: { + type: 'boolean', + }, spdxLicenseId: { type: 'string', }, + transitions: { + type: 'array', + items: { + type: 'string', + enum: ['CONFIRM', 'REOPEN', 'SAFE', 'FIXED', 'ACCEPT'], + }, + }, + actions: { + type: 'array', + items: { + type: 'string', + enum: ['COMMENT', 'ASSIGN', 'SET_SEVERITY'], + }, + uniqueItems: true, + }, }, } as const; -export const DependencyRisksSearchRestResponseSchema = { +export const IssuesReleasesSearchRestResponseSchema = { type: 'object', properties: { issuesReleases: { type: 'array', items: { - $ref: '#/components/schemas/DependencyRiskResource', + $ref: '#/components/schemas/IssueReleaseResource', + }, + }, + branches: { + type: 'array', + items: { + $ref: '#/components/schemas/IssueReleaseBranchResource', }, }, + countWithoutFilters: { + type: 'integer', + format: 'int32', + }, page: { $ref: '#/components/schemas/PageRestResponse', }, }, } as const; -export const AffectedPackageResourceSchema = { +export const IssueReleaseChangeDiffResourceSchema = { type: 'object', properties: { - purl: { + fieldName: { type: 'string', }, - recommendation: { + oldValue: { type: 'string', }, - recommendationDetails: { - $ref: '#/components/schemas/VulnerabilityRecommendationDetailsResource', - }, - versionOptions: { - type: 'array', - items: { - $ref: '#/components/schemas/VersionOptionResource', - }, - }, - affectedVersions: { - type: 'array', - items: { - type: 'string', - }, - }, - unaffectedVersions: { + newValue: { type: 'string', }, }, } as const; -export const DependencyRiskDetailsResourceSchema = { +export const IssueReleaseChangeResourceSchema = { type: 'object', properties: { key: { type: 'string', }, - severity: { + createdAt: { type: 'string', }, - release: { - $ref: '#/components/schemas/ReleaseSearchResource', + user: { + $ref: '#/components/schemas/UserResource', }, - type: { + markdownComment: { type: 'string', }, - createdAt: { + htmlComment: { type: 'string', }, - vulnerability: { - $ref: '#/components/schemas/VulnerabilityResource', + changeData: { + type: 'array', + items: { + $ref: '#/components/schemas/IssueReleaseChangeDiffResource', + }, }, - spdxLicenseId: { - type: 'string', + actions: { + type: 'array', + items: { + type: 'string', + enum: ['EDIT_COMMENT', 'DELETE_COMMENT'], + }, + uniqueItems: true, }, }, } as const; -export const VersionOptionResourceSchema = { +export const IssuesReleasesChangesRestResponseSchema = { type: 'object', properties: { - version: { - type: 'string', - description: 'The version being presented as an option', - }, - vulnerabilityIds: { + changelog: { type: 'array', - description: 'Vulnerability IDs affecting this version', items: { - type: 'string', + $ref: '#/components/schemas/IssueReleaseChangeResource', }, }, - prerelease: { + }, +} as const; + +export const ScaFeatureEnabledResourceSchema = { + type: 'object', + properties: { + enabled: { type: 'boolean', - description: 'Is this version a pre-release version', - }, - fixLevel: { - type: 'string', - description: 'Describes which vulnerabilities are fixed', - enum: ['COMPLETE', 'PARTIAL', 'NONE', 'UNKNOWN'], - }, - descriptionCode: { - type: 'string', - description: 'How the frontend should label this version', - enum: [ - 'VERSION_IN_USE', - 'NEAREST_PARTIAL', - 'NEAREST_COMPLETE', - 'LATEST_PARTIAL', - 'LATEST_COMPLETE', - 'LATEST_STABLE', - 'LATEST_PRERELEASE', - 'UNKNOWN', - ], }, }, } as const; -export const VulnerabilityRecommendationDetailsResourceSchema = { +export const ScaCliInfoRestResponseSchema = { type: 'object', properties: { - impactScore: { - type: 'integer', - format: 'int32', - }, - impactDescription: { + id: { type: 'string', }, - realIssue: { - type: 'boolean', - }, - falsePositiveReason: { + filename: { type: 'string', }, - includesDev: { - type: 'boolean', - }, - specificMethodsAffected: { - type: 'boolean', - }, - specificMethodsDescription: { + sha256: { type: 'string', }, - otherConditions: { - type: 'boolean', + os: { + type: 'string', }, - otherConditionsDescription: { + arch: { type: 'string', }, - workaroundAvailable: { - type: 'boolean', + }, +} as const; + +export const AnalysisErrorResourceSchema = { + type: 'object', + properties: { + code: { + type: 'string', + enum: [ + 'UNKNOWN', + 'NO_DEPENDENCIES_FOUND', + 'DEPENDENCY_FILES_PARSE_ERROR', + 'UNSUPPORTED_PLATFORM', + 'INEXACT_VERSIONS', + 'MISSING_LOCKFILE', + ], }, - workaroundDescription: { + path: { type: 'string', }, - visibility: { + message: { type: 'string', }, }, } as const; -export const VulnerabilityReportResourceSchema = { +export const AnalysisResourceSchema = { type: 'object', properties: { - id: { + status: { type: 'string', + enum: ['FAILED', 'OUTDATED', 'COMPLETED'], }, - url: { + failedReason: { type: 'string', }, - type: { - type: 'string', + errors: { + type: 'array', + items: { + $ref: '#/components/schemas/AnalysisErrorResource', + }, }, - cvssScore: { + parsedFiles: { + type: 'array', + items: { + type: 'string', + }, + }, + }, +} as const; + +export const JiraWorkTypeFieldResultResourceSchema = { + type: 'object', + properties: { + key: { type: 'string', + description: 'The field key', + readOnly: true, }, - cvssSeverity: { + name: { type: 'string', + description: 'The field name', + readOnly: true, + }, + required: { + type: 'boolean', + description: 'Whether the field is required', + readOnly: true, + }, + hasDefaultValue: { + type: 'boolean', + description: 'Whether the field has a default value', + readOnly: true, }, }, } as const; -export const VulnerabilityResourceSchema = { +export const JiraWorkTypeResultResourceSchema = { type: 'object', properties: { - vulnerabilityId: { + id: { type: 'string', + description: 'the Jira work type id', + readOnly: true, }, - reports: { - type: 'array', - items: { - $ref: '#/components/schemas/VulnerabilityReportResource', - }, + name: { + type: 'string', + description: 'the Jira work type name', + readOnly: true, }, description: { type: 'string', + description: 'the Jira work type description', + readOnly: true, }, - epssPercentile: { - type: 'string', + subtask: { + type: 'boolean', + description: 'true, if the Jira work type is a subtask', + readOnly: true, }, - epssProbability: { - type: 'string', + hierarchyLevel: { + type: 'integer', + format: 'int32', + description: 'the Jira work type hierarchy', + readOnly: true, }, - knownExploited: { + selected: { type: 'boolean', + description: 'true, if the Jira work type is selected', + readOnly: true, }, - cweIds: { - type: 'array', - items: { - type: 'string', - }, - }, - affectedPackages: { + fields: { type: 'array', + description: + 'Array of field metadata for the specified work type. (Optional)', items: { - $ref: '#/components/schemas/AffectedPackageResource', + $ref: '#/components/schemas/JiraWorkTypeFieldResultResource', }, + readOnly: true, }, }, } as const; -export const ScaCliInfoRestResponseSchema = { +export const JiraProjectResultResourceSchema = { type: 'object', properties: { - id: { + name: { type: 'string', + description: 'the name of the project', + readOnly: true, }, - filename: { + key: { type: 'string', + description: 'the key of the project', + readOnly: true, }, - sha256: { - type: 'string', + }, +} as const; + +export const LinkedIssuesCountResourceSchema = { + type: 'object', + properties: { + count: { + type: 'integer', + format: 'int32', + description: 'Count of linked Jira issues', + readOnly: true, }, - os: { - type: 'string', + }, +} as const; + +export const IntegrationConfigurationSearchResponseSchema = { + type: 'object', + properties: { + integrationConfigurations: { + type: 'array', + items: { + $ref: '#/components/schemas/IntegrationConfigurationResponse', + }, }, - arch: { - type: 'string', + }, +} as const; + +export const SupportedRulesDtoSchema = { + type: 'object', + properties: { + rules: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, }, }, } as const; @@ -1948,23 +3555,6 @@ export const ServiceInfoSchema = { 'UNAUTHORIZED', ], }, - isEnabled: { - type: 'boolean', - }, - subscriptionType: { - type: 'string', - enum: ['EARLY_ACCESS', 'PAID', 'NOT_PAID'], - }, - }, -} as const; - -export const SubscriptionTypeResponseSchema = { - type: 'object', - properties: { - subscriptionType: { - type: 'string', - enum: ['EARLY_ACCESS', 'PAID', 'NOT_PAID'], - }, }, } as const; @@ -2025,6 +3615,130 @@ export const ProviderResponseDtoSchema = { }, } as const; +export const PurchasableFeatureRestResponseSchema = { + type: 'object', + properties: { + featureKey: { + type: 'string', + }, + parent: { + type: 'string', + }, + isEnabled: { + type: 'boolean', + }, + isAvailable: { + type: 'boolean', + }, + url: { + type: 'string', + }, + }, +} as const; + +export const LicenseFeatureRestResponseSchema = { + type: 'object', + properties: { + name: { + type: 'string', + }, + parent: { + type: 'string', + }, + startDate: { + type: 'string', + }, + endDate: { + type: 'string', + }, + }, +} as const; + +export const LicenseRestResponseSchema = { + type: 'object', + properties: { + expirationDate: { + type: 'string', + }, + lastRefreshDate: { + type: 'string', + }, + edition: { + type: 'string', + }, + features: { + type: 'array', + items: { + $ref: '#/components/schemas/LicenseFeatureRestResponse', + }, + }, + maxLoc: { + type: 'integer', + format: 'int64', + }, + loc: { + type: 'integer', + format: 'int64', + }, + serverId: { + type: 'string', + }, + type: { + type: 'string', + }, + contactEmail: { + type: 'string', + }, + remainingLocThreshold: { + type: 'integer', + format: 'int64', + }, + canActivateGracePeriod: { + type: 'boolean', + }, + gracePeriodEndDate: { + type: 'string', + }, + gracePeriodExpired: { + type: 'boolean', + }, + extraDays: { + type: 'integer', + format: 'int32', + }, + startDate: { + type: 'string', + }, + activatedOnline: { + type: 'boolean', + }, + licenseKey: { + type: 'string', + }, + validEdition: { + type: 'boolean', + }, + validServerId: { + type: 'boolean', + }, + officialDistribution: { + type: 'boolean', + }, + supported: { + type: 'boolean', + }, + legacy: { + type: 'boolean', + }, + expired: { + type: 'boolean', + }, + disabled: { + type: 'boolean', + }, + }, +} as const; + export const ProjectBindingSchema = { type: 'object', properties: { @@ -2176,6 +3890,44 @@ export const GroupsMembershipSearchRestResponseSchema = { }, } as const; +export const _aSchema = { + type: 'object', + properties: { + graphs: { + type: 'array', + items: { + $ref: '#/components/schemas/_h', + }, + }, + }, +} as const; + +export const _hSchema = { + type: 'object', + properties: { + id: { + type: 'string', + }, + branchId: { + type: 'string', + }, + type: { + type: 'string', + enum: ['file_graph', 'namespace_graph'], + }, + ecosystem: { + type: 'string', + enum: ['java', 'js', 'ts', 'py', 'cs', 'xoo'], + }, + perspectiveKey: { + type: 'string', + }, + graphVersion: { + type: 'string', + }, + }, +} as const; + export const JreInfoRestResponseSchema = { type: 'object', properties: { @@ -3006,13 +4758,14 @@ export const UserCreateRestRequestWritableSchema = { properties: { email: { type: 'string', + format: 'email', description: 'User email', maxLength: 100, minLength: 1, }, local: { type: 'boolean', - default: 'true', + default: true, description: 'Specify if the user should be authenticated from SonarQube server or from an external authentication system. Password should not be set when local is set to false.', }, @@ -3084,10 +4837,12 @@ export const EmailConfigurationCreateRestRequestWritableSchema = { host: { type: 'string', description: 'URL of your SMTP server', + minLength: 1, }, port: { type: 'string', description: 'Port of your SMTP server (usually 25, 587 or 465)', + minLength: 1, }, securityProtocol: { type: 'string', @@ -3098,15 +4853,18 @@ export const EmailConfigurationCreateRestRequestWritableSchema = { fromAddress: { type: 'string', description: 'Address emails will come from', + minLength: 1, }, fromName: { type: 'string', description: 'Name emails will come from (usually "SonarQube")', + minLength: 1, }, subjectPrefix: { type: 'string', description: 'Prefix added to email so they can be easily recognized (usually "[SonarQube]")', + minLength: 1, }, authMethod: { type: 'string', @@ -3118,6 +4876,7 @@ export const EmailConfigurationCreateRestRequestWritableSchema = { type: 'string', description: 'For Basic and OAuth authentication: username used to authenticate to the SMTP server', + minLength: 1, }, basicPassword: { type: 'string', @@ -3236,15 +4995,18 @@ export const GitlabConfigurationCreateRestRequestWritableSchema = { applicationId: { type: 'string', description: 'Gitlab Application id', + minLength: 1, }, url: { type: 'string', description: 'Url of Gitlab instance for authentication (for instance https://gitlab.com)', + minLength: 1, }, secret: { type: 'string', description: 'Secret of the application', + minLength: 1, writeOnly: true, }, synchronizeGroups: { @@ -3329,23 +5091,27 @@ export const GithubConfigurationCreateRestRequestWritableSchema = { type: 'string', description: 'Client ID provided by GitHub when registering the application.', + minLength: 1, writeOnly: true, }, clientSecret: { type: 'string', description: 'Client password provided by GitHub when registering the application.', + minLength: 1, writeOnly: true, }, applicationId: { type: 'string', description: "The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps.", + minLength: 1, }, privateKey: { type: 'string', description: "Your GitHub App's private key. You can generate a .pem file from your GitHub App's page under Private keys.\nCopy and paste the whole contents of the file here.\n", + minLength: 1, writeOnly: true, }, synchronizeGroups: { @@ -3357,11 +5123,13 @@ export const GithubConfigurationCreateRestRequestWritableSchema = { type: 'string', description: 'The API url for a GitHub instance. https://api.github.com/ for Github.com, https://github.company.com/api/v3/ when using Github Enterprise', + minLength: 1, }, webUrl: { type: 'string', description: 'The WEB url for a GitHub instance. https://github.com/ for Github.com, https://github.company.com/ when using GitHub Enterprise.\n', + minLength: 1, }, allowedOrganizations: { type: 'array', diff --git a/src/generated/sdk.gen.ts b/src/generated/sdk.gen.ts index 4777fa8..2ccf727 100644 --- a/src/generated/sdk.gen.ts +++ b/src/generated/sdk.gen.ts @@ -1,19 +1,37 @@ // This file is auto-generated by @hey-api/openapi-ts -import type { Client, Options as Options2, TDataShape } from './client'; +import { + type Client, + type Options as Options2, + type TDataShape, + urlSearchParamsBodySerializer, +} from './client'; import { client } from './client.gen'; import { + createUserBindingResponseTransformer, generateUserTokenResponseTransformer, + getLicenseResponseTransformer, + getUserBindingResponseTransformer, searchUserTokensResponseTransformer, + 絛2ResponseTransformer, + 鲥12ResponseTransformer, + 鲥5ResponseTransformer, + 鲥7ResponseTransformer, } from './transformers.gen'; import type { AddAPermissionToAGroupData, AddAPermissionToAGroupResponses, + AddCommentData, + AddCommentResponses, AddPermissionToAuserData, AddPermissionToAuserResponses, AddProjectToApplicationData, AddProjectToApplicationErrors, AddProjectToApplicationResponses, + BillAzureAccountData, + BillAzureAccountResponses, + ClearSeverityWarningData, + ClearSeverityWarningResponses, ComponentData, ComponentErrors, ComponentResponses, @@ -32,6 +50,10 @@ import type { Create5Responses, Create6Data, Create6Responses, + Create7Data, + Create7Responses, + Create8Data, + Create8Responses, CreateApplicationData, CreateApplicationErrors, CreateApplicationResponses, @@ -64,8 +86,19 @@ import type { CreateMappingData, CreateMappingResponses, CreateResponses, + CreateUserBindingData, + CreateUserBindingErrors, + CreateUserBindingResponses, DeactivateData, + DeactivateLicenseData, + DeactivateLicenseResponses, DeactivateResponses, + Delete1Data, + Delete1Responses, + Delete2Data, + Delete2Responses, + Delete3Data, + Delete3Responses, DeleteAlmBindingData, DeleteAlmBindingErrors, DeleteAlmBindingResponses, @@ -75,6 +108,8 @@ import type { DeleteApplicationData, DeleteApplicationErrors, DeleteApplicationResponses, + DeleteCommentData, + DeleteCommentResponses, DeleteData, DeleteEmailConfigurationData, DeleteEmailConfigurationResponses, @@ -84,6 +119,8 @@ import type { DeleteGitlabConfigurationResponses, DeleteGroupData, DeleteGroupResponses, + DeleteLicenseData, + DeleteLicenseResponses, DeleteMapping1Data, DeleteMapping1Responses, DeleteMappingData, @@ -101,10 +138,12 @@ import type { FetchAllDopSettingsData, FetchAllDopSettingsResponses, FetchAllResponses, - FetchDependencyRiskData, - FetchDependencyRiskResponses, + FetchAnalysisData, + FetchAnalysisResponses, FetchGroupData, FetchGroupResponses, + FetchIssueReleaseData, + FetchIssueReleaseResponses, FetchReleaseData, FetchReleaseResponses, FetchUserData, @@ -116,17 +155,29 @@ import type { GenerateUserTokenResponses, Get1Data, Get1Responses, + Get2Data, + Get2Responses, + Get3Data, + Get3Responses, GetActiveRulesData, GetActiveRulesResponses, GetAListOfProjectsAndLicenseUsageData, GetAListOfProjectsAndLicenseUsageErrors, GetAListOfProjectsAndLicenseUsageResponses, + GetAllAssigneesData, + GetAllAssigneesResponses, GetAlmBindingData, GetAlmBindingErrors, GetAlmBindingResponses, + GetChangelogData, + GetChangelogResponses, GetData, GetEmailConfigurationData, GetEmailConfigurationResponses, + GetFeatureEnabled1Data, + GetFeatureEnabled1Responses, + GetFeatureEnabledData, + GetFeatureEnabledResponses, GetFeatureEnablement1Data, GetFeatureEnablement1Responses, GetFeatureEnablementData, @@ -139,6 +190,8 @@ import type { GetHealthResponses, GetJresMetadataData, GetJresMetadataResponses, + GetLicenseData, + GetLicenseResponses, GetLlmProvidersData, GetLlmProvidersResponses, GetModeData, @@ -147,15 +200,32 @@ import type { GetProjectBindingByProjectIdResponses, GetProjectBindingData, GetProjectBindingResponses, + GetProjectSandboxSettingsData, + GetProjectSandboxSettingsResponses, + GetPurchasableFeaturesData, + GetPurchasableFeaturesResponses, + GetReportData, + GetReportResponses, GetResponses, + GetSandboxSettingsData, + GetSandboxSettingsResponses, GetScaClisMetadataData, GetScaClisMetadataResponses, GetStatusData, GetStatusResponses, - GetSubscriptionTypeData, - GetSubscriptionTypeResponses, + GetUserBindingData, + GetUserBindingErrors, + GetUserBindingResponses, GetVersionData, GetVersionResponses, + HandleEventData, + HandleEventResponses, + HandleSlashCommandData, + HandleSlashCommandResponses, + Index1Data, + Index1Responses, + IndexData, + IndexResponses, ListAlmDefinitionsData, ListAlmDefinitionsErrors, ListAlmDefinitionsResponses, @@ -165,11 +235,25 @@ import type { LivenessCheckData, LivenessCheckErrors, LivenessCheckResponses, + PatchCategoryData, + PatchCategoryResponses, + PatchLicenseData, + PatchLicenseResponses, PatchModeData, PatchModeResponses, + PatchProjectSandboxSettingsData, + PatchProjectSandboxSettingsResponses, + PatchSandboxSettingsData, + PatchSandboxSettingsResponses, + PerformSelfTestData, + PerformSelfTestResponses, + PerformSpringConfigurationSelfTestData, + PerformSpringConfigurationSelfTestResponses, RefreshApplicationData, RefreshApplicationErrors, RefreshApplicationResponses, + RefreshLicenseData, + RefreshLicenseResponses, RemoveAPermissionFromAGroupData, RemoveAPermissionFromAGroupResponses, RemovePermissionFromAuserData, @@ -177,6 +261,8 @@ import type { RemoveProjectFromApplicationData, RemoveProjectFromApplicationErrors, RemoveProjectFromApplicationResponses, + RetrieveRequestFileData, + RetrieveRequestFileResponses, RevokeUserTokenData, RevokeUserTokenErrors, RevokeUserTokenResponses, @@ -226,12 +312,28 @@ import type { SetGitlabBindingData, SetGitlabBindingErrors, SetGitlabBindingResponses, + SetLegacyLicenseData, + SetLegacyLicenseResponses, + SetLicenseData, + SetLicenseResponses, + SetSeverityData, + SetSeverityResponses, ShowApplicationData, ShowApplicationErrors, ShowApplicationResponses, + SupportedRulesData, + SupportedRulesResponses, + TransitionIssueReleaseData, + TransitionIssueReleaseResponses, + Update1Data, + Update1Responses, + Update2Data, + Update2Responses, UpdateApplicationData, UpdateApplicationErrors, UpdateApplicationResponses, + UpdateAssigneeData, + UpdateAssigneeResponses, UpdateAzureAlmSettingData, UpdateAzureAlmSettingErrors, UpdateAzureAlmSettingResponses, @@ -241,6 +343,9 @@ import type { UpdateBitbucketcloudAlmSettingData, UpdateBitbucketcloudAlmSettingErrors, UpdateBitbucketcloudAlmSettingResponses, + UpdateCommentData, + UpdateCommentResponses, + UpdateData, UpdateEmailConfigurationData, UpdateEmailConfigurationResponses, UpdateFeatureEnablement1Data, @@ -263,16 +368,65 @@ import type { UpdateMapping1Responses, UpdateMappingData, UpdateMappingResponses, + UpdateResponses, UpdateUserData, UpdateUserResponses, + UploadLicenseData, + UploadLicenseResponses, ValidateAlmBindingData, ValidateAlmBindingErrors, ValidateAlmBindingResponses, ValidateAlmSettingData, ValidateAlmSettingErrors, ValidateAlmSettingResponses, - 踼Data, - 踼Responses, + 絛1Data, + 絛1Responses, + 絛2Data, + 絛2Responses, + 絛Data, + 絛Responses, + 鲥10Data, + 鲥10Responses, + 鲥11Data, + 鲥11Responses, + 鲥12Data, + 鲥12Responses, + 鲥13Data, + 鲥13Responses, + 鲥14Data, + 鲥14Responses, + 鲥15Data, + 鲥15Responses, + 鲥16Data, + 鲥16Responses, + 鲥17Data, + 鲥17Responses, + 鲥18Data, + 鲥18Responses, + 鲥19Data, + 鲥19Responses, + 鲥1Data, + 鲥1Responses, + 鲥20Data, + 鲥20Responses, + 鲥2Data, + 鲥2Responses, + 鲥3Data, + 鲥3Responses, + 鲥4Data, + 鲥4Responses, + 鲥5Data, + 鲥5Responses, + 鲥6Data, + 鲥6Responses, + 鲥7Data, + 鲥7Responses, + 鲥8Data, + 鲥8Responses, + 鲥9Data, + 鲥9Responses, + 鲥Data, + 鲥Responses, } from './types.gen'; export type Options< @@ -292,7 +446,7 @@ export type Options< meta?: Record; }; -export class UserController { +export class UsersManagement { /** * Users search * @@ -408,7 +562,7 @@ export class UserController { } } -export class EmailConfigurationController { +export class System { /** * Search email configurations * @@ -507,68 +661,75 @@ export class EmailConfigurationController { }, }); } -} -export class FeatureEnablementController { /** - * Starts a GitLab synchronization run. + * Gets the status of ongoing database migrations, if any + * + * Return the detailed status of ongoing database migrations including starting date. If no migration is ongoing or needed it is still possible to call this endpoint and receive appropriate information. */ - public static createAwarenessBannerClicked< - ThrowOnError extends boolean = false, - >(options: Options) { - return (options.client ?? client).post< - CreateAwarenessBannerClickedResponses, + public static getStatus( + options?: Options, + ) { + return (options?.client ?? client).get< + GetStatusResponses, unknown, ThrowOnError - >({ - url: '/v2/fix-suggestions/feature-enablements/awareness-banner-interactions', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v2/system/migrations-status', ...options }); } /** - * Fetch the Ai CodeFix feature enablement configurations + * Provide liveness of SonarQube, meant to be used as a liveness probe on Kubernetes + * + * Require 'Administer System' permission or authentication with passcode. + * + * When SonarQube is fully started, liveness check for database connectivity, Compute Engine status, and, except for DataCenter Edition, if ElasticSearch is Green or Yellow. + * + * When SonarQube is on Safe Mode (for example when a database migration is running), liveness check only for database connectivity + * */ - public static getFeatureEnablement1( - options?: Options, + public static livenessCheck( + options?: Options, ) { return (options?.client ?? client).get< - GetFeatureEnablement1Responses, + LivenessCheckResponses, + LivenessCheckErrors, + ThrowOnError + >({ url: '/v2/system/liveness', ...options }); + } + + public static getHealth( + options?: Options, + ) { + return (options?.client ?? client).get< + GetHealthResponses, unknown, ThrowOnError - >({ url: '/v2/fix-suggestions/feature-enablements', ...options }); + >({ url: '/v2/system/health', ...options }); } +} +export class LicenseProfiles { /** - * Enable/Disable the AI CodeFix feature at the instance or project level + * List license profiles + * + * List the license profiles that have been configured for use when evaluating license issues. + * */ - public static updateFeatureEnablement1( - options: Options, + public static index( + options?: Options, ) { - return (options.client ?? client).patch< - UpdateFeatureEnablement1Responses, + return (options?.client ?? client).get< + IndexResponses, unknown, ThrowOnError - >({ - url: '/v2/fix-suggestions/feature-enablements', - ...options, - headers: { - 'Content-Type': 'application/merge-patch+json', - ...options.headers, - }, - }); + >({ url: '/v2/sca/license-profiles', ...options }); } -} -export class FixSuggestionController { /** - * Suggest a fix for the given issueId + * Create new license profile + * + * Create a new license profile for projects to use when evaluating license issues. * - * Requires Code Viewer permission. */ public static create1( options: Options, @@ -578,7 +739,7 @@ export class FixSuggestionController { unknown, ThrowOnError >({ - url: '/v2/fix-suggestions/ai-suggestions', + url: '/v2/sca/license-profiles', ...options, headers: { 'Content-Type': 'application/json', @@ -586,56 +747,51 @@ export class FixSuggestionController { }, }); } -} -export class GitlabSynchronizationRunController { /** - * Starts a GitLab synchronization run. - * - * Adds a new GitLab synchronization run in the background tasks. Requires sys-admins permissions. + * Delete the license profile * + * Delete the license profile. */ - public static create2( - options?: Options, + public static delete( + options: Options, ) { - return (options?.client ?? client).post< - Create2Responses, + return (options.client ?? client).delete< + DeleteResponses, unknown, ThrowOnError - >({ url: '/v2/dop-translation/gitlab-synchronization-runs', ...options }); + >({ url: '/v2/sca/license-profiles/{license-profile-key}', ...options }); } -} -export class GitlabPermissionMappingsController { /** - * Fetch permissions mapping + * Get the license policy for a given profile + * + * Get the license policy for a given profile. * - * Get the list of all the existing roles with their permission mappings. Requires 'Administer System' permission. */ - public static fetchAll( - options?: Options, + public static get1( + options: Options, ) { - return (options?.client ?? client).get< - FetchAllResponses, - unknown, - ThrowOnError - >({ url: '/v2/dop-translation/gitlab-permission-mappings', ...options }); + return (options.client ?? client).get( + { url: '/v2/sca/license-profiles/{license-profile-key}', ...options }, + ); } /** - * Create a permission mapping for a custom role + * Update the license profile + * + * Update the license profile for projects to use when evaluating license issues. * - * Requires 'Administer System' permission. */ - public static createMapping( - options: Options, + public static update( + options: Options, ) { - return (options.client ?? client).post< - CreateMappingResponses, + return (options.client ?? client).patch< + UpdateResponses, unknown, ThrowOnError >({ - url: '/v2/dop-translation/gitlab-permission-mappings', + url: '/v2/sca/license-profiles/{license-profile-key}', ...options, headers: { 'Content-Type': 'application/json', @@ -645,82 +801,66 @@ export class GitlabPermissionMappingsController { } /** - * Delete a single permission mappings + * Update the policy for a single license + * + * Update the policy for a single license in the license profile. * - * Requires 'Administer System' permission. */ - public static deleteMapping( - options: Options, + public static patchLicense( + options: Options, ) { - return (options.client ?? client).delete< - DeleteMappingResponses, + return (options.client ?? client).patch< + PatchLicenseResponses, unknown, ThrowOnError >({ - url: '/v2/dop-translation/gitlab-permission-mappings/{role}', + url: '/v2/sca/license-profiles/{license-profile-key}/licenses/{license-policy-id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); } /** - * Update a single permission mapping + * Update the policy for a license category + * + * Update the policy for an entire category in the license profile. * - * Requires 'Administer System' permission. */ - public static updateMapping( - options: Options, + public static patchCategory( + options: Options, ) { return (options.client ?? client).patch< - UpdateMappingResponses, + PatchCategoryResponses, unknown, ThrowOnError >({ - url: '/v2/dop-translation/gitlab-permission-mappings/{role}', + url: '/v2/sca/license-profiles/{license-profile-key}/categories/{category-key}', ...options, headers: { - 'Content-Type': 'application/merge-patch+json', + 'Content-Type': 'application/json', ...options.headers, }, }); } -} - -export class GitlabConfigurationController { - /** - * Search GitLab configs - * - * Get the list of GitLab configurations. - * Note that a single configuration is supported at this time. - * Requires 'Administer System' permission. - * - */ - public static searchGitlabConfiguration( - options?: Options, - ) { - return (options?.client ?? client).get< - SearchGitlabConfigurationResponses, - unknown, - ThrowOnError - >({ url: '/v2/dop-translation/gitlab-configurations', ...options }); - } /** - * Create Gitlab configuration + * Assign project to license profile * - * Create a new Gitlab configuration. - * Note that only a single configuration can exist at a time. - * Requires 'Administer System' permission. + * Configure which license profile should be used when analyzing a project for license issues. * */ - public static create3( - options: Options, + public static update1( + options: Options, ) { - return (options.client ?? client).post< - Create3Responses, + return (options.client ?? client).patch< + Update1Responses, unknown, ThrowOnError >({ - url: '/v2/dop-translation/gitlab-configurations', + url: '/v2/sca/license-profiles/assigned-projects', ...options, headers: { 'Content-Type': 'application/json', @@ -730,92 +870,112 @@ export class GitlabConfigurationController { } /** - * Delete a GitLab configuration + * License profile assignable projects * - * Delete a GitLab configuration. - * Requires 'Administer System' permission. + * List the projects that can be assigned to the license profile. Assigning the + * project to a license profile will cause that license profile to be used when + * analyzing the project for license issues. * */ - public static deleteGitlabConfiguration( - options: Options, + public static index1( + options: Options, ) { - return (options.client ?? client).delete< - DeleteGitlabConfigurationResponses, + return (options.client ?? client).get< + Index1Responses, unknown, ThrowOnError - >({ url: '/v2/dop-translation/gitlab-configurations/{id}', ...options }); + >({ url: '/v2/sca/license-profiles/assignable-projects', ...options }); } /** - * Fetch a GitLab configuration + * Remove the project's assignment to the license profile. * - * Fetch a GitLab configuration. Requires 'Administer System' permission. + * Remove the project's assignment to the license profile. If there is a default license profile, + * it will be used to analyze license issues for this project. * */ - public static getGitlabConfiguration( - options: Options, + public static delete2( + options: Options, ) { - return (options.client ?? client).get< - GetGitlabConfigurationResponses, + return (options.client ?? client).delete< + Delete2Responses, unknown, ThrowOnError - >({ url: '/v2/dop-translation/gitlab-configurations/{id}', ...options }); + >({ + url: '/v2/sca/license-profiles/assigned-projects/{project-key}', + ...options, + }); } +} +export class IssuesReleases { /** - * Update a Gitlab configuration + * Update the assignee of an (issue,release) pair * - * Update a Gitlab configuration. Requires 'Administer System' permission. + * Update the assignee of an (issue,release) pair (dependency risk). + * + * This is an internal API and is subject to change without notice. * */ - public static updateGitlabConfiguration( - options: Options, + public static updateAssignee( + options: Options, ) { - return (options.client ?? client).patch< - UpdateGitlabConfigurationResponses, + return (options.client ?? client).post< + UpdateAssigneeResponses, unknown, ThrowOnError >({ - url: '/v2/dop-translation/gitlab-configurations/{id}', + url: '/v2/sca/issues-releases/update-assignee', ...options, headers: { - 'Content-Type': 'application/merge-patch+json', + 'Content-Type': 'application/json', ...options.headers, }, }); } -} -export class GithubPermissionMappingsController { /** - * Fetch permissions mapping + * Manually change the severity of an issue-release pair + * + * Change the severity of a (issue,release) pair (dependency risk). + * + * This is an internal API and is subject to change without notice. * - * Get the list of all the existing roles with their permission mappings. Requires 'Administer System' permission. */ - public static fetchAll1( - options?: Options, + public static setSeverity( + options: Options, ) { - return (options?.client ?? client).get< - FetchAll1Responses, + return (options.client ?? client).post< + SetSeverityResponses, unknown, ThrowOnError - >({ url: '/v2/dop-translation/github-permission-mappings', ...options }); + >({ + url: '/v2/sca/issues-releases/set-severity', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); } /** - * Create a permission mapping for a custom role + * Dismiss the increased severity warning for an issue-release pair after reviewing the warning + * + * Dismiss the increased severity warning for an (issue,release) pair (dependency risk) after reviewing the warning. + * + * This is an internal API and is subject to change without notice. * - * Requires 'Administer System' permission. */ - public static createMapping1( - options: Options, + public static clearSeverityWarning( + options: Options, ) { return (options.client ?? client).post< - CreateMapping1Responses, + ClearSeverityWarningResponses, unknown, ThrowOnError >({ - url: '/v2/dop-translation/github-permission-mappings', + url: '/v2/sca/issues-releases/clear-severity-warning', ...options, headers: { 'Content-Type': 'application/json', @@ -825,55 +985,1159 @@ export class GithubPermissionMappingsController { } /** - * Delete a single permission mappings + * Transition an issue-release pair to a new status + * + * Transition a single (issue,release) pair (dependency risk) to a new status with a comment about why the status is changing. + * + * This is an internal API and is subject to change without notice. * - * Requires 'Administer System' permission. */ - public static deleteMapping1( - options: Options, + public static transitionIssueRelease( + options: Options, ) { - return (options.client ?? client).delete< - DeleteMapping1Responses, + return (options.client ?? client).post< + TransitionIssueReleaseResponses, unknown, ThrowOnError >({ - url: '/v2/dop-translation/github-permission-mappings/{role}', + url: '/v2/sca/issues-releases/change-status', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); } /** - * Update a single permission mapping + * Add a comment to an issue-release pair + * + * Add a comment to a (issue,release) pair (dependency risk). + * + * This is an internal API and is subject to change without notice. * - * Requires 'Administer System' permission. */ - public static updateMapping1( - options: Options, + public static addComment( + options: Options, ) { - return (options.client ?? client).patch< - UpdateMapping1Responses, + return (options.client ?? client).post< + AddCommentResponses, unknown, ThrowOnError >({ - url: '/v2/dop-translation/github-permission-mappings/{role}', + url: '/v2/sca/issues-releases/add-comment', ...options, headers: { - 'Content-Type': 'application/merge-patch+json', + 'Content-Type': 'application/json', ...options.headers, }, }); } -} -export class GithubConfigurationController { /** - * Search GitHub configs + * Delete a comment from an issue-release pair * - * Get the list of GitHub configurations. - * Note that a single configuration is supported at this time. - * Requires 'Administer System' permission. + * Delete a comment from a (issue,release) pair (dependency risk). * - */ + * This is an internal API and is subject to change without notice. + * + */ + public static deleteComment( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteCommentResponses, + unknown, + ThrowOnError + >({ url: '/v2/sca/issues-releases/{key}/changelog', ...options }); + } + + /** + * Get the changelog for a single issue-release pair + * + * Get the changelog for a single (issue,release) pair (dependency risk), using the key from the search endpoint. + * + * This is an internal API and is subject to change without notice. + * + */ + public static getChangelog( + options: Options, + ) { + return (options.client ?? client).get< + GetChangelogResponses, + unknown, + ThrowOnError + >({ url: '/v2/sca/issues-releases/{key}/changelog', ...options }); + } + + /** + * Update a comment on an issue-release pair + * + * Update a comment on a (issue,release) pair (dependency risk). + * + * This is an internal API and is subject to change without notice. + * + */ + public static updateComment( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateCommentResponses, + unknown, + ThrowOnError + >({ + url: '/v2/sca/issues-releases/{key}/changelog', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Search for issue-release pairs + * + * Search for software composition analysis issues (dependency risks) + * of a project, paired with releases that appear in the analyzed + * project, application, or portfolio. + * + * This endpoint returns one result for each (issue,release) pair, + * rather than one result for each distinct issue. So for example + * if a library uses two different versions of a package and + * both versions are affected by the same vulnerability, you will + * get two results not one. + * + * However each result may appear in multiple files or scopes that + * all use the same version of the affected package. + * + * In the terminology of this endpoint, a "release" is a version of + * a package like "lodash 1.2.3", an "issue" is a problem such as + * "CVE-1234", and a "dependency" is a specific file and scope that + * pulls in the release such as "subproject/pom.xml test". + * + * This is an internal API and is subject to change without notice. + * + */ + public static search4( + options: Options, + ) { + return (options.client ?? client).get< + Search4Responses, + unknown, + ThrowOnError + >({ url: '/v2/sca/issues-releases', ...options }); + } + + /** + * Get a single issue-release pair + * + * Fetch a single (issue,release) pair (dependency risk), using the key from the search endpoint. + * + * This is an internal API and is subject to change without notice. + * + */ + public static fetchIssueRelease( + options: Options, + ) { + return (options.client ?? client).get< + FetchIssueReleaseResponses, + unknown, + ThrowOnError + >({ url: '/v2/sca/issues-releases/{key}', ...options }); + } + + /** + * Get the list of users assigned to at least one issue in a given branch + * + * Get the list of users assigned to at least one issue in a given branch. + * + */ + public static getAllAssignees( + options: Options, + ) { + return (options.client ?? client).get< + GetAllAssigneesResponses, + unknown, + ThrowOnError + >({ url: '/v2/sca/issues-releases/all-assignees', ...options }); + } +} + +export class MarketplaceAzure { + /** + * Bills user's Azure account with the cost of SonarQube Server license + * + * Used by admin to bill user's Azure account with the cost of SonarQube Server license. + */ + public static billAzureAccount( + options?: Options, + ) { + return (options?.client ?? client).post< + BillAzureAccountResponses, + unknown, + ThrowOnError + >({ url: '/v2/marketplace/azure/billing', ...options }); + } +} + +export class Jira { + /** + * Delete Jira work items + * + * Delete the Jira work items associated with a specific resource. + * + */ + public static 絛( + options: Options<絛Data, ThrowOnError>, + ) { + return (options.client ?? client).delete< + 絛Responses, + unknown, + ThrowOnError + >({ url: '/v2/jira/work-items', ...options }); + } + + /** + * Fetch Jira work items + * + * Fetch the Jira work items for a specific Sonar project and resource. + * Accepts only authenticated requests. + * + */ + public static 鲥( + options: Options<鲥Data, ThrowOnError>, + ) { + return (options.client ?? client).get<鲥Responses, unknown, ThrowOnError>({ + url: '/v2/jira/work-items', + ...options, + }); + } + + /** + * Create Jira work item + * + * Create a Jira work item for a specific resource. + * Accepts only authenticated requests with issue administration permission. + * + */ + public static 鲥1( + options: Options<鲥1Data, ThrowOnError>, + ) { + return (options.client ?? client).post<鲥1Responses, unknown, ThrowOnError>( + { + url: '/v2/jira/work-items', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }, + ); + } + + /** + * Delete Jira project binding + * + * Delete the Jira project binding for a specific Sonar project. + * Accepts only authenticated requests. + * + */ + public static 絛1( + options: Options<絛1Data, ThrowOnError>, + ) { + return (options.client ?? client).delete< + 絛1Responses, + unknown, + ThrowOnError + >({ url: '/v2/jira/project-bindings', ...options }); + } + + /** + * Fetch Jira project bindings + * + * Fetch the Jira project binding for a specific Sonar project. + * Accepts only authenticated requests. + * + */ + public static 鲥2( + options: Options<鲥2Data, ThrowOnError>, + ) { + return (options.client ?? client).get<鲥2Responses, unknown, ThrowOnError>({ + url: '/v2/jira/project-bindings', + ...options, + }); + } + + /** + * Update Jira project binding + * + * Update an existing Jira project binding for a specific Sonar project. + * Accepts only authenticated requests. + * + */ + public static 鲥4( + options: Options<鲥4Data, ThrowOnError>, + ) { + return (options.client ?? client).patch< + 鲥4Responses, + unknown, + ThrowOnError + >({ + url: '/v2/jira/project-bindings', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Create or update Jira project binding + * + * Create or update a Jira project binding for a specific Sonar project. + * Accepts only authenticated requests. + * + */ + public static 鲥3( + options: Options<鲥3Data, ThrowOnError>, + ) { + return (options.client ?? client).post<鲥3Responses, unknown, ThrowOnError>( + { + url: '/v2/jira/project-bindings', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }, + ); + } + + /** + * Delete the Jira instance binding + * + * Deletes the Jira instance binding from the database. + * Requires global administrator permission. + * + */ + public static 鲥6( + options: Options<鲥6Data, ThrowOnError>, + ) { + return (options.client ?? client).delete< + 鲥6Responses, + unknown, + ThrowOnError + >({ url: '/v2/jira/organization-bindings', ...options }); + } + + /** + * Fetch the Jira instance binding + * + * Fetch the Jira instance binding. + * Requires global administrator permission. + * + */ + public static 絛2( + options: Options<絛2Data, ThrowOnError>, + ) { + return (options.client ?? client).get<絛2Responses, unknown, ThrowOnError>({ + responseTransformer: 絛2ResponseTransformer, + url: '/v2/jira/organization-bindings', + ...options, + }); + } + + /** + * Binds the specified pending instance binding with the specified jira cloud ID + * + * Binds the specified pending instance binding with the specified jira cloud ID + * + */ + public static 鲥7( + options: Options<鲥7Data, ThrowOnError>, + ) { + return (options.client ?? client).patch< + 鲥7Responses, + unknown, + ThrowOnError + >({ + responseTransformer: 鲥7ResponseTransformer, + url: '/v2/jira/organization-bindings', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Create a new Jira instance binding + * + * Receives the 3LO state and authorization code parameters and attempts to create an instance binding. + * If successful, returns the binding. Otherwise, returns a list of available resources. + * Requires global administrator permission. + * + */ + public static 鲥5( + options: Options<鲥5Data, ThrowOnError>, + ) { + return (options.client ?? client).post<鲥5Responses, unknown, ThrowOnError>( + { + responseTransformer: 鲥5ResponseTransformer, + url: '/v2/jira/organization-bindings', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }, + ); + } + + /** + * Returns a list of all the available Jira work types for a specific Jira project + * + * Returns a list of all the available Jira work types for a specific Jira project. + * Also checks which work types are selected for a given sonar project. Conditionally, also includes field metadata. + * + */ + public static 鲥10( + options: Options<鲥10Data, ThrowOnError>, + ) { + return (options.client ?? client).get<鲥10Responses, unknown, ThrowOnError>( + { url: '/v2/jira/work-types', ...options }, + ); + } + + /** + * Saves the selected Jira work types for a project + * + * Receives a Jira project key and a list of work type and stores the work types. + * + */ + public static 鲥11( + options: Options<鲥11Data, ThrowOnError>, + ) { + return (options.client ?? client).patch< + 鲥11Responses, + unknown, + ThrowOnError + >({ + url: '/v2/jira/work-types', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * TODO + * + * TODO + * + */ + public static 鲥12( + options: Options<鲥12Data, ThrowOnError>, + ) { + return (options.client ?? client).patch< + 鲥12Responses, + unknown, + ThrowOnError + >({ + responseTransformer: 鲥12ResponseTransformer, + url: '/v2/jira/organization-binding-edit', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Returns a list of available user actions for a project + * + * Returns a list of available user actions for the authenticated user in the context of a specific project. + * If the user is not authenticated, returns an empty list. + * + */ + public static 鲥14( + options: Options<鲥14Data, ThrowOnError>, + ) { + return (options.client ?? client).get<鲥14Responses, unknown, ThrowOnError>( + { url: '/v2/jira/user-actions', ...options }, + ); + } + + /** + * Returns a list of all the available Jira projects + * + * Returns a list of all the available Jira projects + */ + public static 鲥15( + options: Options<鲥15Data, ThrowOnError>, + ) { + return (options.client ?? client).get<鲥15Responses, unknown, ThrowOnError>( + { url: '/v2/jira/projects', ...options }, + ); + } + + /** + * Count linked Jira issues + * + * Count the number of Jira issues linked to a specific Sonar project. + * Accepts only authenticated requests. + * + */ + public static 鲥16( + options: Options<鲥16Data, ThrowOnError>, + ) { + return (options.client ?? client).get<鲥16Responses, unknown, ThrowOnError>( + { url: '/v2/jira/linked-issues-count/{sonarProjectId}', ...options }, + ); + } +} + +export class SlackUserBindings { + /** + * Create Slack user binding + * + * Creates a new user binding between a SonarQube user and their Slack account. + * This endpoint is used during the Slack OAuth flow when users connect their accounts + * via the /sonarqube-server connect slash command. + * + */ + public static createUserBinding( + options: Options, + ) { + return (options.client ?? client).post< + CreateUserBindingResponses, + CreateUserBindingErrors, + ThrowOnError + >({ + responseTransformer: createUserBindingResponseTransformer, + url: '/v2/integrations/user-bindings', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Get Slack user binding + * + * Retrieves a Slack user binding by its ID. Users can only access their own bindings + * unless they have administrative privileges. + * + */ + public static getUserBinding( + options?: Options, + ) { + return (options?.client ?? client).get< + GetUserBindingResponses, + GetUserBindingErrors, + ThrowOnError + >({ + responseTransformer: getUserBindingResponseTransformer, + url: '/v2/integrations/user-bindings/{id}', + ...options, + }); + } +} + +export class SlackSlashCommandController { + /** + * Handle Slack Slash Commands + * + * Handles incoming Slack slash command requests and command processing. + * The request body is form-encoded and contains command details. Signature validation is performed via + * SlackSlashCommandSignatureValidationAdvice before reaching this controller. + * + */ + public static handleSlashCommand( + options: Options, + ) { + return (options.client ?? client).post< + HandleSlashCommandResponses, + unknown, + ThrowOnError + >({ + ...urlSearchParamsBodySerializer, + url: '/v2/integrations/slack/slash-commands', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options.headers, + }, + }); + } +} + +export class SlackEventController { + /** + * Handle Slack Events API + * + * Handles incoming Slack Events API requests including URL verification and workspace lifecycle events. + * The request body is JSON and contains event details. Signature validation is performed via + * SlackEventsSignatureValidationAdvice before reaching this controller. + * + */ + public static handleEvent( + options: Options, + ) { + return (options.client ?? client).post< + HandleEventResponses, + unknown, + ThrowOnError + >({ + url: '/v2/integrations/slack/events', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } +} + +export class IntegrationConfigurationsController { + /** + * Get integration configurations. + * + * Requires global administrator permission. + */ + public static get( + options: Options, + ) { + return (options.client ?? client).get({ + url: '/v2/integrations/integration-configurations', + ...options, + }); + } + + /** + * Create a configuration for an integration. + * + * Requires global administrator permission. + */ + public static create2( + options: Options, + ) { + return (options.client ?? client).post< + Create2Responses, + unknown, + ThrowOnError + >({ + url: '/v2/integrations/integration-configurations', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Delete an integration configuration and all its related data. + * + * Requires global administrator permission. + * This will permanently delete the integration configuration, all associated workspaces, user bindings, and subscriptions. + * + */ + public static delete1( + options: Options, + ) { + return (options.client ?? client).delete< + Delete1Responses, + unknown, + ThrowOnError + >({ url: '/v2/integrations/integration-configurations/{id}', ...options }); + } + + /** + * Update an integration configuration. + * + * Requires global administrator permission. + */ + public static update2( + options: Options, + ) { + return (options.client ?? client).patch< + Update2Responses, + unknown, + ThrowOnError + >({ + url: '/v2/integrations/integration-configurations/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } +} + +export class FixSuggestions { + /** + * Starts a GitLab synchronization run. + */ + public static createAwarenessBannerClicked< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).post< + CreateAwarenessBannerClickedResponses, + unknown, + ThrowOnError + >({ + url: '/v2/fix-suggestions/feature-enablements/awareness-banner-interactions', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Suggest a fix for the given issueId + * + * Requires Code Viewer permission. + */ + public static create3( + options: Options, + ) { + return (options.client ?? client).post< + Create3Responses, + unknown, + ThrowOnError + >({ + url: '/v2/fix-suggestions/ai-suggestions', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Fetch the Ai CodeFix feature enablement configurations + */ + public static getFeatureEnablement1( + options?: Options, + ) { + return (options?.client ?? client).get< + GetFeatureEnablement1Responses, + unknown, + ThrowOnError + >({ url: '/v2/fix-suggestions/feature-enablements', ...options }); + } + + /** + * Enable/Disable the AI CodeFix feature at the instance or project level + */ + public static updateFeatureEnablement1( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateFeatureEnablement1Responses, + unknown, + ThrowOnError + >({ + url: '/v2/fix-suggestions/feature-enablements', + ...options, + headers: { + 'Content-Type': 'application/merge-patch+json', + ...options.headers, + }, + }); + } + + /** + * Get the supported rules + * + * Returns the list of rules for which a fix suggestion can be generated + */ + public static supportedRules( + options?: Options, + ) { + return (options?.client ?? client).get< + SupportedRulesResponses, + unknown, + ThrowOnError + >({ url: '/v2/fix-suggestions/supported-rules', ...options }); + } + + /** + * Get the supported LLM providers + * + * Returns the LLM providers that could be used for requesting an AI fix suggestion + */ + public static getLlmProviders( + options?: Options, + ) { + return (options?.client ?? client).get< + GetLlmProvidersResponses, + unknown, + ThrowOnError + >({ url: '/v2/fix-suggestions/supported-llm-providers', ...options }); + } + + /** + * Request status of AI CodeFix service + */ + public static get2( + options?: Options, + ) { + return (options?.client ?? client).get< + Get2Responses, + unknown, + ThrowOnError + >({ url: '/v2/fix-suggestions/service-info', ...options }); + } + + /** + * Fetch AI suggestion availability for the given issueId + * + * Requires Code Viewer permission. + */ + public static get3( + options: Options, + ) { + return (options.client ?? client).get( + { url: '/v2/fix-suggestions/issues/{issueId}', ...options }, + ); + } +} + +export class Entitlements { + /** + * Sets the license + * + * Only third party license keys are accepted. + * Requires 'Administer System' permission. + * + */ + public static setLicense( + options: Options, + ) { + return (options.client ?? client).post< + SetLicenseResponses, + unknown, + ThrowOnError + >({ + url: '/v2/entitlements/online-activation', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Deactivates offline license + * + * This method is for users who activated the license using offline method. It should be used to + * fully deactivate the license (i.e. in cases of migrating the installation to a new server). + * + */ + public static deactivateLicense( + options?: Options, + ) { + return (options?.client ?? client).post< + DeactivateLicenseResponses, + unknown, + ThrowOnError + >({ url: '/v2/entitlements/offline-deactivation', ...options }); + } + + /** + * Retrieve a valid .req file for offline activation + * + * Retrieves a .req file for offline activation of a license. + * Requires 'Administer System' permission. + * + */ + public static retrieveRequestFile( + options: Options, + ) { + return (options.client ?? client).get< + RetrieveRequestFileResponses, + unknown, + ThrowOnError + >({ url: '/v2/entitlements/offline-activation', ...options }); + } + + /** + * Uploads a license + * + * The content of the request body should be the text of the license file, along with a valid license key. + * Requires 'Administer System' permission. + * + */ + public static uploadLicense( + options: Options, + ) { + return (options.client ?? client).post< + UploadLicenseResponses, + unknown, + ThrowOnError + >({ + url: '/v2/entitlements/offline-activation', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Sets the license + * + * Only license keys received from Sonar are accepted. + * Requires 'Administer System' permission. + * + */ + public static setLegacyLicense( + options: Options, + ) { + return (options.client ?? client).post< + SetLegacyLicenseResponses, + unknown, + ThrowOnError + >({ + url: '/v2/entitlements/legacy-activation', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Deletes the existing license + * + * Deletes the license. Both license keys received from Sonar and from 3rd party system can be removed. + * Requires 'Administer System' permission. + * + */ + public static deleteLicense( + options?: Options, + ) { + return (options?.client ?? client).delete< + DeleteLicenseResponses, + unknown, + ThrowOnError + >({ url: '/v2/entitlements/license', ...options }); + } + + /** + * Returns information about the license + * + * Returns information about the current license. + * Requires 'Administer System' permission. + * + */ + public static getLicense( + options?: Options, + ) { + return (options?.client ?? client).get< + GetLicenseResponses, + unknown, + ThrowOnError + >({ + responseTransformer: getLicenseResponseTransformer, + url: '/v2/entitlements/license', + ...options, + }); + } + + /** + * Refreshes the existing license + * + * Fetches the latest information about the license and updates it on the SonarQube Server instance. + * Requires 'Administer System' permission. + * + */ + public static refreshLicense( + options?: Options, + ) { + return (options?.client ?? client).patch< + RefreshLicenseResponses, + unknown, + ThrowOnError + >({ url: '/v2/entitlements/license', ...options }); + } + + /** + * Returns a list of all available purchasable features for this edition + * + * Returns a list of all available purchasable features for this edition including the ones who are already purchased + * + */ + public static getPurchasableFeatures( + options?: Options, + ) { + return (options?.client ?? client).get< + GetPurchasableFeaturesResponses, + unknown, + ThrowOnError + >({ url: '/v2/entitlements/purchasable-features', ...options }); + } +} + +export class DopTranslation { + /** + * Starts a GitLab synchronization run. + * + * Adds a new GitLab synchronization run in the background tasks. Requires sys-admins permissions. + * + */ + public static create4( + options?: Options, + ) { + return (options?.client ?? client).post< + Create4Responses, + unknown, + ThrowOnError + >({ url: '/v2/dop-translation/gitlab-synchronization-runs', ...options }); + } + + /** + * Fetch permissions mapping + * + * Get the list of all the existing roles with their permission mappings. Requires 'Administer System' permission. + */ + public static fetchAll( + options?: Options, + ) { + return (options?.client ?? client).get< + FetchAllResponses, + unknown, + ThrowOnError + >({ url: '/v2/dop-translation/gitlab-permission-mappings', ...options }); + } + + /** + * Create a permission mapping for a custom role + * + * Requires 'Administer System' permission. + */ + public static createMapping( + options: Options, + ) { + return (options.client ?? client).post< + CreateMappingResponses, + unknown, + ThrowOnError + >({ + url: '/v2/dop-translation/gitlab-permission-mappings', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Search GitLab configs + * + * Get the list of GitLab configurations. + * Note that a single configuration is supported at this time. + * Requires 'Administer System' permission. + * + */ + public static searchGitlabConfiguration( + options?: Options, + ) { + return (options?.client ?? client).get< + SearchGitlabConfigurationResponses, + unknown, + ThrowOnError + >({ url: '/v2/dop-translation/gitlab-configurations', ...options }); + } + + /** + * Create Gitlab configuration + * + * Create a new Gitlab configuration. + * Note that only a single configuration can exist at a time. + * Requires 'Administer System' permission. + * + */ + public static create5( + options: Options, + ) { + return (options.client ?? client).post< + Create5Responses, + unknown, + ThrowOnError + >({ + url: '/v2/dop-translation/gitlab-configurations', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Fetch permissions mapping + * + * Get the list of all the existing roles with their permission mappings. Requires 'Administer System' permission. + */ + public static fetchAll1( + options?: Options, + ) { + return (options?.client ?? client).get< + FetchAll1Responses, + unknown, + ThrowOnError + >({ url: '/v2/dop-translation/github-permission-mappings', ...options }); + } + + /** + * Create a permission mapping for a custom role + * + * Requires 'Administer System' permission. + */ + public static createMapping1( + options: Options, + ) { + return (options.client ?? client).post< + CreateMapping1Responses, + unknown, + ThrowOnError + >({ + url: '/v2/dop-translation/github-permission-mappings', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Search GitHub configs + * + * Get the list of GitHub configurations. + * Note that a single configuration is supported at this time. + * Requires 'Administer System' permission. + * + */ public static searchGithubConfiguration( options?: Options, ) { @@ -892,18 +2156,179 @@ export class GithubConfigurationController { * Requires 'Administer System' permission. * */ - public static createGithubConfiguration( - options: Options, + public static createGithubConfiguration( + options: Options, + ) { + return (options.client ?? client).post< + CreateGithubConfigurationResponses, + unknown, + ThrowOnError + >({ + url: '/v2/dop-translation/github-configurations', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Create a SonarQube project with the information from the provided DevOps platform project. + * + * Create a SonarQube project with the information from the provided DevOps platform project. + * Autoconfigure Pull-Request decoration mechanism. + * Requires the 'Create Projects' permission and setting a Personal Access Token with api/alm_integrations/set_pat for a user who will be using this endpoint + * + */ + public static createBoundProject( + options: Options, + ) { + return (options.client ?? client).post< + CreateBoundProjectResponses, + unknown, + ThrowOnError + >({ + url: '/v2/dop-translation/bound-projects', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + + /** + * Delete a single permission mappings + * + * Requires 'Administer System' permission. + */ + public static deleteMapping( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteMappingResponses, + unknown, + ThrowOnError + >({ + url: '/v2/dop-translation/gitlab-permission-mappings/{role}', + ...options, + }); + } + + /** + * Update a single permission mapping + * + * Requires 'Administer System' permission. + */ + public static updateMapping( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateMappingResponses, + unknown, + ThrowOnError + >({ + url: '/v2/dop-translation/gitlab-permission-mappings/{role}', + ...options, + headers: { + 'Content-Type': 'application/merge-patch+json', + ...options.headers, + }, + }); + } + + /** + * Delete a GitLab configuration + * + * Delete a GitLab configuration. + * Requires 'Administer System' permission. + * + */ + public static deleteGitlabConfiguration( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteGitlabConfigurationResponses, + unknown, + ThrowOnError + >({ url: '/v2/dop-translation/gitlab-configurations/{id}', ...options }); + } + + /** + * Fetch a GitLab configuration + * + * Fetch a GitLab configuration. Requires 'Administer System' permission. + * + */ + public static getGitlabConfiguration( + options: Options, + ) { + return (options.client ?? client).get< + GetGitlabConfigurationResponses, + unknown, + ThrowOnError + >({ url: '/v2/dop-translation/gitlab-configurations/{id}', ...options }); + } + + /** + * Update a Gitlab configuration + * + * Update a Gitlab configuration. Requires 'Administer System' permission. + * + */ + public static updateGitlabConfiguration( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateGitlabConfigurationResponses, + unknown, + ThrowOnError + >({ + url: '/v2/dop-translation/gitlab-configurations/{id}', + ...options, + headers: { + 'Content-Type': 'application/merge-patch+json', + ...options.headers, + }, + }); + } + + /** + * Delete a single permission mappings + * + * Requires 'Administer System' permission. + */ + public static deleteMapping1( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteMapping1Responses, + unknown, + ThrowOnError + >({ + url: '/v2/dop-translation/github-permission-mappings/{role}', + ...options, + }); + } + + /** + * Update a single permission mapping + * + * Requires 'Administer System' permission. + */ + public static updateMapping1( + options: Options, ) { - return (options.client ?? client).post< - CreateGithubConfigurationResponses, + return (options.client ?? client).patch< + UpdateMapping1Responses, unknown, ThrowOnError >({ - url: '/v2/dop-translation/github-configurations', + url: '/v2/dop-translation/github-permission-mappings/{role}', ...options, headers: { - 'Content-Type': 'application/json', + 'Content-Type': 'application/merge-patch+json', ...options.headers, }, }); @@ -964,26 +2389,66 @@ export class GithubConfigurationController { }, }); } + + /** + * Search across project bindings + */ + public static getProjectBindingByProjectId< + ThrowOnError extends boolean = false, + >(options?: Options) { + return (options?.client ?? client).get< + GetProjectBindingByProjectIdResponses, + unknown, + ThrowOnError + >({ url: '/v2/dop-translation/project-bindings', ...options }); + } + + /** + * Fetch a single Project Binding + */ + public static getProjectBinding( + options: Options, + ) { + return (options.client ?? client).get< + GetProjectBindingResponses, + unknown, + ThrowOnError + >({ url: '/v2/dop-translation/project-bindings/{id}', ...options }); + } + + /** + * List all DevOps Platform Integration settings + * + * Requires the 'Create Projects' permission + */ + public static fetchAllDopSettings( + options?: Options, + ) { + return (options?.client ?? client).get< + FetchAllDopSettingsResponses, + unknown, + ThrowOnError + >({ url: '/v2/dop-translation/dop-settings', ...options }); + } } -export class BoundProjectsController { +export class CleanCodePolicy { /** - * Create a SonarQube project with the information from the provided DevOps platform project. + * Custom rule creation * - * Create a SonarQube project with the information from the provided DevOps platform project. - * Autoconfigure Pull-Request decoration mechanism. - * Requires the 'Create Projects' permission and setting a Personal Access Token with api/alm_integrations/set_pat for a user who will be using this endpoint + * Create a custom rule. + * Requires the 'Administer Quality Profiles' permission. * */ - public static createBoundProject( - options: Options, + public static create6( + options: Options, ) { return (options.client ?? client).post< - CreateBoundProjectResponses, + Create6Responses, unknown, ThrowOnError >({ - url: '/v2/dop-translation/bound-projects', + url: '/v2/clean-code-policy/rules', ...options, headers: { 'Content-Type': 'application/json', @@ -991,25 +2456,39 @@ export class BoundProjectsController { }, }); } -} -export class RuleController { /** - * Custom rule creation + * Retrieve current instance Mode * - * Create a custom rule. - * Requires the 'Administer Quality Profiles' permission. + * Fetch the current instance mode. Can be Multi-Quality Rules (MQR) Mode or Standard Experience. * */ - public static create4( - options: Options, + public static getMode( + options?: Options, ) { - return (options.client ?? client).post< - Create4Responses, + return (options?.client ?? client).get< + GetModeResponses, + unknown, + ThrowOnError + >({ url: '/v2/clean-code-policy/mode', ...options }); + } + + /** + * Update current instance Mode + * + * Update the current instance mode. Can be Multi-Quality Rules (MQR) Mode or Standard Experience. + * Requires 'Administer System' permission. + * + */ + public static patchMode( + options: Options, + ) { + return (options.client ?? client).patch< + PatchModeResponses, unknown, ThrowOnError >({ - url: '/v2/clean-code-policy/rules', + url: '/v2/clean-code-policy/mode', ...options, headers: { 'Content-Type': 'application/json', @@ -1019,7 +2498,7 @@ export class RuleController { } } -export class GroupController { +export class Authorizations { /** * Group search * @@ -1042,11 +2521,11 @@ export class GroupController { * * Create a new group. */ - public static create5( - options: Options, + public static create7( + options: Options, ) { return (options.client ?? client).post< - Create5Responses, + Create7Responses, unknown, ThrowOnError >({ @@ -1059,6 +2538,44 @@ export class GroupController { }); } + /** + * Search across group memberships + * + * Get the list of groups and members matching the query. + * + */ + public static search2( + options?: Options, + ) { + return (options?.client ?? client).get< + Search2Responses, + unknown, + ThrowOnError + >({ url: '/v2/authorizations/group-memberships', ...options }); + } + + /** + * Add a group membership + * + * Add a user to a group. + */ + public static create8( + options: Options, + ) { + return (options.client ?? client).post< + Create8Responses, + unknown, + ThrowOnError + >({ + url: '/v2/authorizations/group-memberships', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } + /** * Deletes a group * @@ -1111,39 +2628,148 @@ export class GroupController { }, }); } + + /** + * Remove a group membership + * + * Remove a user from a group + */ + public static delete3( + options: Options, + ) { + return (options.client ?? client).delete< + Delete3Responses, + unknown, + ThrowOnError + >({ url: '/v2/authorizations/group-memberships/{id}', ...options }); + } } -export class GroupMembershipController { +export class Atlassian { /** - * Search across group memberships + * Fetch the Atlassian Authentication details if they exist * - * Get the list of groups and members matching the query. + * Fetch the Atlassian Authentication details if they exist. + * Specifically, only the client ID is returned for security purposes. * */ - public static search2( - options?: Options, + public static 鲥8( + options?: Options<鲥8Data, ThrowOnError>, + ) { + return (options?.client ?? client).get<鲥8Responses, unknown, ThrowOnError>( + { url: '/v2/atlassian/application-configuration', ...options }, + ); + } + + /** + * Create/Update the Atlassian Authentication details + * + * Create/Update the Atlassian Authentication details. + * + */ + public static 鲥9( + options: Options<鲥9Data, ThrowOnError>, + ) { + return (options.client ?? client).post<鲥9Responses, unknown, ThrowOnError>( + { + url: '/v2/atlassian/application-configuration', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }, + ); + } + + /** + * Generate Jira authentication URL + * + * Generate the authentication URL for Jira OAuth flow. + * Requires authenticated user. + * + */ + public static 鲥17( + options: Options<鲥17Data, ThrowOnError>, + ) { + return (options.client ?? client).get<鲥17Responses, unknown, ThrowOnError>( + { url: '/v2/atlassian/auth-url', ...options }, + ); + } +} + +export class FeatureEnablement { + /** + * Get the status of SCA feature opt-in (should only be used for the configuration UX in frontend) + */ + public static getFeatureEnablement( + options?: Options, ) { return (options?.client ?? client).get< - Search2Responses, + GetFeatureEnablementResponses, unknown, ThrowOnError - >({ url: '/v2/authorizations/group-memberships', ...options }); + >({ url: '/v2/sca/feature-enablements', ...options }); } /** - * Add a group membership + * Update SCA feature opt-in (should only be used for the configuration UX in frontend) + */ + public static updateFeatureEnablement( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateFeatureEnablementResponses, + unknown, + ThrowOnError + >({ + url: '/v2/sca/feature-enablements', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } +} + +export class Issues { + /** + * Fetch instance sandbox settings + * + * Fetch the current instance-level sandbox settings. + * Returns configuration including enabled status, default value, allowOverride setting, and software qualities or rule types based on current mode. + * Requires 'Administer System' permission. * - * Add a user to a group. */ - public static create6( - options: Options, + public static getSandboxSettings( + options?: Options, ) { - return (options.client ?? client).post< - Create6Responses, + return (options?.client ?? client).get< + GetSandboxSettingsResponses, + unknown, + ThrowOnError + >({ url: '/v2/issues/sandbox-settings', ...options }); + } + + /** + * Update instance sandbox settings + * + * Update the instance-level sandbox settings. + * Cannot enable sandbox without providing software qualities or rule types unless they already exist. + * When disabling allowOverride, all project-level software quality overrides are deleted. + * Requires 'Administer System' permission. + * + */ + public static patchSandboxSettings( + options: Options, + ) { + return (options.client ?? client).patch< + PatchSandboxSettingsResponses, unknown, ThrowOnError >({ - url: '/v2/authorizations/group-memberships', + url: '/v2/issues/sandbox-settings', ...options, headers: { 'Content-Type': 'application/json', @@ -1153,59 +2779,110 @@ export class GroupMembershipController { } /** - * Remove a group membership + * Fetch project sandbox settings * - * Remove a user from a group + * Fetch the sandbox settings for a specific project. + * Returns effective configuration including enabled status, software qualities overrides, and whether settings are inherited from instance or overridden at project level. + * Requires 'Administer Project' permission. + * + */ + public static getProjectSandboxSettings( + options: Options, + ) { + return (options.client ?? client).get< + GetProjectSandboxSettingsResponses, + unknown, + ThrowOnError + >({ url: '/v2/issues/sandbox-settings/{projectKey}', ...options }); + } + + /** + * Update project sandbox settings + * + * Update the sandbox settings for a specific project. + * The enabled setting can be changed independently of software quality overrides. + * When allowOverride is disabled at instance level, software quality changes are not allowed but enabled changes are still permitted. + * Setting overridden=false removes project-level software quality overrides to inherit from instance settings. + * Requires 'Administer Project' permission and instance sandbox must be enabled. + * + */ + public static patchProjectSandboxSettings< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).patch< + PatchProjectSandboxSettingsResponses, + unknown, + ThrowOnError + >({ + url: '/v2/issues/sandbox-settings/{projectKey}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + } +} + +export class SoftwareQualityReportsController { + /** + * Get accessibility report + * + * Get the accessibility report for a project branch. */ - public static delete( - options: Options, + public static 鲥13( + options: Options<鲥13Data, ThrowOnError>, ) { - return (options.client ?? client).delete< - DeleteResponses, - unknown, - ThrowOnError - >({ url: '/v2/authorizations/group-memberships/{id}', ...options }); + return (options.client ?? client).get<鲥13Responses, unknown, ThrowOnError>( + { url: '/v2/software-quality-reports/accessibility-reports', ...options }, + ); } } -export class K { +export class SelfTest { /** - * Get the status of SCA enablement + * Run a self test + * + * Run a self test that the dependency analysis (SCA) feature is enabled and + * able to reach the cloud services it relies on. + * + * This is an internal API and is subject to change without notice. + * */ - public static getFeatureEnablement( - options?: Options, + public static performSelfTest( + options?: Options, ) { return (options?.client ?? client).get< - GetFeatureEnablementResponses, + PerformSelfTestResponses, unknown, ThrowOnError - >({ url: '/v2/sca/feature-enablements', ...options }); + >({ url: '/v2/sca/self-test', ...options }); } /** - * Update SCA enablement settings + * Run a self test that Spring is configured as expected + * + * Run a self test that Spring is set up and working as we expect. + * + * This is an internal API and is subject to change without notice. + * */ - public static updateFeatureEnablement( - options: Options, - ) { - return (options.client ?? client).patch< - UpdateFeatureEnablementResponses, + public static performSpringConfigurationSelfTest< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).get< + PerformSpringConfigurationSelfTestResponses, unknown, ThrowOnError - >({ - url: '/v2/sca/feature-enablements', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v2/sca/self-test/spring-configuration', ...options }); } +} +export class SbomReports { /** * Get a software bill of materials (SBOM) report * - * Return a report based on the dependencies in this project's branch, using + * Return a report based on the dependencies in this component's branch, using * the type parameter and Accept header to select the report to generate. * * Right now, the available reports have specialized MIME types that @@ -1215,14 +2892,8 @@ export class K { * * JSON & XML * * SPDX 2.3: https://spdx.github.io/spdx-spec/v2.3/ * * JSON & XML - * - * Theoretically you could send just the MIME type for the format you wanted - * as the Accept header and get that report. However, there may be other - * formats that don't have a specific MIME type attached -- think two - * different flavors of a CSV report, for example. In that case, we still - * need a specific report type parameter to help differentiate more. - * - * This is an internal API and is subject to change without notice. + * * SPDX 3.0: https://spdx.github.io/spdx-spec/v3.0.1/ + * * JSON * */ public static generateReport( @@ -1234,12 +2905,32 @@ export class K { ThrowOnError >({ url: '/v2/sca/sbom-reports', ...options }); } +} + +export class RiskReports { + /** + * Get a report for all the current SCA dependency risks for a given component and branch + * + * Returns list of all risks for a given component and branch. CSV format is available by setting `Accept: text/csv` in your request headers. + * + */ + public static getReport( + options: Options, + ) { + return (options.client ?? client).get< + GetReportResponses, + unknown, + ThrowOnError + >({ url: '/v2/sca/risk-reports', ...options }); + } +} +export class Releases { /** * Search for releases * * Search for package releases that appear in the analyzed project, - * as determined by software composition analysis. + * application, or portfolio, as determined by software composition analysis. * * This endpoint returns one result for each release, * rather than one result for each time a release is pulled in. @@ -1293,62 +2984,37 @@ export class K { ThrowOnError >({ url: '/v2/sca/releases/{key}', ...options }); } +} +export class ScaEnabled { /** - * Search for issue-release pairs - * - * Search for software composition analysis issues (dependency risks) - * of a project, paired with releases that appear in the analyzed - * project. - * - * This endpoint returns one result for each (issue,release) pair, - * rather than one result for each distinct issue. So for example - * if a library uses two different versions of a package and - * both versions are affected by the same vulnerability, you will - * get two results not one. - * - * However each result may appear in multiple files or scopes that - * all use the same version of the affected package. - * - * In the terminology of this endpoint, a "release" is a version of - * a package like "lodash 1.2.3", an "issue" is a problem such as - * "CVE-1234", and a "dependency" is a specific file and scope that - * pulls in the release such as "subproject/pom.xml test". - * - * The dependencyRisks attribute in the result is deprecated; please - * use issuesReleases instead. - * - * This is an internal API and is subject to change without notice. - * + * Get whether SCA is licensed and set up for a resource's organization or enterprise, prefer the /feature-enabled path in new code */ - public static search4( - options: Options, + public static getFeatureEnabled( + options?: Options, ) { - return (options.client ?? client).get< - Search4Responses, + return (options?.client ?? client).get< + GetFeatureEnabledResponses, unknown, ThrowOnError - >({ url: '/v2/sca/issues-releases', ...options }); + >({ url: '/v2/sca/enabled', ...options }); } /** - * Get a single issue-release pair - * - * Fetch a single (issue,release) pair (dependency risk), using the key from the search endpoint. - * - * This is an internal API and is subject to change without notice. - * + * Get whether SCA is licensed and set up for a resource's organization or enterprise, prefer the /feature-enabled path in new code */ - public static fetchDependencyRisk( - options: Options, + public static getFeatureEnabled1( + options?: Options, ) { - return (options.client ?? client).get< - FetchDependencyRiskResponses, + return (options?.client ?? client).get< + GetFeatureEnabled1Responses, unknown, ThrowOnError - >({ url: '/v2/sca/issues-releases/{key}', ...options }); + >({ url: '/v2/sca/feature-enabled', ...options }); } +} +export class ScaClis { /** * Get available CLI downloads * @@ -1386,220 +3052,67 @@ export class K { ThrowOnError >({ url: '/v2/sca/clis/{id}', ...options }); } - - /** - * Find the file graph for this project branch and source. - */ - public static 踼( - options: Options<踼Data, ThrowOnError>, - ) { - return (options.client ?? client).get<踼Responses, unknown, ThrowOnError>({ - url: '/v2/architecture/file-graph', - ...options, - }); - } -} - -export class ModeController { - /** - * Retrieve current instance Mode - * - * Fetch the current instance mode. Can be Multi-Quality Rules (MQR) Mode or Standard Experience. - * - */ - public static getMode( - options?: Options, - ) { - return (options?.client ?? client).get< - GetModeResponses, - unknown, - ThrowOnError - >({ url: '/v2/clean-code-policy/mode', ...options }); - } - - /** - * Update current instance Mode - * - * Update the current instance mode. Can be Multi-Quality Rules (MQR) Mode or Standard Experience. - * Requires 'Administer System' permission. - * - */ - public static patchMode( - options: Options, - ) { - return (options.client ?? client).patch< - PatchModeResponses, - unknown, - ThrowOnError - >({ - url: '/v2/clean-code-policy/mode', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); - } -} - -export class DatabaseMigrationsController { - /** - * Gets the status of ongoing database migrations, if any - * - * Return the detailed status of ongoing database migrations including starting date. If no migration is ongoing or needed it is still possible to call this endpoint and receive appropriate information. - */ - public static getStatus( - options?: Options, - ) { - return (options?.client ?? client).get< - GetStatusResponses, - unknown, - ThrowOnError - >({ url: '/v2/system/migrations-status', ...options }); - } } -export class LivenessController { +export class Analyses { /** - * Provide liveness of SonarQube, meant to be used as a liveness probe on Kubernetes - * - * Require 'Administer System' permission or authentication with passcode. - * - * When SonarQube is fully started, liveness check for database connectivity, Compute Engine status, and, except for DataCenter Edition, if ElasticSearch is Green or Yellow. + * Fetch analysis status for one branch * - * When SonarQube is on Safe Mode (for example when a database migration is running), liveness check only for database connectivity + * Fetch analysis status information for a branch. If the branch has + * never been analyzed, will return a status of 404. * - */ - public static livenessCheck( - options?: Options, - ) { - return (options?.client ?? client).get< - LivenessCheckResponses, - LivenessCheckErrors, - ThrowOnError - >({ url: '/v2/system/liveness', ...options }); - } -} - -export class HealthController { - public static getHealth( - options?: Options, - ) { - return (options?.client ?? client).get< - GetHealthResponses, - unknown, - ThrowOnError - >({ url: '/v2/system/health', ...options }); - } -} - -export class SupportedLlmProviderController { - /** - * Get the supported LLM providers + * This is an internal API and is subject to change without notice. * - * Returns the LLM providers that could be used for requesting an AI fix suggestion */ - public static getLlmProviders( - options?: Options, + public static fetchAnalysis( + options: Options, ) { - return (options?.client ?? client).get< - GetLlmProvidersResponses, + return (options.client ?? client).get< + FetchAnalysisResponses, unknown, ThrowOnError - >({ url: '/v2/fix-suggestions/supported-llm-providers', ...options }); + >({ url: '/v2/sca/analyses', ...options }); } } -export class ServiceInfoController { +export class Architecture { /** - * Request status and subscription information of AI CodeFix service + * Search all current graphs available for a branch. This endpoint do not includes graph Data itself */ - public static get( - options?: Options, + public static 鲥18( + options: Options<鲥18Data, ThrowOnError>, ) { - return (options?.client ?? client).get( - { url: '/v2/fix-suggestions/service-info', ...options }, + return (options.client ?? client).get<鲥18Responses, unknown, ThrowOnError>( + { url: '/v2/architecture/graphs', ...options }, ); } /** - * Request subscription information of AI CodeFix service - */ - public static getSubscriptionType( - options?: Options, - ) { - return (options?.client ?? client).get< - GetSubscriptionTypeResponses, - unknown, - ThrowOnError - >({ - url: '/v2/fix-suggestions/service-info/subscription-type', - ...options, - }); - } -} - -export class FixSuggestionIssueController { - /** - * Fetch AI suggestion availability for the given issueId + * Get graph data by id. * - * Requires Code Viewer permission. + * Fetch the graph data produced by analysis. */ - public static get1( - options: Options, + public static 鲥19( + options: Options<鲥19Data, ThrowOnError>, ) { - return (options.client ?? client).get( - { url: '/v2/fix-suggestions/issues/{issueId}', ...options }, + return (options.client ?? client).get<鲥19Responses, unknown, ThrowOnError>( + { url: '/v2/architecture/graphs/{id}', ...options }, ); } -} - -export class ProjectBindingsController { - /** - * Search across project bindings - */ - public static getProjectBindingByProjectId< - ThrowOnError extends boolean = false, - >(options?: Options) { - return (options?.client ?? client).get< - GetProjectBindingByProjectIdResponses, - unknown, - ThrowOnError - >({ url: '/v2/dop-translation/project-bindings', ...options }); - } - - /** - * Fetch a single Project Binding - */ - public static getProjectBinding( - options: Options, - ) { - return (options.client ?? client).get< - GetProjectBindingResponses, - unknown, - ThrowOnError - >({ url: '/v2/dop-translation/project-bindings/{id}', ...options }); - } -} -export class DopSettingsController { /** - * List all DevOps Platform Integration settings - * - * Requires the 'Create Projects' permission + * Find the file graph for this project branch and source. */ - public static fetchAllDopSettings( - options?: Options, + public static 鲥20( + options: Options<鲥20Data, ThrowOnError>, ) { - return (options?.client ?? client).get< - FetchAllDopSettingsResponses, - unknown, - ThrowOnError - >({ url: '/v2/dop-translation/dop-settings', ...options }); + return (options.client ?? client).get<鲥20Responses, unknown, ThrowOnError>( + { url: '/v2/architecture/file-graph', ...options }, + ); } } -export class VersionController { +export class Analysis { /** * Server version * @@ -1614,9 +3127,7 @@ export class VersionController { ThrowOnError >({ url: '/v2/analysis/version', ...options }); } -} -export class JresController { /** * All JREs metadata * @@ -1646,9 +3157,7 @@ export class JresController { ThrowOnError >({ url: '/v2/analysis/jres/{id}', ...options }); } -} -export class ScannerEngineController { /** * Scanner engine download/metadata * @@ -1663,9 +3172,7 @@ export class ScannerEngineController { ThrowOnError >({ url: '/v2/analysis/engine', ...options }); } -} -export class ActiveRulesController { /** * Get all active rules for a specific project * @@ -1682,7 +3189,7 @@ export class ActiveRulesController { } } -export class Issue { +export class SearchIssues { /** * Search Issues * diff --git a/src/generated/transformers.gen.ts b/src/generated/transformers.gen.ts index 37239f1..4865d07 100644 --- a/src/generated/transformers.gen.ts +++ b/src/generated/transformers.gen.ts @@ -1,10 +1,107 @@ // This file is auto-generated by @hey-api/openapi-ts import type { + CreateUserBindingResponse, GenerateUserTokenResponse, + GetLicenseResponse, + GetUserBindingResponse, SearchUserTokensResponse, + 絛2Response, + 鲥12Response, + 鲥5Response, + 鲥7Response, } from './types.gen'; +const jiraOrganizationBindingResourceSchemaResponseTransformer = ( + data: any, +) => { + if (data.createdAt) { + data.createdAt = BigInt(data.createdAt.toString()); + } + return data; +}; + +export const 絛2ResponseTransformer = async ( + data: any, +): Promise<絛2Response> => { + data = jiraOrganizationBindingResourceSchemaResponseTransformer(data); + return data; +}; + +export const 鲥7ResponseTransformer = async ( + data: any, +): Promise<鲥7Response> => { + data = jiraOrganizationBindingResourceSchemaResponseTransformer(data); + return data; +}; + +const postJiraOrganizationBindingResponseResourceSchemaResponseTransformer = ( + data: any, +) => { + if (data.binding) { + data.binding = jiraOrganizationBindingResourceSchemaResponseTransformer( + data.binding, + ); + } + return data; +}; + +export const 鲥5ResponseTransformer = async ( + data: any, +): Promise<鲥5Response> => { + data = + postJiraOrganizationBindingResponseResourceSchemaResponseTransformer(data); + return data; +}; + +const userBindingResponseSchemaResponseTransformer = (data: any) => { + if (data.created_at) { + data.created_at = BigInt(data.created_at.toString()); + } + return data; +}; + +export const createUserBindingResponseTransformer = async ( + data: any, +): Promise => { + data = userBindingResponseSchemaResponseTransformer(data); + return data; +}; + +export const 鲥12ResponseTransformer = async ( + data: any, +): Promise<鲥12Response> => { + data = jiraOrganizationBindingResourceSchemaResponseTransformer(data); + return data; +}; + +const licenseRestResponseSchemaResponseTransformer = (data: any) => { + if (data.maxLoc) { + data.maxLoc = BigInt(data.maxLoc.toString()); + } + if (data.loc) { + data.loc = BigInt(data.loc.toString()); + } + if (data.remainingLocThreshold) { + data.remainingLocThreshold = BigInt(data.remainingLocThreshold.toString()); + } + return data; +}; + +export const getLicenseResponseTransformer = async ( + data: any, +): Promise => { + data = licenseRestResponseSchemaResponseTransformer(data); + return data; +}; + +export const getUserBindingResponseTransformer = async ( + data: any, +): Promise => { + data = userBindingResponseSchemaResponseTransformer(data); + return data; +}; + const userTokenSearchResponseSchemaResponseTransformer = (data: any) => { data.userTokens = data.userTokens.map((item: any) => userTokenDetailsSchemaResponseTransformer(item), diff --git a/src/generated/types.gen.ts b/src/generated/types.gen.ts index 0c40fd3..b677d59 100644 --- a/src/generated/types.gen.ts +++ b/src/generated/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: 'http://sonarqube.internal.philips/api/v2' | (string & {}); + baseUrl: 'http://next.sonarqube.com/sonarqube/api/v2' | (string & {}); }; export type UserCreateRestRequest = { @@ -143,1065 +143,1896 @@ export type EmailConfigurationResource = { oauthTenant?: string; }; -export type AwarenessBannerClickedRequest = { - bannerType?: 'ENABLE' | 'LEARN_MORE'; +export type LicenseProfilesCreateRestRequest = { + /** + * The name of the license policy + */ + name: string; + /** + * Whether this license policy is the default or not + */ + default?: boolean; }; -export type AwarenessBannerClickedResponse = { - readonly id?: string; +export type LicenseProfileResource = { + id?: string; + name?: string; + default?: boolean; + actions?: LicenseProfileSingleActions; + updatedAt?: string; }; -export type FixSuggestionPostRequest = { +export type LicenseProfileSingleActions = { + edit?: boolean; + setAsDefault?: boolean; + associateProjects?: boolean; + delete?: boolean; +}; + +export type UpdateAssigneeRestRequest = { /** - * Issue key + * Issue release key */ - issueId: string; + issueReleaseKey: string; + /** + * Assignee login + */ + assigneeLogin?: string; }; -export type ChangeDto = { - startLine?: number; - endLine?: number; - newCode?: string; +export type AffectedPackageResource = { + purl?: string; + /** + * The maintainer's overall recommendation, if available + */ + recommendation?: 'ignore' | 'upgrade' | 'upgrade_or_workaround'; + recommendationDetails?: VulnerabilityRecommendationDetailsResource; + versionOptions?: Array; + affectedVersions?: Array; + unaffectedVersions?: string; }; -export type FixSuggestionResponse = { +export type IssueReleaseBranchResource = { + uuid?: string; + key?: string; + pullRequest?: boolean; + projectKey?: string; + projectName?: string; + legacyProjectUuid?: string; + organizationUuid?: string; +}; + +export type IssueReleaseDetailsResource = { + key?: string; + severity?: string; + originalSeverity?: string; + manualSeverity?: string; + showIncreasedSeverityWarning?: boolean; + release?: ReleaseSearchResource; + type?: 'VULNERABILITY' | 'PROHIBITED_LICENSE'; + quality?: 'MAINTAINABILITY' | 'RELIABILITY' | 'SECURITY'; + status?: string; + createdAt?: string; + assignee?: UserResource; + commentCount?: number; + vulnerability?: VulnerabilityResource; + spdxLicenseId?: string; + transitions?: Array<'CONFIRM' | 'REOPEN' | 'SAFE' | 'FIXED' | 'ACCEPT'>; + actions?: Array<'COMMENT' | 'ASSIGN' | 'SET_SEVERITY'>; + branch?: IssueReleaseBranchResource; +}; + +export type ReleaseSearchResource = { + key?: string; + branchUuid?: string; + packageUrl?: string; + packageManager?: string; + packageName?: string; + version?: string; + licenseExpression?: string; + known?: boolean; + knownPackage?: boolean; + newlyIntroduced?: boolean; + directSummary?: boolean; + scopeSummary?: string; + productionScopeSummary?: boolean; + dependencyFilePaths?: Array; +}; + +export type UserResource = { + login?: string; + name?: string; + avatar?: string; + active?: boolean; +}; + +export type VersionOptionResource = { + /** + * The version being presented as an option + */ + version?: string; + /** + * Vulnerability IDs affecting this version + */ + vulnerabilityIds?: Array; + /** + * Is this version a pre-release version + */ + prerelease?: boolean; + /** + * Describes which vulnerabilities are fixed + */ + fixLevel?: 'COMPLETE' | 'PARTIAL' | 'NONE' | 'UNKNOWN'; + /** + * How the frontend should label this version + */ + descriptionCode?: + | 'VERSION_IN_USE' + | 'NEAREST_PARTIAL' + | 'NEAREST_COMPLETE' + | 'LATEST_PARTIAL' + | 'LATEST_COMPLETE' + | 'LATEST_STABLE' + | 'LATEST_PRERELEASE' + | 'UNKNOWN'; +}; + +export type VulnerabilityRecommendationDetailsResource = { + impactScore?: number; + impactDescription?: string; + realIssue?: boolean; + falsePositiveReason?: string; + includesDev?: boolean; + specificMethodsAffected?: boolean; + specificMethodsDescription?: string; + otherConditions?: boolean; + otherConditionsDescription?: string; + workaroundAvailable?: boolean; + workaroundDescription?: string; + visibility?: string; +}; + +export type VulnerabilityReportResource = { id?: string; - issueId?: string; - explanation?: string; - changes?: Array; + url?: string; + type?: string; + cvssScore?: string; + cvssSeverity?: string; + withdrawnAt?: string; }; -export type GitlabSynchronizationRunResource = { - readonly id?: string; +export type VulnerabilityResource = { + vulnerabilityId?: string; + reports?: Array; + description?: string; + epssPercentile?: string; + epssProbability?: string; + knownExploited?: boolean; + cweIds?: Array; + publishedOn?: string; + affectedPackages?: Array; + withdrawn?: boolean; }; -export type PermissionMappingsPostRequest = { +export type IssueReleaseSetSeverityRestRequest = { /** - * Custom role name + * Issue release key */ - role: string; - permissions: RestPermissions; + issueReleaseKey: string; + /** + * Software Quality + */ + quality: 'MAINTAINABILITY' | 'RELIABILITY' | 'SECURITY'; + /** + * Severity + */ + severity: 'INFO' | 'LOW' | 'MEDIUM' | 'HIGH' | 'BLOCKER'; }; -export type RestPermissions = { +export type IssueReleaseClearSeverityWarningRestRequest = { /** - * Browse + * Issue release key */ - user: boolean; + issueReleaseKey: string; +}; + +export type IssueReleaseStatusTransitionRequest = { /** - * See Source Code + * Issue release key */ - codeViewer: boolean; + issueReleaseKey: string; /** - * Administer Issues + * Transition key */ - issueAdmin: boolean; + transitionKey: 'CONFIRM' | 'REOPEN' | 'SAFE' | 'FIXED' | 'ACCEPT'; /** - * Administer Security Hotspots + * Transition comment */ - securityHotspotAdmin: boolean; + comment?: string; +}; + +export type IssueReleaseAddCommentRestRequest = { /** - * Administer + * Issue release key */ - admin: boolean; + issueReleaseKey: string; /** - * Execute Analysis + * comment */ - scan: boolean; + comment?: string; }; -export type PermissionMappingsResource = { - id?: string; - role?: string; - baseRole?: boolean; - permissions?: RestPermissions; +export type AzureBillingRestResponse = { + success?: boolean; + message?: string; }; -export type GitlabConfigurationCreateRestRequest = { +export type PostJiraWorkItemRequestResource = { /** - * Enable Gitlab authentication + * Resource identifier */ - enabled: boolean; + resourceId: string; /** - * Gitlab Application id + * Resource type */ - applicationId: string; + resourceType: 'SONAR_ISSUE' | 'DEPENDENCY_RISK'; /** - * Url of Gitlab instance for authentication (for instance https://gitlab.com) + * Sonar project identifier */ - url: string; + sonarProjectId: string; /** - * Set whether to synchronize groups + * Work type identifier */ - synchronizeGroups: boolean; - allowedGroups: Array; + workTypeId: string; /** - * Type of synchronization + * Work item summary */ - provisioningType: 'JIT' | 'AUTO_PROVISIONING'; + summary: string; /** - * Allow user to sign up + * Work item description */ - allowUsersToSignUp?: boolean; + description: string; }; -export type GitlabConfigurationResource = { - readonly id?: string; - enabled?: boolean; +export type JiraWorkItemResource = { /** - * Gitlab Application id + * Work item identifier */ - applicationId?: string; + readonly id?: string; /** - * Url of Gitlab instance for authentication (for instance https://gitlab.com/api/v4) + * Jira issue identifier */ - url?: string; - synchronizeGroups?: boolean; + readonly jiraIssueId?: string; /** - * Root Gitlab groups allowed to authenticate and provisioned + * Jira issue key */ - allowedGroups?: Array; - allowUsersToSignUp?: boolean; - provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; + readonly jiraIssueKey?: string; /** - * Whether or not the provisioningToken is defined + * Jira issue URL */ - readonly isProvisioningTokenSet?: boolean; + readonly jiraIssueUrl?: string; /** - * In case the GitLab configuration is incorrect, error message + * Jira issue status */ - readonly errorMessage?: string; + readonly jiraIssueStatus?: string; }; -export type GithubConfigurationCreateRestRequest = { +export type PostJiraProjectBindingRequestResource = { /** - * Enable GitHub authentication + * Sonar project identifier */ - enabled: boolean; + sonarProjectId: string; /** - * The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps. + * Jira instance binding identifier */ - applicationId: string; + jiraOrganizationId: string; /** - * Synchronize GitHub team with SonarQube group memberships when users log in to SonarQube. - * For each GitHub team they belong to, users will be associated to a group of the same name if it exists in SonarQube. - * + * Jira project key */ - synchronizeGroups: boolean; + jiraProjectKey: string; +}; + +export type JiraProjectBindingResource = { /** - * The API url for a GitHub instance. https://api.github.com/ for Github.com, https://github.company.com/api/v3/ when using Github Enterprise + * Jira project binding identifier */ - apiUrl: string; + readonly id?: string; /** - * The WEB url for a GitHub instance. https://github.com/ for Github.com, https://github.company.com/ when using GitHub Enterprise. - * + * Sonar project identifier */ - webUrl: string; - allowedOrganizations: Array; + readonly sonarProjectId?: string; /** - * Type of synchronization + * Jira instance binding identifier */ - provisioningType: 'JIT' | 'AUTO_PROVISIONING'; + readonly jiraOrganizationId?: string; /** - * Allow user to sign up + * Jira project key */ - allowUsersToSignUp?: boolean; + readonly jiraProjectKey?: string; +}; + +export type PostJiraOrganizationBindingRequestResource = { /** - * Change project visibility based on GitHub repository visibility. - * If disabled, every provisioned project will be private in SonarQube and visible only to users with explicit GitHub permissions for the corresponding repository. - * Changes take effect at the next synchronization. - * + * Base64-encoded OAuth state parameter */ - projectVisibility?: boolean; + state: string; /** - * Admin consent to synchronize permissions from GitHub + * OAuth authorization code (no whitespace) */ - userConsentRequiredAfterUpgrade?: boolean; + authorizationCode: string; }; -export type GithubConfigurationResource = { +export type JiraOrganizationBindingResource = { + /** + * Jira instance binding identifier + */ readonly id?: string; - enabled?: boolean; /** - * GitHub Application id + * Sonar organization UUID */ - applicationId?: string; - synchronizeGroups?: boolean; + readonly sonarOrganizationUuid?: string; /** - * Url of GitHub instance for API connectivity (for instance https://api.github.com) + * Jira instance URL */ - apiUrl?: string; + readonly jiraInstanceUrl?: string; /** - * Url of GitHub instance for authentication (for instance https://github.com) + * User who created or reauthorized the jira connection */ - webUrl?: string; + readonly createdBy?: string; /** - * GitHub organizations allowed to authenticate and provisioned + * Creation timestamp */ - allowedOrganizations?: Array; - provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; - allowUsersToSignUp?: boolean; - projectVisibility?: boolean; - userConsentRequiredAfterUpgrade?: boolean; + readonly createdAt?: bigint; /** - * In case the GitHub configuration is incorrect, error message + * TODO */ - readonly errorMessage?: string; + readonly isTokenShared?: boolean; }; -export type BoundProjectCreateRestRequest = { +export type OAuthResource = { /** - * Key of the project to create + * The resource's cloud ID */ - projectKey: string; + readonly cloudId?: string; /** - * Name of the project to create + * The resource's URL */ - projectName: string; + readonly url?: string; +}; + +export type PostJiraOrganizationBindingResponseResource = { + binding?: JiraOrganizationBindingResource; /** - * Identifier of DevOps platform configuration to use. Use /dop-translation/dop-settings to retrieve the settings and their ID + * Array of available resources to bind the instance to */ - devOpsPlatformSettingId: string; - /** - * Identifier of the DevOps platform repository to import: - * - repository slug for GitHub and Bitbucket (Cloud and Server) - * - repository id for GitLab - * - repository name for Azure DevOps - * - */ - repositoryIdentifier: string; + readonly resources: Array; +}; + +/** + * User binding creation request + */ +export type UserBindingCreationRequest = { + bindingData: UserBindingCreationRequestBindingData; + userId: string; +}; + +export type UserBindingCreationRequestBindingData = { + code: string; +}; + +export type UserBindingResponse = { + id?: string; + user_id?: string; + slack_user_id?: string; + slack_workspace_id?: string; + slack_workspace_name?: string; + created_at?: bigint; +}; + +export type IntegrationConfigurationPostRequest = { + integrationType: 'SLACK'; + clientId: string; + clientSecret: string; + signingSecret: string; +}; + +export type IntegrationConfigurationResponse = { + id?: string; + integrationType?: 'SLACK'; + clientId?: string; + appId?: string; +}; + +export type AwarenessBannerClickedRequest = { + bannerType?: 'ENABLE' | 'LEARN_MORE'; +}; + +export type AwarenessBannerClickedResponse = { + readonly id?: string; +}; + +export type FixSuggestionPostRequest = { + projectKey?: string; /** - * Identifier of the DevOps platform project in which the repository is located. - * This is only needed for Azure and BitBucket Server platforms - * + * Issue key */ - projectIdentifier?: string; + issueId?: string; + issue?: Issue; +}; + +export type Issue = { + message: string; + startLine: number; + endLine: number; + ruleKey: string; + sourceCode: string; +}; + +export type ChangeDto = { + startLine?: number; + endLine?: number; + newCode?: string; +}; + +export type FixSuggestionResponse = { + id?: string; + issueId?: string; + explanation?: string; + changes?: Array; +}; + +export type LicenseRestRequest = { /** - * Project New Code Definition Type - * New code definitions of the following types are allowed: - * - PREVIOUS_VERSION - * - NUMBER_OF_DAYS - * - REFERENCE_BRANCH - will default to the main branch. - * + * New license key */ - newCodeDefinitionType?: string; + licenseKey?: string; +}; + +export type LicenseUploadActivationRequest = { /** - * Project New Code Definition Value - * For each new code definition type, a different value is expected: - * - no value, when the new code definition type is PREVIOUS_VERSION and REFERENCE_BRANCH - * - a number between 1 and 90, when the new code definition type is NUMBER_OF_DAYS - * + * Contents of a valid .lic file */ - newCodeDefinitionValue?: string; + license?: string; /** - * True if project is part of a mono repo. + * License key for the license */ - monorepo: boolean; + licenseKey?: string; }; -export type BoundProjectCreateRestResponse = { - /** - * The identifier of the created project - */ - projectId?: string; +export type LegacyLicenseRestRequest = { /** - * The identifier of the binding between the created project and the DevOps platform project + * New license key */ - bindingId?: string; + licenseKey?: string; }; -export type Impact = { - softwareQuality?: 'MAINTAINABILITY' | 'RELIABILITY' | 'SECURITY'; - severity?: 'INFO' | 'LOW' | 'MEDIUM' | 'HIGH' | 'BLOCKER'; +export type GitlabSynchronizationRunResource = { + readonly id?: string; }; -export type Parameter = { - key?: string; - readonly htmlDescription?: string; - defaultValue?: string; - type?: 'STRING' | 'TEXT' | 'BOOLEAN' | 'INTEGER' | 'FLOAT'; +export type PermissionMappingsPostRequest = { + /** + * Custom role name + */ + role: string; + permissions: RestPermissions; }; -export type RuleCreateRestRequest = { +export type RestPermissions = { /** - * Key of the custom rule to create, must include the repository + * Browse */ - key: string; + user: boolean; /** - * Key of the rule template to be used to create the custom rule + * See Source Code */ - templateKey: string; + codeViewer: boolean; /** - * Rule name + * Administer Issues */ - name: string; + issueAdmin: boolean; /** - * Rule description in markdown format + * Administer Security Hotspots */ - markdownDescription: string; + securityHotspotAdmin: boolean; /** - * Rule status + * Administer */ - status?: 'BETA' | 'DEPRECATED' | 'READY' | 'REMOVED'; + admin: boolean; /** - * Custom rule parameters + * Execute Analysis */ - parameters?: Array; + scan: boolean; +}; + +export type PermissionMappingsResource = { + id?: string; + role?: string; + baseRole?: boolean; + permissions?: RestPermissions; +}; + +export type GitlabConfigurationCreateRestRequest = { /** - * Clean code attribute + * Enable Gitlab authentication */ - cleanCodeAttribute?: - | 'CONVENTIONAL' - | 'FORMATTED' - | 'IDENTIFIABLE' - | 'CLEAR' - | 'COMPLETE' - | 'EFFICIENT' - | 'LOGICAL' - | 'DISTINCT' - | 'FOCUSED' - | 'MODULAR' - | 'TESTED' - | 'LAWFUL' - | 'RESPECTFUL' - | 'TRUSTWORTHY'; + enabled: boolean; /** - * Impacts + * Gitlab Application id */ - impacts: Array; + applicationId: string; /** - * Severity + * Url of Gitlab instance for authentication (for instance https://gitlab.com) */ - severity?: string; + url: string; /** - * Rule type + * Set whether to synchronize groups */ - type?: 'CODE_SMELL' | 'BUG' | 'VULNERABILITY' | 'SECURITY_HOTSPOT'; -}; - -export type RuleDescriptionSectionContextRestResponse = { - key?: string; - displayName?: string; -}; - -export type RuleDescriptionSectionRestResponse = { - readonly key?: string; - readonly content?: string; - context?: RuleDescriptionSectionContextRestResponse; -}; - -export type RuleRestResponse = { - id?: string; - key?: string; - repositoryKey?: string; - name?: string; - severity?: string; - type?: 'CODE_SMELL' | 'BUG' | 'VULNERABILITY' | 'SECURITY_HOTSPOT'; - impacts?: Array; - cleanCodeAttribute?: - | 'CONVENTIONAL' - | 'FORMATTED' - | 'IDENTIFIABLE' - | 'CLEAR' - | 'COMPLETE' - | 'EFFICIENT' - | 'LOGICAL' - | 'DISTINCT' - | 'FOCUSED' - | 'MODULAR' - | 'TESTED' - | 'LAWFUL' - | 'RESPECTFUL' - | 'TRUSTWORTHY'; - cleanCodeAttributeCategory?: - | 'ADAPTABLE' - | 'CONSISTENT' - | 'INTENTIONAL' - | 'RESPONSIBLE'; - status?: 'BETA' | 'DEPRECATED' | 'READY' | 'REMOVED'; - external?: boolean; - createdAt?: string; - descriptionSections?: Array; - markdownDescription?: string; - gapDescription?: string; - htmlNote?: string; - markdownNote?: string; - educationPrinciples?: Array; - template?: boolean; - templateId?: string; - tags?: Array; - systemTags?: Array; - languageKey?: string; - languageName?: string; - parameters?: Array; - remediationFunctionType?: string; - remediationFunctionGapMultiplier?: string; - remediationFunctionBaseEffort?: string; -}; - -export type GroupCreateRestRequest = { + synchronizeGroups: boolean; + allowedGroups: Array; /** - * Name for the new group. Must be unique. The value 'anyone' is reserved and cannot be used. + * Type of synchronization */ - name: string; + provisioningType: 'JIT' | 'AUTO_PROVISIONING'; /** - * Description for the new group. + * Allow user to sign up */ - description?: string; + allowUsersToSignUp?: boolean; }; -export type GroupRestResponse = { +export type GitlabConfigurationResource = { readonly id?: string; - name?: string; - description?: string; - readonly managed?: boolean; - readonly default?: boolean; -}; - -export type GroupMembershipCreateRestRequest = { + enabled?: boolean; /** - * ID of the user to add to group. + * Gitlab Application id */ - userId?: string; + applicationId?: string; /** - * ID of the group where a member needs to be added. + * Url of Gitlab instance for authentication (for instance https://gitlab.com/api/v4) */ - groupId?: string; -}; - -export type GroupMembershipRestResponse = { - readonly id?: string; - readonly groupId?: string; - readonly userId?: string; -}; - -export type UpdateFieldListString = { - value?: Array; - defined?: boolean; -}; - -export type UpdateFieldString = { - value?: string; - defined?: boolean; -}; - -export type UserUpdateRestRequest = { - login?: UpdateFieldString; - /** - * User first name and last name - */ - name?: string; - /** - * Email - */ - email?: string; - scmAccounts?: UpdateFieldListString; + url?: string; + synchronizeGroups?: boolean; /** - * New identity provider. Only providers configured in your platform are supported. This could be: github, gitlab, bitbucket, saml, LDAP, LDAP_{serverKey} - * (according to your server configuration file). - * Warning: when this is updated, the user will only be able to authenticate using the new identity provider. Also, it is not possible to remove the identity provider of a user. - * + * Root Gitlab groups allowed to authenticate and provisioned */ - externalProvider?: string; + allowedGroups?: Array; + allowUsersToSignUp?: boolean; + provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; /** - * New external login, usually the login used in the authentication system. + * Whether or not the provisioningToken is defined */ - externalLogin?: string; + readonly isProvisioningTokenSet?: boolean; /** - * New external id in the authentication system. + * In case the GitLab configuration is incorrect, error message */ - externalId?: string; + readonly errorMessage?: string; }; -export type EmailConfigurationUpdateRestRequest = { +export type GithubConfigurationCreateRestRequest = { /** - * URL of your SMTP server + * Enable GitHub authentication */ - host?: string; + enabled: boolean; /** - * Port of your SMTP server (usually 25, 587 or 465) + * The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps. */ - port?: string; + applicationId: string; /** - * Security protocol used to connect to your SMTP server (SSLTLS is recommended) + * Synchronize GitHub team with SonarQube group memberships when users log in to SonarQube. + * For each GitHub team they belong to, users will be associated to a group of the same name if it exists in SonarQube. + * */ - securityProtocol?: 'NONE' | 'SSLTLS' | 'STARTTLS'; + synchronizeGroups: boolean; /** - * Address emails will come from + * The API url for a GitHub instance. https://api.github.com/ for Github.com, https://github.company.com/api/v3/ when using Github Enterprise */ - fromAddress?: string; + apiUrl: string; /** - * Name emails will come from (usually "SonarQube") + * The WEB url for a GitHub instance. https://github.com/ for Github.com, https://github.company.com/ when using GitHub Enterprise. + * */ - fromName?: string; + webUrl: string; + allowedOrganizations: Array; /** - * Prefix added to email so they can be easily recognized (usually "[SonarQube]") + * Type of synchronization */ - subjectPrefix?: string; + provisioningType: 'JIT' | 'AUTO_PROVISIONING'; /** - * Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange + * Allow user to sign up */ - authMethod?: 'BASIC' | 'OAUTH'; + allowUsersToSignUp?: boolean; /** - * For Basic and OAuth authentication: username used to authenticate to the SMTP server + * Change project visibility based on GitHub repository visibility. + * If disabled, every provisioned project will be private in SonarQube and visible only to users with explicit GitHub permissions for the corresponding repository. + * Changes take effect at the next synchronization. + * */ - username?: string; + projectVisibility?: boolean; /** - * For basic authentication: password used to authenticate to the SMTP server + * Admin consent to synchronize permissions from GitHub */ - basicPassword?: string; + userConsentRequiredAfterUpgrade?: boolean; +}; + +export type GithubConfigurationResource = { + readonly id?: string; + enabled?: boolean; /** - * For OAuth authentication: host of the Identity Provider issuing access tokens + * GitHub Application id */ - oauthAuthenticationHost?: string; + applicationId?: string; + synchronizeGroups?: boolean; /** - * For OAuth authentication: Client ID provided by Microsoft Exchange when registering the application + * Url of GitHub instance for API connectivity (for instance https://api.github.com) */ - oauthClientId?: string; + apiUrl?: string; /** - * For OAuth authentication: Client password provided by Microsoft Exchange when registering the application + * Url of GitHub instance for authentication (for instance https://github.com) */ - oauthClientSecret?: string; + webUrl?: string; /** - * For OAuth authentication: Microsoft tenant + * GitHub organizations allowed to authenticate and provisioned */ - oauthTenant?: string; -}; - -export type FeatureEnablementRequest = { + allowedOrganizations?: Array; + provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; + allowUsersToSignUp?: boolean; + projectVisibility?: boolean; + userConsentRequiredAfterUpgrade?: boolean; /** - * Whether SCA is enabled or not + * In case the GitHub configuration is incorrect, error message */ - enablement?: boolean; -}; - -export type FeatureEnablementResource = { - enablement?: boolean; -}; - -export type DevOpsPermissionMappingUpdateRequest = { - permissions?: PermissionMappingUpdate; -}; - -export type PermissionMappingUpdate = { - user?: boolean; - codeViewer?: boolean; - issueAdmin?: boolean; - securityHotspotAdmin?: boolean; - admin?: boolean; - scan?: boolean; + readonly errorMessage?: string; }; -export type GitlabConfigurationUpdateRestRequest = { +export type BoundProjectCreateRestRequest = { /** - * Enable Gitlab authentication + * Key of the project to create */ - enabled?: boolean; + projectKey: string; /** - * Gitlab Application id + * Name of the project to create */ - applicationId?: string; + projectName: string; /** - * Url of Gitlab instance for authentication (for instance https://gitlab.com/api/v4) + * Identifier of DevOps platform configuration to use. Use /dop-translation/dop-settings to retrieve the settings and their ID */ - url?: string; + devOpsPlatformSettingId: string; /** - * Secret of the application + * Identifier of the DevOps platform repository to import: + * - repository slug for GitHub and Bitbucket (Cloud and Server) + * - repository id for GitLab + * - repository name for Azure DevOps + * */ - secret?: string; + repositoryIdentifier: string; /** - * Set whether to synchronize groups + * Identifier of the DevOps platform project in which the repository is located. + * This is only needed for Azure and BitBucket Server platforms + * */ - synchronizeGroups?: boolean; - allowedGroups?: UpdateFieldListString; + projectIdentifier?: string; /** - * Type of synchronization + * Project New Code Definition Type + * New code definitions of the following types are allowed: + * - PREVIOUS_VERSION + * - NUMBER_OF_DAYS + * - REFERENCE_BRANCH - will default to the main branch. + * */ - provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; + newCodeDefinitionType?: string; /** - * Allow user to sign up + * Project New Code Definition Value + * For each new code definition type, a different value is expected: + * - no value, when the new code definition type is PREVIOUS_VERSION and REFERENCE_BRANCH + * - a number between 1 and 90, when the new code definition type is NUMBER_OF_DAYS + * */ - allowUsersToSignUp?: boolean; + newCodeDefinitionValue?: string; /** - * Gitlab token for provisioning + * True if project is part of a mono repo. */ - provisioningToken?: string; + monorepo: boolean; }; -export type GithubConfigurationUpdateRestRequest = { +export type BoundProjectCreateRestResponse = { /** - * Enable GitHub authentication + * The identifier of the created project */ - enabled?: boolean; + projectId?: string; /** - * GitHub Client ID + * The identifier of the binding between the created project and the DevOps platform project */ - clientId?: string; + bindingId?: string; +}; + +export type Impact = { + softwareQuality?: 'MAINTAINABILITY' | 'RELIABILITY' | 'SECURITY'; + severity?: 'INFO' | 'LOW' | 'MEDIUM' | 'HIGH' | 'BLOCKER'; +}; + +export type Parameter = { + key?: string; + readonly htmlDescription?: string; + defaultValue?: string; + type?: 'STRING' | 'TEXT' | 'BOOLEAN' | 'INTEGER' | 'FLOAT'; +}; + +export type RuleCreateRestRequest = { /** - * GitHub Client secret + * Key of the custom rule to create, must include the repository */ - clientSecret?: string; + key: string; /** - * GitHub Application id + * Key of the rule template to be used to create the custom rule */ - applicationId?: string; + templateKey: string; /** - * GitHub Private key + * Rule name */ - privateKey?: string; + name: string; /** - * Set whether to synchronize groups + * Rule description in markdown format */ - synchronizeGroups?: boolean; + markdownDescription: string; /** - * Url of GitHub instance for API connectivity (for instance https://api.github.com) + * Rule status */ - apiUrl?: string; + status?: 'BETA' | 'DEPRECATED' | 'READY' | 'REMOVED'; /** - * Url of GitHub instance for authentication (for instance https://github.com) + * Custom rule parameters */ - webUrl?: string; - allowedOrganizations?: UpdateFieldListString; + parameters?: Array; /** - * Type of synchronization + * Clean code attribute */ - provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; + cleanCodeAttribute?: + | 'CONVENTIONAL' + | 'FORMATTED' + | 'IDENTIFIABLE' + | 'CLEAR' + | 'COMPLETE' + | 'EFFICIENT' + | 'LOGICAL' + | 'DISTINCT' + | 'FOCUSED' + | 'MODULAR' + | 'TESTED' + | 'LAWFUL' + | 'RESPECTFUL' + | 'TRUSTWORTHY'; /** - * Allow user to sign up + * Impacts */ - allowUsersToSignUp?: boolean; - /** - * Sync project visibility - */ - projectVisibility?: boolean; - /** - * Admin consent to synchronize permissions from GitHub - */ - userConsentRequiredAfterUpgrade?: boolean; -}; - -export type ModeResource = { - mode: 'MQR' | 'STANDARD_EXPERIENCE'; - readonly modified?: boolean; -}; - -export type GroupUpdateRestRequest = { + impacts: Array; /** - * Group name + * Severity */ - name?: string; + severity?: string; /** - * Description of the group + * Rule type */ - description?: string; -}; - -export type PageRestResponse = { - pageIndex?: number; - pageSize?: number; - total?: number; -}; - -export type UsersSearchRestResponse = { - users?: Array; - page?: PageRestResponse; -}; - -export type DatabaseMigrationsResponse = { - status?: string; - completedSteps?: number; - totalSteps?: number; - startedAt?: string; - message?: string; - expectedFinishTimestamp?: string; -}; - -export type Health = { - status?: 'GREEN' | 'YELLOW' | 'RED'; - causes?: Array; -}; - -export type EmailConfigurationSearchRestResponse = { - emailConfigurations?: Array; - page?: PageRestResponse; + type?: 'CODE_SMELL' | 'BUG' | 'VULNERABILITY' | 'SECURITY_HOTSPOT'; }; -export type ReleaseSearchResource = { +export type RuleDescriptionSectionContextRestResponse = { key?: string; - packageUrl?: string; - packageManager?: string; - packageName?: string; - version?: string; - licenseExpression?: string; - known?: boolean; - newInPullRequest?: boolean; - directSummary?: boolean; - scopeSummary?: string; - dependencyFilePaths?: Array; + displayName?: string; }; -export type ReleasesSearchRestResponse = { - releases?: Array; - packageManagerCounts?: Array; - page?: PageRestResponse; +export type RuleDescriptionSectionRestResponse = { + readonly key?: string; + readonly content?: string; + context?: RuleDescriptionSectionContextRestResponse; }; -export type ScaReleaseByPackageManagerCountDto = { - packageManager?: string; - releaseCount?: number; +export type RuleRestResponse = { + id?: string; + key?: string; + repositoryKey?: string; + name?: string; + severity?: string; + type?: 'CODE_SMELL' | 'BUG' | 'VULNERABILITY' | 'SECURITY_HOTSPOT'; + impacts?: Array; + cleanCodeAttribute?: + | 'CONVENTIONAL' + | 'FORMATTED' + | 'IDENTIFIABLE' + | 'CLEAR' + | 'COMPLETE' + | 'EFFICIENT' + | 'LOGICAL' + | 'DISTINCT' + | 'FOCUSED' + | 'MODULAR' + | 'TESTED' + | 'LAWFUL' + | 'RESPECTFUL' + | 'TRUSTWORTHY'; + cleanCodeAttributeCategory?: + | 'ADAPTABLE' + | 'CONSISTENT' + | 'INTENTIONAL' + | 'RESPONSIBLE'; + status?: 'BETA' | 'DEPRECATED' | 'READY' | 'REMOVED'; + external?: boolean; + createdAt?: string; + descriptionSections?: Array; + markdownDescription?: string; + gapDescription?: string; + htmlNote?: string; + markdownNote?: string; + educationPrinciples?: Array; + template?: boolean; + templateId?: string; + tags?: Array; + systemTags?: Array; + languageKey?: string; + languageName?: string; + parameters?: Array; + remediationFunctionType?: string; + remediationFunctionGapMultiplier?: string; + remediationFunctionBaseEffort?: string; }; -export type DependencyResource = { - key?: string; - direct?: boolean; - scope?: string; - productionScope?: boolean; - userDependencyFilePath?: string; - lockfileDependencyFilePath?: string; - chains?: Array>; - newInPullRequest?: boolean; +export type GroupCreateRestRequest = { + /** + * Name for the new group. Must be unique. The value 'anyone' is reserved and cannot be used. + */ + name: string; + /** + * Description for the new group. + */ + description?: string; }; -export type IssueResource = { - key?: string; - severity?: string; - type?: string; - createdAt?: string; - vulnerabilityId?: string; - cweIds?: Array; - cvssScore?: string; - spdxLicenseId?: string; +export type GroupRestResponse = { + readonly id?: string; + name?: string; + description?: string; + readonly managed?: boolean; + readonly default?: boolean; }; -export type ReleaseDetailResource = { - key?: string; - packageUrl?: string; - packageManager?: string; - packageName?: string; - version?: string; - licenseExpression?: string; - known?: boolean; - newInPullRequest?: boolean; - directSummary?: boolean; - scopeSummary?: string; - productionScopeSummary?: boolean; - dependencies?: Array; - issues?: Array; +export type GroupMembershipCreateRestRequest = { + /** + * ID of the user to add to group. + */ + userId?: string; + /** + * ID of the group where a member needs to be added. + */ + groupId?: string; }; -export type DependencyRiskResource = { - key?: string; - severity?: string; - release?: ReleaseSearchResource; - type?: string; - createdAt?: string; - vulnerabilityId?: string; - cweIds?: Array; - cvssScore?: string; - spdxLicenseId?: string; +export type GroupMembershipRestResponse = { + readonly id?: string; + readonly groupId?: string; + readonly userId?: string; }; -export type DependencyRisksSearchRestResponse = { - issuesReleases?: Array; - page?: PageRestResponse; +export type AtlassianAuthenticationDetailsResource = { + /** + * Atlassian 3LO App Client ID + */ + clientId?: string; + /** + * Atlassian 3LO App Secret + */ + secret?: string; }; -export type AffectedPackageResource = { - purl?: string; - recommendation?: string; - recommendationDetails?: VulnerabilityRecommendationDetailsResource; - versionOptions?: Array; - affectedVersions?: Array; - unaffectedVersions?: string; +export type AtlassianAuthenticationDetailsResultResource = { + /** + * Atlassian 3LO App Client ID + */ + readonly clientId?: string; }; -export type DependencyRiskDetailsResource = { - key?: string; - severity?: string; - release?: ReleaseSearchResource; - type?: string; - createdAt?: string; - vulnerability?: VulnerabilityResource; - spdxLicenseId?: string; +export type UpdateFieldListString = { + value?: Array; + defined?: boolean; }; -export type VersionOptionResource = { +export type UserUpdateRestRequest = { /** - * The version being presented as an option + * User login */ - version?: string; + login?: string; /** - * Vulnerability IDs affecting this version + * User first name and last name */ - vulnerabilityIds?: Array; + name?: string; /** - * Is this version a pre-release version + * Email */ - prerelease?: boolean; + email?: string; + scmAccounts?: UpdateFieldListString; /** - * Describes which vulnerabilities are fixed + * New identity provider. Only providers configured in your platform are supported. This could be: github, gitlab, bitbucket, saml, LDAP, LDAP_{serverKey} + * (according to your server configuration file). + * Warning: when this is updated, the user will only be able to authenticate using the new identity provider. Also, it is not possible to remove the identity provider of a user. + * */ - fixLevel?: 'COMPLETE' | 'PARTIAL' | 'NONE' | 'UNKNOWN'; + externalProvider?: string; /** - * How the frontend should label this version + * New external login, usually the login used in the authentication system. */ - descriptionCode?: - | 'VERSION_IN_USE' - | 'NEAREST_PARTIAL' - | 'NEAREST_COMPLETE' - | 'LATEST_PARTIAL' - | 'LATEST_COMPLETE' - | 'LATEST_STABLE' - | 'LATEST_PRERELEASE' - | 'UNKNOWN'; + externalLogin?: string; + /** + * New external id in the authentication system. + */ + externalId?: string; }; -export type VulnerabilityRecommendationDetailsResource = { - impactScore?: number; - impactDescription?: string; - realIssue?: boolean; - falsePositiveReason?: string; - includesDev?: boolean; - specificMethodsAffected?: boolean; - specificMethodsDescription?: string; - otherConditions?: boolean; - otherConditionsDescription?: string; - workaroundAvailable?: boolean; - workaroundDescription?: string; - visibility?: string; +export type EmailConfigurationUpdateRestRequest = { + /** + * URL of your SMTP server + */ + host?: string; + /** + * Port of your SMTP server (usually 25, 587 or 465) + */ + port?: string; + /** + * Security protocol used to connect to your SMTP server (SSLTLS is recommended) + */ + securityProtocol?: 'NONE' | 'SSLTLS' | 'STARTTLS'; + /** + * Address emails will come from + */ + fromAddress?: string; + /** + * Name emails will come from (usually "SonarQube") + */ + fromName?: string; + /** + * Prefix added to email so they can be easily recognized (usually "[SonarQube]") + */ + subjectPrefix?: string; + /** + * Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange + */ + authMethod?: 'BASIC' | 'OAUTH'; + /** + * For Basic and OAuth authentication: username used to authenticate to the SMTP server + */ + username?: string; + /** + * For basic authentication: password used to authenticate to the SMTP server + */ + basicPassword?: string; + /** + * For OAuth authentication: host of the Identity Provider issuing access tokens + */ + oauthAuthenticationHost?: string; + /** + * For OAuth authentication: Client ID provided by Microsoft Exchange when registering the application + */ + oauthClientId?: string; + /** + * For OAuth authentication: Client password provided by Microsoft Exchange when registering the application + */ + oauthClientSecret?: string; + /** + * For OAuth authentication: Microsoft tenant + */ + oauthTenant?: string; }; -export type VulnerabilityReportResource = { - id?: string; - url?: string; - type?: string; - cvssScore?: string; - cvssSeverity?: string; +export type LicenseProfilesUpdateRestRequest = { + /** + * The name of the license policy + */ + name?: string; + /** + * Whether this license policy is the default or not + */ + default?: boolean; }; -export type VulnerabilityResource = { - vulnerabilityId?: string; - reports?: Array; - description?: string; - epssPercentile?: string; - epssProbability?: string; - knownExploited?: boolean; - cweIds?: Array; - affectedPackages?: Array; +export type LicensePolicyLicenseUpdateRestRequest = { + /** + * The new status of this license. + */ + policy: 'DENY' | 'ALLOW'; }; -export type ScaCliInfoRestResponse = { +export type LicensePolicyLicenseResource = { id?: string; - filename?: string; - sha256?: string; - os?: string; - arch?: string; -}; - -export type LlmModelDto = { - key?: string; + spdxLicenseId?: string; name?: string; - recommended?: boolean; + category?: + | 'UNKNOWN' + | 'COPYLEFT_WEAK' + | 'COPYLEFT_STRONG' + | 'COPYLEFT_NETWORK' + | 'COPYLEFT_MAXIMAL' + | 'PERMISSIVE_STANDARD' + | 'PERMISSIVE_AMATEUR'; + /** + * The policy status of this license. + */ + policy?: 'DENY' | 'ALLOW'; }; -export type LlmProviderResponseDto = { - key?: string; - name?: string; - selfHosted?: boolean; - models?: Array; +export type LicenseProfileCategoryUpdateRestRequest = { + /** + * The new status of this category. + */ + policy: 'DENY' | 'ALLOW'; }; -export type ServiceInfo = { - status?: - | 'CONNECTION_ERROR' - | 'SERVICE_ERROR' - | 'SUCCESS' - | 'TIMEOUT' - | 'UNAUTHORIZED'; - isEnabled?: boolean; - subscriptionType?: 'EARLY_ACCESS' | 'PAID' | 'NOT_PAID'; +export type LicenseProfileCategoryResource = { + id?: string; + key?: + | 'UNKNOWN' + | 'COPYLEFT_WEAK' + | 'COPYLEFT_STRONG' + | 'COPYLEFT_NETWORK' + | 'COPYLEFT_MAXIMAL' + | 'PERMISSIVE_STANDARD' + | 'PERMISSIVE_AMATEUR'; + /** + * The policy status of this category. + */ + policy?: 'DENY' | 'ALLOW'; }; -export type SubscriptionTypeResponse = { - subscriptionType?: 'EARLY_ACCESS' | 'PAID' | 'NOT_PAID'; +export type AssignedProjectsUpdateRestRequest = { + /** + * The id of the license profile that should be used when analyzing the project for license issues. + */ + licenseProfileUuid: string; + /** + * The key of the project that should be assigned to the license profile. + */ + projectKey: string; }; -export type FixSuggestionIssueResponse = { - issueId?: string; - aiSuggestion?: - | 'AVAILABLE' - | 'NOT_AVAILABLE_FILE_LEVEL_ISSUE' - | 'NOT_AVAILABLE_UNSUPPORTED_RULE' - | 'NOT_AVAILABLE_FILE_SIZE'; +export type IssueReleaseUpdateCommentRestRequest = { + /** + * Issue release change key + */ + issueReleaseChangeKey: string; + /** + * Comment text + */ + comment: string; }; -export type FeatureEnablementResponse = { - enablement?: - | 'DISABLED' - | 'ENABLED_FOR_ALL_PROJECTS' - | 'ENABLED_FOR_SOME_PROJECTS'; - enabledProjectKeys?: Array; - provider?: ProviderResponseDto; +export type FeatureEnablementRequest = { + /** + * Whether SCA is enabled or not + */ + enablement?: boolean; }; -export type ProviderResponseDto = { - key?: string; - modelKey?: string; - endpoint?: string; +export type FeatureEnablementResource = { + enablement?: boolean; }; -export type ProjectBinding = { - id: string; - devOpsPlatformSettingId: string; - projectId: string; - projectKey: string; - repository?: string; - slug?: string; +export type JiraWorkTypesSelectionResource = { + /** + * The Sonar project ID + */ + sonarProjectId?: string; + /** + * An array with the selected work type ids + */ + selectedWorkTypes?: Array; }; -export type ProjectBindingsSearchRestResponse = { - projectBindings?: Array; - page?: PageRestResponse; +export type PatchJiraProjectBindingRequestResource = { + /** + * Sonar project identifier + */ + sonarProjectId: string; + /** + * Jira project key + */ + jiraProjectKey: string; }; -export type PermissionMappingsSearchRestResponse = { - permissionMappings?: Array; +export type PatchJiraOrganizationBindingRequestResource = { + /** + * Sonar organization UUID + */ + sonarOrganizationUuid: string; + /** + * Jira cloud ID to bind with the organization + */ + jiraCloudId: string; + /** + * Jira instance URL + */ + jiraInstanceUrl: string; }; -export type GitlabConfigurationSearchRestResponse = { - gitlabConfigurations?: Array; - page?: PageRestResponse; +export type PatchJiraOrganizationBindingEditResource = { + /** + * Sonar organization UUID + */ + sonarOrganizationUuid: string; + /** + * TODO + */ + isTokenShared: boolean; }; -export type GithubConfigurationSearchRestResponse = { - githubConfigurations?: Array; - page?: PageRestResponse; +export type RuleTypeMapping = { + /** + * Rule type + */ + type: 'CODE_SMELL' | 'BUG' | 'VULNERABILITY' | 'SECURITY_HOTSPOT'; + /** + * List of severities + */ + severities: Array<'BLOCKER' | 'CRITICAL' | 'MAJOR' | 'MINOR' | 'INFO'>; }; -export type DopSettingsResource = { - readonly id?: string; +export type SandboxSettingsResource = { /** - * Supported DevOps Platform are: github, gitlab, azure, bitbucketcloud, bitbucket_server + * Whether sandbox is enabled globally */ - type?: string; - key?: string; - url?: string; - appId?: string; + enabled?: boolean; + /** + * Default value for projects + */ + defaultValue?: boolean; + /** + * Allow projects to override settings + */ + allowOverride?: boolean; + /** + * Software quality mappings (MQR mode) + */ + softwareQualities?: Array; + /** + * Rule type mappings (Standard Experience mode) + */ + types?: Array; }; -export type DopSettingsRestResponse = { - dopSettings?: Array; - page?: PageRestResponse; +export type SoftwareQualityMapping = { + /** + * Software quality + */ + softwareQuality: 'MAINTAINABILITY' | 'RELIABILITY' | 'SECURITY'; + /** + * List of impact severities + */ + impactSeverities: Array<'INFO' | 'LOW' | 'MEDIUM' | 'HIGH' | 'BLOCKER'>; }; -export type GroupsSearchRestResponse = { - groups?: Array; - page?: PageRestResponse; +export type SandboxSettingsProjectResource = { + /** + * Whether sandbox is enabled for this project + */ + enabled?: boolean; + /** + * Software quality mappings (MQR mode) + */ + softwareQualities?: Array; + /** + * Rule type mappings (Standard Experience mode) + */ + types?: Array; + /** + * Whether project settings override instance settings + */ + overridden?: boolean; }; -export type GroupsMembershipSearchRestResponse = { - groupMemberships?: Array; - page?: PageRestResponse; +export type IntegrationConfigurationPatchRequest = { + clientId?: string; + clientSecret?: string; + signingSecret?: string; }; -export type JreInfoRestResponse = { - id?: string; - filename?: string; - sha256?: string; - javaPath?: string; - os?: string; - arch?: string; +export type DevOpsPermissionMappingUpdateRequest = { + permissions?: PermissionMappingUpdate; }; -export type EngineInfoRestResponse = { - filename?: string; - sha256?: string; +export type PermissionMappingUpdate = { + user?: boolean; + codeViewer?: boolean; + issueAdmin?: boolean; + securityHotspotAdmin?: boolean; + admin?: boolean; + scan?: boolean; }; -export type ActiveRule = { - ruleKey?: RuleKey; - name?: string; - severity?: string; +export type GitlabConfigurationUpdateRestRequest = { + /** + * Enable Gitlab authentication + */ + enabled?: boolean; + /** + * Gitlab Application id + */ + applicationId?: string; + /** + * Url of Gitlab instance for authentication (for instance https://gitlab.com/api/v4) + */ + url?: string; + /** + * Secret of the application + */ + secret?: string; + /** + * Set whether to synchronize groups + */ + synchronizeGroups?: boolean; + allowedGroups?: UpdateFieldListString; + /** + * Type of synchronization + */ + provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; + /** + * Allow user to sign up + */ + allowUsersToSignUp?: boolean; + /** + * Gitlab token for provisioning + */ + provisioningToken?: string; +}; + +export type GithubConfigurationUpdateRestRequest = { + /** + * Enable GitHub authentication + */ + enabled?: boolean; + /** + * GitHub Client ID + */ + clientId?: string; + /** + * GitHub Client secret + */ + clientSecret?: string; + /** + * GitHub Application id + */ + applicationId?: string; + /** + * GitHub Private key + */ + privateKey?: string; + /** + * Set whether to synchronize groups + */ + synchronizeGroups?: boolean; + /** + * Url of GitHub instance for API connectivity (for instance https://api.github.com) + */ + apiUrl?: string; + /** + * Url of GitHub instance for authentication (for instance https://github.com) + */ + webUrl?: string; + allowedOrganizations?: UpdateFieldListString; + /** + * Type of synchronization + */ + provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; + /** + * Allow user to sign up + */ + allowUsersToSignUp?: boolean; + /** + * Sync project visibility + */ + projectVisibility?: boolean; + /** + * Admin consent to synchronize permissions from GitHub + */ + userConsentRequiredAfterUpgrade?: boolean; +}; + +export type ModeResource = { + mode: 'MQR' | 'STANDARD_EXPERIENCE'; + readonly modified?: boolean; +}; + +export type GroupUpdateRestRequest = { + /** + * Group name + */ + name?: string; + /** + * Description of the group + */ + description?: string; +}; + +export type PageRestResponse = { + pageIndex?: number; + pageSize?: number; + total?: number; +}; + +export type UsersSearchRestResponse = { + users?: Array; + page?: PageRestResponse; +}; + +export type DatabaseMigrationsResponse = { + status?: string; + completedSteps?: number; + totalSteps?: number; + startedAt?: string; + message?: string; + expectedFinishTimestamp?: string; +}; + +export type Health = { + status?: 'GREEN' | 'YELLOW' | 'RED'; + causes?: Array; +}; + +export type EmailConfigurationSearchRestResponse = { + emailConfigurations?: Array; + page?: PageRestResponse; +}; + +export type Category = { + activeRules?: number; + issues?: number; + key?: string; +}; + +export type GetAccessibilityReportResponse = { + categories?: Array; +}; + +export type SelfTestHttpCallResource = { + attemptedUrl?: string; + attemptedMethod?: string; + responseCode?: number; + responseBody?: string; + responseBodyAppearsValid?: boolean; + responseHeaders?: Array>; +}; + +export type SelfTestResponse = { + featureEnabled?: boolean; + selfTestPassed?: boolean; + cliVersionCheck?: SelfTestHttpCallResource; + vulnerabilityDetailsCheck?: SelfTestHttpCallResource; +}; + +export type SelfTestSpringConfigurationResponse = { + springVersion?: string; +}; + +export type RiskReportItem = { + projectKey?: string; + projectName?: string; + branchKey?: string; + riskTitle?: string; + riskType?: 'VULNERABILITY' | 'PROHIBITED_LICENSE'; + riskSeverity?: 'INFO' | 'LOW' | 'MEDIUM' | 'HIGH' | 'BLOCKER'; + riskStatus?: 'OPEN' | 'ACCEPT' | 'CONFIRM' | 'SAFE' | 'FIXED'; + statusChanges?: Array; + vulnerabilityId?: string; + cvssScore?: number; + cweIds?: Array; + publishedOn?: string; createdAt?: string; - updatedAt?: string; - internalKey?: string; - language?: string; - templateRuleKey?: string; - qProfileKey?: string; - deprecatedKeys?: Array; - params?: Array; - impacts?: { - [key: string]: 'INFO' | 'LOW' | 'MEDIUM' | 'HIGH' | 'BLOCKER'; - }; + packageUrl?: string; + riskUrl?: string; + dependencyChains?: Array>; + scope?: string; + productionScope?: boolean; }; -export type Param = { +export type StatusChange = { + comment?: string; + newStatus?: string; + createdAt?: string; +}; + +export type BranchResource = { + uuid?: string; key?: string; - value?: string; + pullRequest?: boolean; + projectKey?: string; + projectName?: string; }; -export type RuleKey = { - repository?: string; - rule?: string; +export type ReleasesSearchRestResponse = { + releases?: Array; + packageManagerCounts?: Array; + branches?: Array; + countWithoutFilters?: number; + page?: PageRestResponse; }; -/** - * Metric for a component - * - * A metric captured from a project - */ -export type Metric = { - key: string; - name: string; - type: string; - domain: string; - hidden: boolean; - description: string; - qualitative: boolean; - higherValuesAreBetter: boolean; +export type ScaReleaseByPackageManagerCountDto = { + packageManager?: string; + releaseCount?: number; }; -/** - * Used to represent a paged response - */ -export type Paging = { - total: number; - pageSize: number; - pageIndex: number; +export type DependencyResource = { + key?: string; + direct?: boolean; + scope?: string; + productionScope?: boolean; + userDependencyFilePath?: string; + lockfileDependencyFilePath?: string; + chains?: Array>; + newlyIntroduced?: boolean; }; -/** - * Measures from a project - */ -export type Measure = { - value: string; - metric: string; - period: { - value: boolean; - bestValue: string; - }; +export type IssueResource = { + key?: string; + severity?: string; + showIncreasedSeverityWarning?: boolean; + type?: 'VULNERABILITY' | 'PROHIBITED_LICENSE'; + quality?: 'MAINTAINABILITY' | 'RELIABILITY' | 'SECURITY'; + createdAt?: string; + assignee?: UserResource; + vulnerabilityId?: string; + cweIds?: Array; + cvssScore?: string; + spdxLicenseId?: string; }; -/** - * A component is a representation of a Project in Sonarqube - */ -export type Component = { - key: string; - name: string; - managed: string; - revision: string; - qualifier: string; - visibility: string; - lastAnalysisDate: string; +export type ReleaseDetailResource = { + key?: string; + branchUuid?: string; + packageUrl?: string; + packageManager?: string; + packageName?: string; + version?: string; + licenseExpression?: string; + known?: boolean; + knownPackage?: boolean; + newlyIntroduced?: boolean; + directSummary?: boolean; + scopeSummary?: string; + productionScopeSummary?: boolean; + dependencies?: Array; + issues?: Array; + branch?: BranchResource; }; -/** - * Issue Search Response - * - * Response object from the Issue Search API - */ -export type IssueSearchResponse = { - rules: Array<{ +export type LicenseProfileCollectionActions = { + create?: boolean; +}; + +export type LicenseProfileIndexRestResponse = { + licenseProfiles?: Array; + actions?: LicenseProfileCollectionActions; +}; + +export type LicenseProfileDetailsResource = { + profile?: LicenseProfileResource; + categories?: Array; + licenses?: Array; +}; + +export type AssignableProjectResource = { + projectKey?: string; + projectName?: string; + assignedToLicenseProfile?: boolean; +}; + +export type AssignableProjectsIndexRestResponse = { + assignableProjects?: Array; + page?: PageRestResponse; +}; + +export type IssueReleaseResource = { + key?: string; + severity?: string; + originalSeverity?: string; + manualSeverity?: string; + showIncreasedSeverityWarning?: boolean; + release?: ReleaseSearchResource; + type?: 'VULNERABILITY' | 'PROHIBITED_LICENSE'; + quality?: 'MAINTAINABILITY' | 'RELIABILITY' | 'SECURITY'; + status?: string; + createdAt?: string; + assignee?: UserResource; + commentCount?: number; + vulnerabilityId?: string; + cweIds?: Array; + cvssScore?: string; + withdrawn?: boolean; + spdxLicenseId?: string; + transitions?: Array<'CONFIRM' | 'REOPEN' | 'SAFE' | 'FIXED' | 'ACCEPT'>; + actions?: Array<'COMMENT' | 'ASSIGN' | 'SET_SEVERITY'>; +}; + +export type IssuesReleasesSearchRestResponse = { + issuesReleases?: Array; + branches?: Array; + countWithoutFilters?: number; + page?: PageRestResponse; +}; + +export type IssueReleaseChangeDiffResource = { + fieldName?: string; + oldValue?: string; + newValue?: string; +}; + +export type IssueReleaseChangeResource = { + key?: string; + createdAt?: string; + user?: UserResource; + markdownComment?: string; + htmlComment?: string; + changeData?: Array; + actions?: Array<'EDIT_COMMENT' | 'DELETE_COMMENT'>; +}; + +export type IssuesReleasesChangesRestResponse = { + changelog?: Array; +}; + +export type ScaFeatureEnabledResource = { + enabled?: boolean; +}; + +export type ScaCliInfoRestResponse = { + id?: string; + filename?: string; + sha256?: string; + os?: string; + arch?: string; +}; + +export type AnalysisErrorResource = { + code?: + | 'UNKNOWN' + | 'NO_DEPENDENCIES_FOUND' + | 'DEPENDENCY_FILES_PARSE_ERROR' + | 'UNSUPPORTED_PLATFORM' + | 'INEXACT_VERSIONS' + | 'MISSING_LOCKFILE'; + path?: string; + message?: string; +}; + +export type AnalysisResource = { + status?: 'FAILED' | 'OUTDATED' | 'COMPLETED'; + failedReason?: string; + errors?: Array; + parsedFiles?: Array; +}; + +export type JiraWorkTypeFieldResultResource = { + /** + * The field key + */ + readonly key?: string; + /** + * The field name + */ + readonly name?: string; + /** + * Whether the field is required + */ + readonly required?: boolean; + /** + * Whether the field has a default value + */ + readonly hasDefaultValue?: boolean; +}; + +export type JiraWorkTypeResultResource = { + /** + * the Jira work type id + */ + readonly id?: string; + /** + * the Jira work type name + */ + readonly name?: string; + /** + * the Jira work type description + */ + readonly description?: string; + /** + * true, if the Jira work type is a subtask + */ + readonly subtask?: boolean; + /** + * the Jira work type hierarchy + */ + readonly hierarchyLevel?: number; + /** + * true, if the Jira work type is selected + */ + readonly selected?: boolean; + /** + * Array of field metadata for the specified work type. (Optional) + */ + readonly fields?: Array; +}; + +export type JiraProjectResultResource = { + /** + * the name of the project + */ + readonly name?: string; + /** + * the key of the project + */ + readonly key?: string; +}; + +export type LinkedIssuesCountResource = { + /** + * Count of linked Jira issues + */ + readonly count?: number; +}; + +export type IntegrationConfigurationSearchResponse = { + integrationConfigurations?: Array; +}; + +export type SupportedRulesDto = { + rules?: Array; +}; + +export type LlmModelDto = { + key?: string; + name?: string; + recommended?: boolean; +}; + +export type LlmProviderResponseDto = { + key?: string; + name?: string; + selfHosted?: boolean; + models?: Array; +}; + +export type ServiceInfo = { + status?: + | 'CONNECTION_ERROR' + | 'SERVICE_ERROR' + | 'SUCCESS' + | 'TIMEOUT' + | 'UNAUTHORIZED'; +}; + +export type FixSuggestionIssueResponse = { + issueId?: string; + aiSuggestion?: + | 'AVAILABLE' + | 'NOT_AVAILABLE_FILE_LEVEL_ISSUE' + | 'NOT_AVAILABLE_UNSUPPORTED_RULE' + | 'NOT_AVAILABLE_FILE_SIZE'; +}; + +export type FeatureEnablementResponse = { + enablement?: + | 'DISABLED' + | 'ENABLED_FOR_ALL_PROJECTS' + | 'ENABLED_FOR_SOME_PROJECTS'; + enabledProjectKeys?: Array; + provider?: ProviderResponseDto; +}; + +export type ProviderResponseDto = { + key?: string; + modelKey?: string; + endpoint?: string; +}; + +export type PurchasableFeatureRestResponse = { + featureKey?: string; + parent?: string; + isEnabled?: boolean; + isAvailable?: boolean; + url?: string; +}; + +export type LicenseFeatureRestResponse = { + name?: string; + parent?: string; + startDate?: string; + endDate?: string; +}; + +export type LicenseRestResponse = { + expirationDate?: string; + lastRefreshDate?: string; + edition?: string; + features?: Array; + maxLoc?: bigint; + loc?: bigint; + serverId?: string; + type?: string; + contactEmail?: string; + remainingLocThreshold?: bigint; + canActivateGracePeriod?: boolean; + gracePeriodEndDate?: string; + gracePeriodExpired?: boolean; + extraDays?: number; + startDate?: string; + activatedOnline?: boolean; + licenseKey?: string; + validEdition?: boolean; + validServerId?: boolean; + officialDistribution?: boolean; + supported?: boolean; + legacy?: boolean; + expired?: boolean; + disabled?: boolean; +}; + +export type ProjectBinding = { + id: string; + devOpsPlatformSettingId: string; + projectId: string; + projectKey: string; + repository?: string; + slug?: string; +}; + +export type ProjectBindingsSearchRestResponse = { + projectBindings?: Array; + page?: PageRestResponse; +}; + +export type PermissionMappingsSearchRestResponse = { + permissionMappings?: Array; +}; + +export type GitlabConfigurationSearchRestResponse = { + gitlabConfigurations?: Array; + page?: PageRestResponse; +}; + +export type GithubConfigurationSearchRestResponse = { + githubConfigurations?: Array; + page?: PageRestResponse; +}; + +export type DopSettingsResource = { + readonly id?: string; + /** + * Supported DevOps Platform are: github, gitlab, azure, bitbucketcloud, bitbucket_server + */ + type?: string; + key?: string; + url?: string; + appId?: string; +}; + +export type DopSettingsRestResponse = { + dopSettings?: Array; + page?: PageRestResponse; +}; + +export type GroupsSearchRestResponse = { + groups?: Array; + page?: PageRestResponse; +}; + +export type GroupsMembershipSearchRestResponse = { + groupMemberships?: Array; + page?: PageRestResponse; +}; + +export type A = { + graphs?: Array; +}; + +export type H = { + id?: string; + branchId?: string; + type?: 'file_graph' | 'namespace_graph'; + ecosystem?: 'java' | 'js' | 'ts' | 'py' | 'cs' | 'xoo'; + perspectiveKey?: string; + graphVersion?: string; +}; + +export type JreInfoRestResponse = { + id?: string; + filename?: string; + sha256?: string; + javaPath?: string; + os?: string; + arch?: string; +}; + +export type EngineInfoRestResponse = { + filename?: string; + sha256?: string; +}; + +export type ActiveRule = { + ruleKey?: RuleKey; + name?: string; + severity?: string; + createdAt?: string; + updatedAt?: string; + internalKey?: string; + language?: string; + templateRuleKey?: string; + qProfileKey?: string; + deprecatedKeys?: Array; + params?: Array; + impacts?: { + [key: string]: 'INFO' | 'LOW' | 'MEDIUM' | 'HIGH' | 'BLOCKER'; + }; +}; + +export type Param = { + key?: string; + value?: string; +}; + +export type RuleKey = { + repository?: string; + rule?: string; +}; + +/** + * Metric for a component + * + * A metric captured from a project + */ +export type Metric = { + key: string; + name: string; + type: string; + domain: string; + hidden: boolean; + description: string; + qualitative: boolean; + higherValuesAreBetter: boolean; +}; + +/** + * Used to represent a paged response + */ +export type Paging = { + total: number; + pageSize: number; + pageIndex: number; +}; + +/** + * Measures from a project + */ +export type Measure = { + value: string; + metric: string; + period: { + value: boolean; + bestValue: string; + }; +}; + +/** + * A component is a representation of a Project in Sonarqube + */ +export type Component = { + key: string; + name: string; + managed: string; + revision: string; + qualifier: string; + visibility: string; + lastAnalysisDate: string; +}; + +/** + * Issue Search Response + * + * Response object from the Issue Search API + */ +export type IssueSearchResponse = { + rules: Array<{ key: string; lang: string; name: string; @@ -1300,645 +2131,1516 @@ export type IssueSearchResponse = { }>; }; -/** - * Response type for searching for a project - */ -export type ProjectSearchResponse = { - paging: Paging; - components: Array; +/** + * Response type for searching for a project + */ +export type ProjectSearchResponse = { + paging: Paging; + components: Array; +}; + +/** + * Generated schema for Root + * + * Response from the /measures/component endpoint + */ +export type MeasureComponentResponse = { + period: { + date: string; + mode: string; + parameter: string; + }; + metrics: Array; + component: { + key: string; + name: string; + path: string; + language: string; + measures: Array; + qualifier: string; + }; +}; + +/** + * User Token Details + * + * A user token + */ +export type UserTokenDetails = { + /** + * Token name + */ + name: string; + /** + * Token creation date + */ + createdAt: Date; + /** + * Last date the token was used (updated hourly) + */ + lastConnectionDate?: Date; + /** + * Token expiration date + */ + expirationDate?: Date; + /** + * Whether the token has expired + */ + isExpired?: boolean; + /** + * Token type + */ + type: + | 'USER_TOKEN' + | 'GLOBAL_ANALYSIS_TOKEN' + | 'PROJECT_ANALYSIS_TOKEN' + | 'PROJECT_BADGE_TOKEN'; + /** + * Project details for PROJECT_ANALYSIS_TOKEN + */ + project?: { + /** + * Project key + */ + key: string; + /** + * Project name + */ + name: string; + }; +}; + +/** + * User Token Search Response + * + * Response from the user token search endpoint + */ +export type UserTokenSearchResponse = { + /** + * User login + */ + login?: string; + userTokens: Array; +}; + +/** + * User Token Generate Response + * + * Response from the user token generate endpoint + */ +export type UserTokenGenerateResponse = { + /** + * User login + */ + login: string; + /** + * Token name + */ + name: string; + /** + * The generated token value (only returned once) + */ + token: string; + /** + * Token creation date + */ + createdAt: Date; + /** + * Token type + */ + type: + | 'USER_TOKEN' + | 'GLOBAL_ANALYSIS_TOKEN' + | 'PROJECT_ANALYSIS_TOKEN' + | 'PROJECT_BADGE_TOKEN'; + /** + * Project key for PROJECT_ANALYSIS_TOKEN + */ + projectKey?: string; + /** + * Token expiration date + */ + expirationDate?: Date; +}; + +export type UserCreateRestRequestWritable = { + /** + * User email + */ + email?: string; + /** + * Specify if the user should be authenticated from SonarQube server or from an external authentication system. Password should not be set when local is set to false. + */ + local?: boolean; + /** + * User login + */ + login: string; + /** + * User name + */ + name: string; + /** + * User password. Only mandatory when creating local user, otherwise it should not be set + */ + password?: string; + /** + * List of SCM accounts. + */ + scmAccounts?: Array; +}; + +export type UserRestResponseForAdminsWritable = { + login?: string; + name?: string; + email?: string; + externalLogin?: string; + externalProvider?: string; + externalId?: string; + avatar?: string; + scmAccounts?: Array; +}; + +export type EmailConfigurationCreateRestRequestWritable = { + /** + * URL of your SMTP server + */ + host: string; + /** + * Port of your SMTP server (usually 25, 587 or 465) + */ + port: string; + /** + * Security protocol used to connect to your SMTP server (SSLTLS is recommended) + */ + securityProtocol: 'NONE' | 'SSLTLS' | 'STARTTLS'; + /** + * Address emails will come from + */ + fromAddress: string; + /** + * Name emails will come from (usually "SonarQube") + */ + fromName: string; + /** + * Prefix added to email so they can be easily recognized (usually "[SonarQube]") + */ + subjectPrefix: string; + /** + * Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange + */ + authMethod: 'BASIC' | 'OAUTH'; + /** + * For Basic and OAuth authentication: username used to authenticate to the SMTP server + */ + username: string; + /** + * For basic authentication: password used to authenticate to the SMTP server + */ + basicPassword?: string; + /** + * For OAuth authentication: host of the Identity Provider issuing access tokens + */ + oauthAuthenticationHost?: string; + /** + * For OAuth authentication: Client ID provided by Microsoft Exchange when registering the application + */ + oauthClientId?: string; + /** + * For OAuth authentication: Client secret provided by Microsoft Exchange when registering the application + */ + oauthClientSecret?: string; + /** + * For OAuth authentication: Microsoft tenant + */ + oauthTenant?: string; +}; + +export type EmailConfigurationResourceWritable = { + /** + * URL of your SMTP server + */ + host?: string; + /** + * Port of your SMTP server (usually 25, 587 or 465) + */ + port?: string; + /** + * Security protocol used to connect to your SMTP server (SSLTLS is recommended) + */ + securityProtocol?: 'NONE' | 'SSLTLS' | 'STARTTLS'; + /** + * Address emails will come from + */ + fromAddress?: string; + /** + * Name emails will come from (usually "SonarQube") + */ + fromName?: string; + /** + * Prefix added to email so they can be easily recognized (usually "[SonarQube]") + */ + subjectPrefix?: string; + /** + * Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange + */ + authMethod?: 'BASIC' | 'OAUTH'; + /** + * For Basic and OAuth authentication: username used to authenticate to the SMTP server + */ + username?: string; + /** + * For Basic authentication: has the password field been set? + */ + isBasicPasswordSet?: boolean; + /** + * For OAuth authentication: host of the Identity Provider issuing access tokens + */ + oauthAuthenticationHost?: string; + /** + * For OAuth authentication: has the Client ID field been set? + */ + isOauthClientIdSet?: boolean; + /** + * For OAuth authentication: has the Client secret field been set? + */ + isOauthClientSecretSet?: boolean; + /** + * For OAuth authentication: Microsoft tenant + */ + oauthTenant?: string; +}; + +export type GitlabConfigurationCreateRestRequestWritable = { + /** + * Enable Gitlab authentication + */ + enabled: boolean; + /** + * Gitlab Application id + */ + applicationId: string; + /** + * Url of Gitlab instance for authentication (for instance https://gitlab.com) + */ + url: string; + /** + * Secret of the application + */ + secret: string; + /** + * Set whether to synchronize groups + */ + synchronizeGroups: boolean; + allowedGroups: Array; + /** + * Type of synchronization + */ + provisioningType: 'JIT' | 'AUTO_PROVISIONING'; + /** + * Gitlab token for provisioning + */ + provisioningToken?: string; + /** + * Allow user to sign up + */ + allowUsersToSignUp?: boolean; +}; + +export type GitlabConfigurationResourceWritable = { + enabled?: boolean; + /** + * Gitlab Application id + */ + applicationId?: string; + /** + * Url of Gitlab instance for authentication (for instance https://gitlab.com/api/v4) + */ + url?: string; + synchronizeGroups?: boolean; + /** + * Root Gitlab groups allowed to authenticate and provisioned + */ + allowedGroups?: Array; + allowUsersToSignUp?: boolean; + provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; +}; + +export type GithubConfigurationCreateRestRequestWritable = { + /** + * Enable GitHub authentication + */ + enabled: boolean; + /** + * Client ID provided by GitHub when registering the application. + */ + clientId: string; + /** + * Client password provided by GitHub when registering the application. + */ + clientSecret: string; + /** + * The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps. + */ + applicationId: string; + /** + * Your GitHub App's private key. You can generate a .pem file from your GitHub App's page under Private keys. + * Copy and paste the whole contents of the file here. + * + */ + privateKey: string; + /** + * Synchronize GitHub team with SonarQube group memberships when users log in to SonarQube. + * For each GitHub team they belong to, users will be associated to a group of the same name if it exists in SonarQube. + * + */ + synchronizeGroups: boolean; + /** + * The API url for a GitHub instance. https://api.github.com/ for Github.com, https://github.company.com/api/v3/ when using Github Enterprise + */ + apiUrl: string; + /** + * The WEB url for a GitHub instance. https://github.com/ for Github.com, https://github.company.com/ when using GitHub Enterprise. + * + */ + webUrl: string; + allowedOrganizations: Array; + /** + * Type of synchronization + */ + provisioningType: 'JIT' | 'AUTO_PROVISIONING'; + /** + * Allow user to sign up + */ + allowUsersToSignUp?: boolean; + /** + * Change project visibility based on GitHub repository visibility. + * If disabled, every provisioned project will be private in SonarQube and visible only to users with explicit GitHub permissions for the corresponding repository. + * Changes take effect at the next synchronization. + * + */ + projectVisibility?: boolean; + /** + * Admin consent to synchronize permissions from GitHub + */ + userConsentRequiredAfterUpgrade?: boolean; +}; + +export type GithubConfigurationResourceWritable = { + enabled?: boolean; + /** + * GitHub Application id + */ + applicationId?: string; + synchronizeGroups?: boolean; + /** + * Url of GitHub instance for API connectivity (for instance https://api.github.com) + */ + apiUrl?: string; + /** + * Url of GitHub instance for authentication (for instance https://github.com) + */ + webUrl?: string; + /** + * GitHub organizations allowed to authenticate and provisioned + */ + allowedOrganizations?: Array; + provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; + allowUsersToSignUp?: boolean; + projectVisibility?: boolean; + userConsentRequiredAfterUpgrade?: boolean; }; -/** - * Generated schema for Root - * - * Response from the /measures/component endpoint - */ -export type MeasureComponentResponse = { - period: { - date: string; - mode: string; - parameter: string; - }; - metrics: Array; - component: { - key: string; - name: string; - path: string; - language: string; - measures: Array; - qualifier: string; - }; +export type ParameterWritable = { + key?: string; + defaultValue?: string; }; -/** - * User Token Details - * - * A user token - */ -export type UserTokenDetails = { +export type RuleCreateRestRequestWritable = { /** - * Token name + * Key of the custom rule to create, must include the repository + */ + key: string; + /** + * Key of the rule template to be used to create the custom rule + */ + templateKey: string; + /** + * Rule name */ name: string; /** - * Token creation date + * Rule description in markdown format */ - createdAt: Date; + markdownDescription: string; /** - * Last date the token was used (updated hourly) + * Rule status */ - lastConnectionDate?: Date; + status?: 'BETA' | 'DEPRECATED' | 'READY' | 'REMOVED'; /** - * Token expiration date + * Custom rule parameters */ - expirationDate?: Date; + parameters?: Array; /** - * Whether the token has expired + * Clean code attribute */ - isExpired?: boolean; + cleanCodeAttribute?: + | 'CONVENTIONAL' + | 'FORMATTED' + | 'IDENTIFIABLE' + | 'CLEAR' + | 'COMPLETE' + | 'EFFICIENT' + | 'LOGICAL' + | 'DISTINCT' + | 'FOCUSED' + | 'MODULAR' + | 'TESTED' + | 'LAWFUL' + | 'RESPECTFUL' + | 'TRUSTWORTHY'; /** - * Token type + * Impacts */ - type: - | 'USER_TOKEN' - | 'GLOBAL_ANALYSIS_TOKEN' - | 'PROJECT_ANALYSIS_TOKEN' - | 'PROJECT_BADGE_TOKEN'; + impacts: Array; /** - * Project details for PROJECT_ANALYSIS_TOKEN + * Severity */ - project?: { + severity?: string; + /** + * Rule type + */ + type?: 'CODE_SMELL' | 'BUG' | 'VULNERABILITY' | 'SECURITY_HOTSPOT'; +}; + +export type RuleDescriptionSectionRestResponseWritable = { + [key: string]: unknown; +}; + +export type RuleRestResponseWritable = { + id?: string; + key?: string; + repositoryKey?: string; + name?: string; + severity?: string; + type?: 'CODE_SMELL' | 'BUG' | 'VULNERABILITY' | 'SECURITY_HOTSPOT'; + impacts?: Array; + cleanCodeAttribute?: + | 'CONVENTIONAL' + | 'FORMATTED' + | 'IDENTIFIABLE' + | 'CLEAR' + | 'COMPLETE' + | 'EFFICIENT' + | 'LOGICAL' + | 'DISTINCT' + | 'FOCUSED' + | 'MODULAR' + | 'TESTED' + | 'LAWFUL' + | 'RESPECTFUL' + | 'TRUSTWORTHY'; + cleanCodeAttributeCategory?: + | 'ADAPTABLE' + | 'CONSISTENT' + | 'INTENTIONAL' + | 'RESPONSIBLE'; + status?: 'BETA' | 'DEPRECATED' | 'READY' | 'REMOVED'; + external?: boolean; + createdAt?: string; + descriptionSections?: Array; + markdownDescription?: string; + gapDescription?: string; + htmlNote?: string; + markdownNote?: string; + educationPrinciples?: Array; + template?: boolean; + templateId?: string; + tags?: Array; + systemTags?: Array; + languageKey?: string; + languageName?: string; + parameters?: Array; + remediationFunctionType?: string; + remediationFunctionGapMultiplier?: string; + remediationFunctionBaseEffort?: string; +}; + +export type GroupRestResponseWritable = { + name?: string; + description?: string; +}; + +export type ModeResourceWritable = { + mode: 'MQR' | 'STANDARD_EXPERIENCE'; +}; + +export type UsersSearchRestResponseWritable = { + users?: Array; + page?: PageRestResponse; +}; + +export type EmailConfigurationSearchRestResponseWritable = { + emailConfigurations?: Array; + page?: PageRestResponse; +}; + +export type GitlabConfigurationSearchRestResponseWritable = { + gitlabConfigurations?: Array; + page?: PageRestResponse; +}; + +export type GithubConfigurationSearchRestResponseWritable = { + githubConfigurations?: Array; + page?: PageRestResponse; +}; + +export type DopSettingsResourceWritable = { + /** + * Supported DevOps Platform are: github, gitlab, azure, bitbucketcloud, bitbucket_server + */ + type?: string; + key?: string; + url?: string; + appId?: string; +}; + +export type DopSettingsRestResponseWritable = { + dopSettings?: Array; + page?: PageRestResponse; +}; + +export type GroupsSearchRestResponseWritable = { + groups?: Array; + page?: PageRestResponse; +}; + +export type GroupsMembershipSearchRestResponseWritable = { + groupMemberships?: Array; + page?: PageRestResponse; +}; + +/** + * Current page + */ +export type P = number; + +/** + * Page size. Must be greater than 0 and less or equal than 500 + */ +export type Ps = bigint; + +export type SearchData = { + body?: never; + path?: never; + query?: { + /** + * Return active/inactive users + */ + active?: boolean; + /** + * Return managed or non-managed users. Only available for managed instances, throws for non-managed instances + */ + managed?: boolean; + /** + * Filter on login, name and email. + * This parameter performs a partial match (contains), it is case insensitive. + */ + q?: string; + /** + * Filter on externalIdentity. + * This parameter perform a case-sensitive exact match + */ + externalIdentity?: string; + /** + * Filter users based on the last connection date field. Only users who interacted with this instance at or after the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm) + */ + sonarQubeLastConnectionDateFrom?: string; + /** + * Filter users based on the last connection date field. Only users that never connected or who interacted with this instance at or before the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm) + */ + sonarQubeLastConnectionDateTo?: string; + /** + * Filter users based on the SonarLint last connection date field Only users who interacted with this instance using SonarLint at or after the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm) + */ + sonarLintLastConnectionDateFrom?: string; /** - * Project key + * Filter users based on the SonarLint last connection date field. Only users that never connected or who interacted with this instance using SonarLint at or before the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm) */ - key: string; + sonarLintLastConnectionDateTo?: string; /** - * Project name + * Filter users belonging to group. Only available for system administrators. Using != operator will exclude users from this group. */ - name: string; + groupId?: string; + /** + * Number of results per page. A value of 0 will only return the pagination information. + */ + pageSize?: number; + /** + * 1-based page index + */ + pageIndex?: number; }; + url: '/v2/users-management/users'; }; -/** - * User Token Search Response - * - * Response from the user token search endpoint - */ -export type UserTokenSearchResponse = { +export type SearchResponses = { /** - * User login + * OK */ - login?: string; - userTokens: Array; + 200: UsersSearchRestResponse; }; -/** - * User Token Generate Response - * - * Response from the user token generate endpoint - */ -export type UserTokenGenerateResponse = { - /** - * User login - */ - login: string; - /** - * Token name - */ - name: string; - /** - * The generated token value (only returned once) - */ - token: string; - /** - * Token creation date - */ - createdAt: Date; - /** - * Token type - */ - type: - | 'USER_TOKEN' - | 'GLOBAL_ANALYSIS_TOKEN' - | 'PROJECT_ANALYSIS_TOKEN' - | 'PROJECT_BADGE_TOKEN'; - /** - * Project key for PROJECT_ANALYSIS_TOKEN - */ - projectKey?: string; - /** - * Token expiration date - */ - expirationDate?: Date; +export type SearchResponse = SearchResponses[keyof SearchResponses]; + +export type CreateData = { + body: UserCreateRestRequestWritable; + path?: never; + query?: never; + url: '/v2/users-management/users'; }; -export type UserCreateRestRequestWritable = { - /** - * User email - */ - email?: string; - /** - * Specify if the user should be authenticated from SonarQube server or from an external authentication system. Password should not be set when local is set to false. - */ - local?: boolean; - /** - * User login - */ - login: string; - /** - * User name - */ - name: string; - /** - * User password. Only mandatory when creating local user, otherwise it should not be set - */ - password?: string; +export type CreateResponses = { /** - * List of SCM accounts. + * OK */ - scmAccounts?: Array; + 200: UserRestResponseForAdmins; }; -export type UserRestResponseForAdminsWritable = { - login?: string; - name?: string; - email?: string; - externalLogin?: string; - externalProvider?: string; - externalId?: string; - avatar?: string; - scmAccounts?: Array; +export type CreateResponse = CreateResponses[keyof CreateResponses]; + +export type SearchEmailConfigurationsData = { + body?: never; + path?: never; + query?: never; + url: '/v2/system/email-configurations'; }; -export type EmailConfigurationCreateRestRequestWritable = { - /** - * URL of your SMTP server - */ - host: string; - /** - * Port of your SMTP server (usually 25, 587 or 465) - */ - port: string; - /** - * Security protocol used to connect to your SMTP server (SSLTLS is recommended) - */ - securityProtocol: 'NONE' | 'SSLTLS' | 'STARTTLS'; - /** - * Address emails will come from - */ - fromAddress: string; - /** - * Name emails will come from (usually "SonarQube") - */ - fromName: string; - /** - * Prefix added to email so they can be easily recognized (usually "[SonarQube]") - */ - subjectPrefix: string; - /** - * Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange - */ - authMethod: 'BASIC' | 'OAUTH'; - /** - * For Basic and OAuth authentication: username used to authenticate to the SMTP server - */ - username: string; - /** - * For basic authentication: password used to authenticate to the SMTP server - */ - basicPassword?: string; - /** - * For OAuth authentication: host of the Identity Provider issuing access tokens - */ - oauthAuthenticationHost?: string; - /** - * For OAuth authentication: Client ID provided by Microsoft Exchange when registering the application - */ - oauthClientId?: string; - /** - * For OAuth authentication: Client secret provided by Microsoft Exchange when registering the application - */ - oauthClientSecret?: string; +export type SearchEmailConfigurationsResponses = { /** - * For OAuth authentication: Microsoft tenant + * OK */ - oauthTenant?: string; + 200: EmailConfigurationSearchRestResponse; }; -export type EmailConfigurationResourceWritable = { - /** - * URL of your SMTP server - */ - host?: string; - /** - * Port of your SMTP server (usually 25, 587 or 465) - */ - port?: string; - /** - * Security protocol used to connect to your SMTP server (SSLTLS is recommended) - */ - securityProtocol?: 'NONE' | 'SSLTLS' | 'STARTTLS'; - /** - * Address emails will come from - */ - fromAddress?: string; - /** - * Name emails will come from (usually "SonarQube") - */ - fromName?: string; - /** - * Prefix added to email so they can be easily recognized (usually "[SonarQube]") - */ - subjectPrefix?: string; - /** - * Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange - */ - authMethod?: 'BASIC' | 'OAUTH'; - /** - * For Basic and OAuth authentication: username used to authenticate to the SMTP server - */ - username?: string; +export type SearchEmailConfigurationsResponse = + SearchEmailConfigurationsResponses[keyof SearchEmailConfigurationsResponses]; + +export type CreateEmailConfigurationData = { + body: EmailConfigurationCreateRestRequestWritable; + path?: never; + query?: never; + url: '/v2/system/email-configurations'; +}; + +export type CreateEmailConfigurationResponses = { /** - * For Basic authentication: has the password field been set? + * OK */ - isBasicPasswordSet?: boolean; + 200: EmailConfigurationResource; +}; + +export type CreateEmailConfigurationResponse = + CreateEmailConfigurationResponses[keyof CreateEmailConfigurationResponses]; + +export type IndexData = { + body?: never; + path?: never; + query?: { + /** + * If provided, filter to the license profile that is used to analyze the project (if one exists). + * + */ + projectKey?: string; + }; + url: '/v2/sca/license-profiles'; +}; + +export type IndexResponses = { /** - * For OAuth authentication: host of the Identity Provider issuing access tokens + * OK */ - oauthAuthenticationHost?: string; + 200: LicenseProfileIndexRestResponse; +}; + +export type IndexResponse = IndexResponses[keyof IndexResponses]; + +export type Create1Data = { + body: LicenseProfilesCreateRestRequest; + path?: never; + query?: never; + url: '/v2/sca/license-profiles'; +}; + +export type Create1Responses = { /** - * For OAuth authentication: has the Client ID field been set? + * Created */ - isOauthClientIdSet?: boolean; + 201: LicenseProfileResource; +}; + +export type Create1Response = Create1Responses[keyof Create1Responses]; + +export type UpdateAssigneeData = { + body: UpdateAssigneeRestRequest; + path?: never; + query?: never; + url: '/v2/sca/issues-releases/update-assignee'; +}; + +export type UpdateAssigneeResponses = { /** - * For OAuth authentication: has the Client secret field been set? + * OK */ - isOauthClientSecretSet?: boolean; + 200: IssueReleaseDetailsResource; +}; + +export type UpdateAssigneeResponse = + UpdateAssigneeResponses[keyof UpdateAssigneeResponses]; + +export type SetSeverityData = { + body: IssueReleaseSetSeverityRestRequest; + path?: never; + query?: never; + url: '/v2/sca/issues-releases/set-severity'; +}; + +export type SetSeverityResponses = { /** - * For OAuth authentication: Microsoft tenant + * OK */ - oauthTenant?: string; + 200: IssueReleaseDetailsResource; }; -export type GitlabConfigurationCreateRestRequestWritable = { +export type SetSeverityResponse = + SetSeverityResponses[keyof SetSeverityResponses]; + +export type ClearSeverityWarningData = { + body: IssueReleaseClearSeverityWarningRestRequest; + path?: never; + query?: never; + url: '/v2/sca/issues-releases/clear-severity-warning'; +}; + +export type ClearSeverityWarningResponses = { /** - * Enable Gitlab authentication + * OK */ - enabled: boolean; + 200: IssueReleaseDetailsResource; +}; + +export type ClearSeverityWarningResponse = + ClearSeverityWarningResponses[keyof ClearSeverityWarningResponses]; + +export type TransitionIssueReleaseData = { + body: IssueReleaseStatusTransitionRequest; + path?: never; + query?: never; + url: '/v2/sca/issues-releases/change-status'; +}; + +export type TransitionIssueReleaseResponses = { /** - * Gitlab Application id + * OK */ - applicationId: string; + 200: IssueReleaseDetailsResource; +}; + +export type TransitionIssueReleaseResponse = + TransitionIssueReleaseResponses[keyof TransitionIssueReleaseResponses]; + +export type AddCommentData = { + body: IssueReleaseAddCommentRestRequest; + path?: never; + query?: never; + url: '/v2/sca/issues-releases/add-comment'; +}; + +export type AddCommentResponses = { /** - * Url of Gitlab instance for authentication (for instance https://gitlab.com) + * Created */ - url: string; + 201: unknown; +}; + +export type BillAzureAccountData = { + body?: never; + path?: never; + query?: never; + url: '/v2/marketplace/azure/billing'; +}; + +export type BillAzureAccountResponses = { /** - * Secret of the application + * OK */ - secret: string; + 200: AzureBillingRestResponse; +}; + +export type BillAzureAccountResponse = + BillAzureAccountResponses[keyof BillAzureAccountResponses]; + +export type 絛Data = { + body?: never; + path?: never; + query: { + sonarProjectId: string; + resourceId: string; + resourceType: 'SONAR_ISSUE' | 'DEPENDENCY_RISK'; + }; + url: '/v2/jira/work-items'; +}; + +export type 絛Responses = { /** - * Set whether to synchronize groups + * No Content */ - synchronizeGroups: boolean; - allowedGroups: Array; + 204: void; +}; + +export type 絛Response = 絛Responses[keyof 絛Responses]; + +export type 鲥Data = { + body?: never; + path?: never; + query: { + sonarProjectId: string; + resourceId: string; + resourceType: 'SONAR_ISSUE' | 'DEPENDENCY_RISK'; + }; + url: '/v2/jira/work-items'; +}; + +export type 鲥Responses = { /** - * Type of synchronization + * OK */ - provisioningType: 'JIT' | 'AUTO_PROVISIONING'; + 200: JiraWorkItemResource; +}; + +export type 鲥Response = 鲥Responses[keyof 鲥Responses]; + +export type 鲥1Data = { + body: PostJiraWorkItemRequestResource; + path?: never; + query?: never; + url: '/v2/jira/work-items'; +}; + +export type 鲥1Responses = { /** - * Gitlab token for provisioning + * Created */ - provisioningToken?: string; + 201: JiraWorkItemResource; +}; + +export type 鲥1Response = 鲥1Responses[keyof 鲥1Responses]; + +export type 絛1Data = { + body?: never; + path?: never; + query: { + sonarProjectId: string; + }; + url: '/v2/jira/project-bindings'; +}; + +export type 絛1Responses = { /** - * Allow user to sign up + * No Content */ - allowUsersToSignUp?: boolean; + 204: void; }; -export type GitlabConfigurationResourceWritable = { - enabled?: boolean; +export type 絛1Response = 絛1Responses[keyof 絛1Responses]; + +export type 鲥2Data = { + body?: never; + path?: never; + query: { + sonarProjectId: string; + }; + url: '/v2/jira/project-bindings'; +}; + +export type 鲥2Responses = { /** - * Gitlab Application id + * OK */ - applicationId?: string; + 200: JiraProjectBindingResource; +}; + +export type 鲥2Response = 鲥2Responses[keyof 鲥2Responses]; + +export type 鲥4Data = { + body: PatchJiraProjectBindingRequestResource; + path?: never; + query?: never; + url: '/v2/jira/project-bindings'; +}; + +export type 鲥4Responses = { /** - * Url of Gitlab instance for authentication (for instance https://gitlab.com/api/v4) + * OK */ - url?: string; - synchronizeGroups?: boolean; + 200: JiraProjectBindingResource; +}; + +export type 鲥4Response = 鲥4Responses[keyof 鲥4Responses]; + +export type 鲥3Data = { + body: PostJiraProjectBindingRequestResource; + path?: never; + query?: never; + url: '/v2/jira/project-bindings'; +}; + +export type 鲥3Responses = { /** - * Root Gitlab groups allowed to authenticate and provisioned + * Created */ - allowedGroups?: Array; - allowUsersToSignUp?: boolean; - provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; + 201: JiraProjectBindingResource; }; -export type GithubConfigurationCreateRestRequestWritable = { +export type 鲥3Response = 鲥3Responses[keyof 鲥3Responses]; + +export type 鲥6Data = { + body?: never; + path?: never; + query: { + sonarOrganizationUuid: string; + }; + url: '/v2/jira/organization-bindings'; +}; + +export type 鲥6Responses = { /** - * Enable GitHub authentication + * No Content */ - enabled: boolean; + 204: void; +}; + +export type 鲥6Response = 鲥6Responses[keyof 鲥6Responses]; + +export type 絛2Data = { + body?: never; + path?: never; + query: { + sonarOrganizationUuid: string; + }; + url: '/v2/jira/organization-bindings'; +}; + +export type 絛2Responses = { /** - * Client ID provided by GitHub when registering the application. + * OK */ - clientId: string; + 200: JiraOrganizationBindingResource; +}; + +export type 絛2Response = 絛2Responses[keyof 絛2Responses]; + +export type 鲥7Data = { + body: PatchJiraOrganizationBindingRequestResource; + path?: never; + query?: never; + url: '/v2/jira/organization-bindings'; +}; + +export type 鲥7Responses = { /** - * Client password provided by GitHub when registering the application. + * Created */ - clientSecret: string; + 201: JiraOrganizationBindingResource; +}; + +export type 鲥7Response = 鲥7Responses[keyof 鲥7Responses]; + +export type 鲥5Data = { + body: PostJiraOrganizationBindingRequestResource; + path?: never; + query?: never; + url: '/v2/jira/organization-bindings'; +}; + +export type 鲥5Responses = { /** - * The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps. + * Created */ - applicationId: string; + 201: PostJiraOrganizationBindingResponseResource; +}; + +export type 鲥5Response = 鲥5Responses[keyof 鲥5Responses]; + +export type CreateUserBindingData = { + body: UserBindingCreationRequest; + path?: never; + query?: never; + url: '/v2/integrations/user-bindings'; +}; + +export type CreateUserBindingErrors = { /** - * Your GitHub App's private key. You can generate a .pem file from your GitHub App's page under Private keys. - * Copy and paste the whole contents of the file here. - * + * Invalid request data */ - privateKey: string; + 400: unknown; /** - * Synchronize GitHub team with SonarQube group memberships when users log in to SonarQube. - * For each GitHub team they belong to, users will be associated to a group of the same name if it exists in SonarQube. - * + * Authentication required */ - synchronizeGroups: boolean; + 401: unknown; /** - * The API url for a GitHub instance. https://api.github.com/ for Github.com, https://github.company.com/api/v3/ when using Github Enterprise + * Insufficient permissions */ - apiUrl: string; + 403: unknown; /** - * The WEB url for a GitHub instance. https://github.com/ for Github.com, https://github.company.com/ when using GitHub Enterprise. - * + * User binding already exists */ - webUrl: string; - allowedOrganizations: Array; + 409: unknown; /** - * Type of synchronization + * Internal server error */ - provisioningType: 'JIT' | 'AUTO_PROVISIONING'; + 500: unknown; +}; + +export type CreateUserBindingResponses = { /** - * Allow user to sign up + * User binding created successfully */ - allowUsersToSignUp?: boolean; + 201: UserBindingResponse; +}; + +export type CreateUserBindingResponse = + CreateUserBindingResponses[keyof CreateUserBindingResponses]; + +export type HandleSlashCommandData = { + body: string; + path?: never; + query?: never; + url: '/v2/integrations/slack/slash-commands'; +}; + +export type HandleSlashCommandResponses = { /** - * Change project visibility based on GitHub repository visibility. - * If disabled, every provisioned project will be private in SonarQube and visible only to users with explicit GitHub permissions for the corresponding repository. - * Changes take effect at the next synchronization. - * + * OK */ - projectVisibility?: boolean; + 200: unknown; +}; + +export type HandleEventData = { + body: string; + path?: never; + query?: never; + url: '/v2/integrations/slack/events'; +}; + +export type HandleEventResponses = { /** - * Admin consent to synchronize permissions from GitHub + * OK */ - userConsentRequiredAfterUpgrade?: boolean; + 200: string; }; -export type GithubConfigurationResourceWritable = { - enabled?: boolean; +export type HandleEventResponse = + HandleEventResponses[keyof HandleEventResponses]; + +export type GetData = { + body?: never; + path?: never; + query: { + /** + * Integration type + */ + integrationType: 'SLACK'; + }; + url: '/v2/integrations/integration-configurations'; +}; + +export type GetResponses = { /** - * GitHub Application id + * OK */ - applicationId?: string; - synchronizeGroups?: boolean; + 200: IntegrationConfigurationSearchResponse; +}; + +export type GetResponse = GetResponses[keyof GetResponses]; + +export type Create2Data = { + body: IntegrationConfigurationPostRequest; + path?: never; + query?: never; + url: '/v2/integrations/integration-configurations'; +}; + +export type Create2Responses = { /** - * Url of GitHub instance for API connectivity (for instance https://api.github.com) + * Created */ - apiUrl?: string; + 201: IntegrationConfigurationResponse; +}; + +export type Create2Response = Create2Responses[keyof Create2Responses]; + +export type CreateAwarenessBannerClickedData = { + body: AwarenessBannerClickedRequest; + path?: never; + query?: never; + url: '/v2/fix-suggestions/feature-enablements/awareness-banner-interactions'; +}; + +export type CreateAwarenessBannerClickedResponses = { /** - * Url of GitHub instance for authentication (for instance https://github.com) + * OK */ - webUrl?: string; + 200: AwarenessBannerClickedResponse; +}; + +export type CreateAwarenessBannerClickedResponse = + CreateAwarenessBannerClickedResponses[keyof CreateAwarenessBannerClickedResponses]; + +export type Create3Data = { + body: FixSuggestionPostRequest; + path?: never; + query?: never; + url: '/v2/fix-suggestions/ai-suggestions'; +}; + +export type Create3Responses = { /** - * GitHub organizations allowed to authenticate and provisioned + * OK */ - allowedOrganizations?: Array; - provisioningType?: 'JIT' | 'AUTO_PROVISIONING'; - allowUsersToSignUp?: boolean; - projectVisibility?: boolean; - userConsentRequiredAfterUpgrade?: boolean; + 200: FixSuggestionResponse; }; -export type ParameterWritable = { - key?: string; - defaultValue?: string; +export type Create3Response = Create3Responses[keyof Create3Responses]; + +export type SetLicenseData = { + body: LicenseRestRequest; + path?: never; + query?: never; + url: '/v2/entitlements/online-activation'; }; -export type RuleCreateRestRequestWritable = { +export type SetLicenseResponses = { /** - * Key of the custom rule to create, must include the repository + * OK */ - key: string; + 200: unknown; +}; + +export type DeactivateLicenseData = { + body?: never; + path?: never; + query?: never; + url: '/v2/entitlements/offline-deactivation'; +}; + +export type DeactivateLicenseResponses = { /** - * Key of the rule template to be used to create the custom rule + * OK */ - templateKey: string; + 200: Blob | File; +}; + +export type DeactivateLicenseResponse = + DeactivateLicenseResponses[keyof DeactivateLicenseResponses]; + +export type RetrieveRequestFileData = { + body?: never; + headers: { + /** + * The unique license key associated with the license, in the format 'ABCD-EFGH-IJKL-MNOP'. Required in the 'License-Key' HTTP header for offline activation. + */ + 'License-Key': string; + }; + path?: never; + query?: never; + url: '/v2/entitlements/offline-activation'; +}; + +export type RetrieveRequestFileResponses = { /** - * Rule name + * OK */ - name: string; + 200: Blob | File; +}; + +export type RetrieveRequestFileResponse = + RetrieveRequestFileResponses[keyof RetrieveRequestFileResponses]; + +export type UploadLicenseData = { + body: LicenseUploadActivationRequest; + path?: never; + query?: never; + url: '/v2/entitlements/offline-activation'; +}; + +export type UploadLicenseResponses = { /** - * Rule description in markdown format + * OK */ - markdownDescription: string; + 200: unknown; +}; + +export type SetLegacyLicenseData = { + body: LegacyLicenseRestRequest; + path?: never; + query?: never; + url: '/v2/entitlements/legacy-activation'; +}; + +export type SetLegacyLicenseResponses = { /** - * Rule status + * OK */ - status?: 'BETA' | 'DEPRECATED' | 'READY' | 'REMOVED'; + 200: unknown; +}; + +export type Create4Data = { + body?: never; + path?: never; + query?: never; + url: '/v2/dop-translation/gitlab-synchronization-runs'; +}; + +export type Create4Responses = { /** - * Custom rule parameters + * OK */ - parameters?: Array; + 200: GitlabSynchronizationRunResource; +}; + +export type Create4Response = Create4Responses[keyof Create4Responses]; + +export type FetchAllData = { + body?: never; + path?: never; + query?: never; + url: '/v2/dop-translation/gitlab-permission-mappings'; +}; + +export type FetchAllResponses = { /** - * Clean code attribute + * OK */ - cleanCodeAttribute?: - | 'CONVENTIONAL' - | 'FORMATTED' - | 'IDENTIFIABLE' - | 'CLEAR' - | 'COMPLETE' - | 'EFFICIENT' - | 'LOGICAL' - | 'DISTINCT' - | 'FOCUSED' - | 'MODULAR' - | 'TESTED' - | 'LAWFUL' - | 'RESPECTFUL' - | 'TRUSTWORTHY'; + 200: PermissionMappingsSearchRestResponse; +}; + +export type FetchAllResponse = FetchAllResponses[keyof FetchAllResponses]; + +export type CreateMappingData = { + body: PermissionMappingsPostRequest; + path?: never; + query?: never; + url: '/v2/dop-translation/gitlab-permission-mappings'; +}; + +export type CreateMappingResponses = { /** - * Impacts + * OK */ - impacts: Array; + 200: PermissionMappingsResource; +}; + +export type CreateMappingResponse = + CreateMappingResponses[keyof CreateMappingResponses]; + +export type SearchGitlabConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/v2/dop-translation/gitlab-configurations'; +}; + +export type SearchGitlabConfigurationResponses = { /** - * Severity + * OK */ - severity?: string; + 200: GitlabConfigurationSearchRestResponse; +}; + +export type SearchGitlabConfigurationResponse = + SearchGitlabConfigurationResponses[keyof SearchGitlabConfigurationResponses]; + +export type Create5Data = { + body: GitlabConfigurationCreateRestRequestWritable; + path?: never; + query?: never; + url: '/v2/dop-translation/gitlab-configurations'; +}; + +export type Create5Responses = { /** - * Rule type + * OK */ - type?: 'CODE_SMELL' | 'BUG' | 'VULNERABILITY' | 'SECURITY_HOTSPOT'; + 200: GitlabConfigurationResource; }; -export type RuleDescriptionSectionRestResponseWritable = { - [key: string]: unknown; -}; +export type Create5Response = Create5Responses[keyof Create5Responses]; -export type RuleRestResponseWritable = { - id?: string; - key?: string; - repositoryKey?: string; - name?: string; - severity?: string; - type?: 'CODE_SMELL' | 'BUG' | 'VULNERABILITY' | 'SECURITY_HOTSPOT'; - impacts?: Array; - cleanCodeAttribute?: - | 'CONVENTIONAL' - | 'FORMATTED' - | 'IDENTIFIABLE' - | 'CLEAR' - | 'COMPLETE' - | 'EFFICIENT' - | 'LOGICAL' - | 'DISTINCT' - | 'FOCUSED' - | 'MODULAR' - | 'TESTED' - | 'LAWFUL' - | 'RESPECTFUL' - | 'TRUSTWORTHY'; - cleanCodeAttributeCategory?: - | 'ADAPTABLE' - | 'CONSISTENT' - | 'INTENTIONAL' - | 'RESPONSIBLE'; - status?: 'BETA' | 'DEPRECATED' | 'READY' | 'REMOVED'; - external?: boolean; - createdAt?: string; - descriptionSections?: Array; - markdownDescription?: string; - gapDescription?: string; - htmlNote?: string; - markdownNote?: string; - educationPrinciples?: Array; - template?: boolean; - templateId?: string; - tags?: Array; - systemTags?: Array; - languageKey?: string; - languageName?: string; - parameters?: Array; - remediationFunctionType?: string; - remediationFunctionGapMultiplier?: string; - remediationFunctionBaseEffort?: string; +export type FetchAll1Data = { + body?: never; + path?: never; + query?: never; + url: '/v2/dop-translation/github-permission-mappings'; }; -export type GroupRestResponseWritable = { - name?: string; - description?: string; +export type FetchAll1Responses = { + /** + * OK + */ + 200: PermissionMappingsSearchRestResponse; }; -export type ModeResourceWritable = { - mode: 'MQR' | 'STANDARD_EXPERIENCE'; +export type FetchAll1Response = FetchAll1Responses[keyof FetchAll1Responses]; + +export type CreateMapping1Data = { + body: PermissionMappingsPostRequest; + path?: never; + query?: never; + url: '/v2/dop-translation/github-permission-mappings'; }; -export type UsersSearchRestResponseWritable = { - users?: Array; - page?: PageRestResponse; +export type CreateMapping1Responses = { + /** + * OK + */ + 200: PermissionMappingsResource; }; -export type EmailConfigurationSearchRestResponseWritable = { - emailConfigurations?: Array; - page?: PageRestResponse; +export type CreateMapping1Response = + CreateMapping1Responses[keyof CreateMapping1Responses]; + +export type SearchGithubConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/v2/dop-translation/github-configurations'; }; -export type GitlabConfigurationSearchRestResponseWritable = { - gitlabConfigurations?: Array; - page?: PageRestResponse; +export type SearchGithubConfigurationResponses = { + /** + * OK + */ + 200: GithubConfigurationSearchRestResponse; }; -export type GithubConfigurationSearchRestResponseWritable = { - githubConfigurations?: Array; - page?: PageRestResponse; +export type SearchGithubConfigurationResponse = + SearchGithubConfigurationResponses[keyof SearchGithubConfigurationResponses]; + +export type CreateGithubConfigurationData = { + body: GithubConfigurationCreateRestRequestWritable; + path?: never; + query?: never; + url: '/v2/dop-translation/github-configurations'; }; -export type DopSettingsResourceWritable = { +export type CreateGithubConfigurationResponses = { /** - * Supported DevOps Platform are: github, gitlab, azure, bitbucketcloud, bitbucket_server + * OK */ - type?: string; - key?: string; - url?: string; - appId?: string; + 200: GithubConfigurationResource; }; -export type DopSettingsRestResponseWritable = { - dopSettings?: Array; - page?: PageRestResponse; +export type CreateGithubConfigurationResponse = + CreateGithubConfigurationResponses[keyof CreateGithubConfigurationResponses]; + +export type CreateBoundProjectData = { + body: BoundProjectCreateRestRequest; + path?: never; + query?: never; + url: '/v2/dop-translation/bound-projects'; }; -export type GroupsSearchRestResponseWritable = { - groups?: Array; - page?: PageRestResponse; +export type CreateBoundProjectResponses = { + /** + * Created + */ + 201: BoundProjectCreateRestResponse; }; -export type GroupsMembershipSearchRestResponseWritable = { - groupMemberships?: Array; - page?: PageRestResponse; +export type CreateBoundProjectResponse = + CreateBoundProjectResponses[keyof CreateBoundProjectResponses]; + +export type Create6Data = { + body: RuleCreateRestRequestWritable; + path?: never; + query?: never; + url: '/v2/clean-code-policy/rules'; }; -/** - * Current page - */ -export type P = number; +export type Create6Responses = { + /** + * OK + */ + 200: RuleRestResponse; +}; -/** - * Page size. Must be greater than 0 and less or equal than 500 - */ -export type Ps = bigint; +export type Create6Response = Create6Responses[keyof Create6Responses]; -export type SearchData = { +export type Search1Data = { body?: never; path?: never; query?: { /** - * Return active/inactive users - */ - active?: boolean; - /** - * Return managed or non-managed users. Only available for managed instances, throws for non-managed instances + * Return managed or non-managed groups. Only available for managed instances, throws for non-managed instances */ managed?: boolean; /** - * Filter on login, name and email. + * Filter on name. * This parameter performs a partial match (contains), it is case insensitive. */ q?: string; /** - * Filter on externalIdentity. - * This parameter perform a case-sensitive exact match - */ - externalIdentity?: string; - /** - * Filter users based on the last connection date field. Only users who interacted with this instance at or after the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm) + * Filter groups containing the user. Only available for system administrators. Using != operator will search for groups without the user. */ - sonarQubeLastConnectionDateFrom?: string; + userId?: string; /** - * Filter users based on the last connection date field. Only users that never connected or who interacted with this instance at or before the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm) + * Number of results per page. A value of 0 will only return the pagination information. */ - sonarQubeLastConnectionDateTo?: string; + pageSize?: number; /** - * Filter users based on the SonarLint last connection date field Only users who interacted with this instance using SonarLint at or after the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm) + * 1-based page index */ - sonarLintLastConnectionDateFrom?: string; + pageIndex?: number; + }; + url: '/v2/authorizations/groups'; +}; + +export type Search1Responses = { + /** + * OK + */ + 200: GroupsSearchRestResponse; +}; + +export type Search1Response = Search1Responses[keyof Search1Responses]; + +export type Create7Data = { + body: GroupCreateRestRequest; + path?: never; + query?: never; + url: '/v2/authorizations/groups'; +}; + +export type Create7Responses = { + /** + * Created + */ + 201: GroupRestResponse; +}; + +export type Create7Response = Create7Responses[keyof Create7Responses]; + +export type Search2Data = { + body?: never; + path?: never; + query?: { /** - * Filter users based on the SonarLint last connection date field. Only users that never connected or who interacted with this instance using SonarLint at or before the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm) + * ID of the user for which to search groups. If not set, all groups are returned. */ - sonarLintLastConnectionDateTo?: string; + userId?: string; /** - * Filter users belonging to group. Only available for system administrators. Using != operator will exclude users from this group. + * ID of the group for which to search members. If not set, all groups are returned. */ groupId?: string; /** @@ -1950,578 +3652,677 @@ export type SearchData = { */ pageIndex?: number; }; - url: '/v2/users-management/users'; + url: '/v2/authorizations/group-memberships'; }; -export type SearchResponses = { +export type Search2Responses = { /** * OK */ - 200: UsersSearchRestResponse; + 200: GroupsMembershipSearchRestResponse; }; -export type SearchResponse = SearchResponses[keyof SearchResponses]; +export type Search2Response = Search2Responses[keyof Search2Responses]; -export type CreateData = { - body: UserCreateRestRequestWritable; +export type Create8Data = { + body: GroupMembershipCreateRestRequest; + path?: never; + query?: never; + url: '/v2/authorizations/group-memberships'; +}; + +export type Create8Responses = { + /** + * Created + */ + 201: GroupMembershipRestResponse; +}; + +export type Create8Response = Create8Responses[keyof Create8Responses]; + +export type 鲥8Data = { + body?: never; + path?: never; + query?: never; + url: '/v2/atlassian/application-configuration'; +}; + +export type 鲥8Responses = { + /** + * OK + */ + 200: AtlassianAuthenticationDetailsResultResource; +}; + +export type 鲥8Response = 鲥8Responses[keyof 鲥8Responses]; + +export type 鲥9Data = { + body: AtlassianAuthenticationDetailsResource; path?: never; query?: never; - url: '/v2/users-management/users'; + url: '/v2/atlassian/application-configuration'; +}; + +export type 鲥9Responses = { + /** + * OK + */ + 200: AtlassianAuthenticationDetailsResultResource; +}; + +export type 鲥9Response = 鲥9Responses[keyof 鲥9Responses]; + +export type DeactivateData = { + body?: never; + path: { + /** + * The ID of the user to delete. + */ + id: string; + }; + query?: { + /** + * Anonymize user in addition to deactivating it. + */ + anonymize?: boolean; + }; + url: '/v2/users-management/users/{id}'; +}; + +export type DeactivateResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeactivateResponse = DeactivateResponses[keyof DeactivateResponses]; + +export type FetchUserData = { + body?: never; + path: { + /** + * The id of the user to fetch. + */ + id: string; + }; + query?: never; + url: '/v2/users-management/users/{id}'; +}; + +export type FetchUserResponses = { + /** + * OK + */ + 200: UserRestResponseForAdmins; +}; + +export type FetchUserResponse = FetchUserResponses[keyof FetchUserResponses]; + +export type UpdateUserData = { + body: UserUpdateRestRequest; + path: { + id: string; + }; + query?: never; + url: '/v2/users-management/users/{id}'; }; -export type CreateResponses = { +export type UpdateUserResponses = { /** * OK */ 200: UserRestResponseForAdmins; }; -export type CreateResponse = CreateResponses[keyof CreateResponses]; +export type UpdateUserResponse = UpdateUserResponses[keyof UpdateUserResponses]; -export type SearchEmailConfigurationsData = { +export type DeleteEmailConfigurationData = { body?: never; - path?: never; + path: { + /** + * The id of the configuration to delete. + */ + id: string; + }; query?: never; - url: '/v2/system/email-configurations'; + url: '/v2/system/email-configurations/{id}'; }; -export type SearchEmailConfigurationsResponses = { +export type DeleteEmailConfigurationResponses = { /** - * OK + * No Content */ - 200: EmailConfigurationSearchRestResponse; + 204: void; }; -export type SearchEmailConfigurationsResponse = - SearchEmailConfigurationsResponses[keyof SearchEmailConfigurationsResponses]; +export type DeleteEmailConfigurationResponse = + DeleteEmailConfigurationResponses[keyof DeleteEmailConfigurationResponses]; -export type CreateEmailConfigurationData = { - body: EmailConfigurationCreateRestRequestWritable; - path?: never; +export type GetEmailConfigurationData = { + body?: never; + path: { + /** + * The id of the configuration to fetch. + */ + id: string; + }; query?: never; - url: '/v2/system/email-configurations'; + url: '/v2/system/email-configurations/{id}'; }; -export type CreateEmailConfigurationResponses = { +export type GetEmailConfigurationResponses = { /** * OK */ 200: EmailConfigurationResource; }; -export type CreateEmailConfigurationResponse = - CreateEmailConfigurationResponses[keyof CreateEmailConfigurationResponses]; +export type GetEmailConfigurationResponse = + GetEmailConfigurationResponses[keyof GetEmailConfigurationResponses]; -export type CreateAwarenessBannerClickedData = { - body: AwarenessBannerClickedRequest; - path?: never; +export type UpdateEmailConfigurationData = { + body: EmailConfigurationUpdateRestRequest; + path: { + id: string; + }; query?: never; - url: '/v2/fix-suggestions/feature-enablements/awareness-banner-interactions'; + url: '/v2/system/email-configurations/{id}'; }; -export type CreateAwarenessBannerClickedResponses = { +export type UpdateEmailConfigurationResponses = { /** * OK */ - 200: AwarenessBannerClickedResponse; + 200: EmailConfigurationResource; }; -export type CreateAwarenessBannerClickedResponse = - CreateAwarenessBannerClickedResponses[keyof CreateAwarenessBannerClickedResponses]; +export type UpdateEmailConfigurationResponse = + UpdateEmailConfigurationResponses[keyof UpdateEmailConfigurationResponses]; -export type Create1Data = { - body: FixSuggestionPostRequest; - path?: never; +export type DeleteData = { + body?: never; + path: { + /** + * The id of the license profile + */ + 'license-profile-key': string; + }; query?: never; - url: '/v2/fix-suggestions/ai-suggestions'; + url: '/v2/sca/license-profiles/{license-profile-key}'; }; -export type Create1Responses = { +export type DeleteResponses = { /** - * OK + * No Content */ - 200: FixSuggestionResponse; + 204: void; }; -export type Create1Response = Create1Responses[keyof Create1Responses]; +export type DeleteResponse = DeleteResponses[keyof DeleteResponses]; -export type Create2Data = { +export type Get1Data = { body?: never; - path?: never; + path: { + /** + * The license profile key. + */ + 'license-profile-key': string; + }; query?: never; - url: '/v2/dop-translation/gitlab-synchronization-runs'; + url: '/v2/sca/license-profiles/{license-profile-key}'; }; -export type Create2Responses = { +export type Get1Responses = { /** * OK */ - 200: GitlabSynchronizationRunResource; + 200: LicenseProfileDetailsResource; }; -export type Create2Response = Create2Responses[keyof Create2Responses]; +export type Get1Response = Get1Responses[keyof Get1Responses]; -export type FetchAllData = { - body?: never; - path?: never; +export type UpdateData = { + body: LicenseProfilesUpdateRestRequest; + path: { + /** + * The id of the license profile + */ + 'license-profile-key': string; + }; query?: never; - url: '/v2/dop-translation/gitlab-permission-mappings'; + url: '/v2/sca/license-profiles/{license-profile-key}'; }; -export type FetchAllResponses = { +export type UpdateResponses = { /** * OK */ - 200: PermissionMappingsSearchRestResponse; + 200: LicenseProfileResource; }; -export type FetchAllResponse = FetchAllResponses[keyof FetchAllResponses]; +export type UpdateResponse = UpdateResponses[keyof UpdateResponses]; -export type CreateMappingData = { - body: PermissionMappingsPostRequest; - path?: never; +export type PatchLicenseData = { + body: LicensePolicyLicenseUpdateRestRequest; + path: { + /** + * The license profile key. + */ + 'license-profile-key': string; + /** + * The license ID. + */ + 'license-policy-id': string; + }; query?: never; - url: '/v2/dop-translation/gitlab-permission-mappings'; + url: '/v2/sca/license-profiles/{license-profile-key}/licenses/{license-policy-id}'; }; -export type CreateMappingResponses = { +export type PatchLicenseResponses = { /** * OK */ - 200: PermissionMappingsResource; + 200: LicensePolicyLicenseResource; }; -export type CreateMappingResponse = - CreateMappingResponses[keyof CreateMappingResponses]; +export type PatchLicenseResponse = + PatchLicenseResponses[keyof PatchLicenseResponses]; -export type SearchGitlabConfigurationData = { - body?: never; - path?: never; +export type PatchCategoryData = { + body: LicenseProfileCategoryUpdateRestRequest; + path: { + /** + * The license profile key. + */ + 'license-profile-key': string; + /** + * The category key. + */ + 'category-key': + | 'UNKNOWN' + | 'COPYLEFT_WEAK' + | 'COPYLEFT_STRONG' + | 'COPYLEFT_NETWORK' + | 'COPYLEFT_MAXIMAL' + | 'PERMISSIVE_STANDARD' + | 'PERMISSIVE_AMATEUR'; + }; query?: never; - url: '/v2/dop-translation/gitlab-configurations'; + url: '/v2/sca/license-profiles/{license-profile-key}/categories/{category-key}'; }; -export type SearchGitlabConfigurationResponses = { +export type PatchCategoryResponses = { /** * OK */ - 200: GitlabConfigurationSearchRestResponse; + 200: LicenseProfileCategoryResource; }; -export type SearchGitlabConfigurationResponse = - SearchGitlabConfigurationResponses[keyof SearchGitlabConfigurationResponses]; +export type PatchCategoryResponse = + PatchCategoryResponses[keyof PatchCategoryResponses]; -export type Create3Data = { - body: GitlabConfigurationCreateRestRequestWritable; +export type Update1Data = { + body: AssignedProjectsUpdateRestRequest; path?: never; query?: never; - url: '/v2/dop-translation/gitlab-configurations'; + url: '/v2/sca/license-profiles/assigned-projects'; }; -export type Create3Responses = { +export type Update1Responses = { /** - * OK + * The provided project has been assigned to the license profile. */ - 200: GitlabConfigurationResource; + 200: LicenseProfileResource; }; -export type Create3Response = Create3Responses[keyof Create3Responses]; +export type Update1Response = Update1Responses[keyof Update1Responses]; -export type FetchAll1Data = { +export type DeleteCommentData = { body?: never; - path?: never; - query?: never; - url: '/v2/dop-translation/github-permission-mappings'; + path: { + /** + * The key of the (issue,release) pair. + */ + key: string; + }; + query: { + /** + * Issue release change key + */ + issueReleaseChangeKey: string; + }; + url: '/v2/sca/issues-releases/{key}/changelog'; }; -export type FetchAll1Responses = { +export type DeleteCommentResponses = { /** - * OK + * No Content */ - 200: PermissionMappingsSearchRestResponse; + 204: void; }; -export type FetchAll1Response = FetchAll1Responses[keyof FetchAll1Responses]; +export type DeleteCommentResponse = + DeleteCommentResponses[keyof DeleteCommentResponses]; -export type CreateMapping1Data = { - body: PermissionMappingsPostRequest; - path?: never; +export type GetChangelogData = { + body?: never; + path: { + /** + * The key of the (issue,release) pair. + */ + key: string; + }; query?: never; - url: '/v2/dop-translation/github-permission-mappings'; + url: '/v2/sca/issues-releases/{key}/changelog'; }; -export type CreateMapping1Responses = { +export type GetChangelogResponses = { /** * OK */ - 200: PermissionMappingsResource; + 200: IssuesReleasesChangesRestResponse; }; -export type CreateMapping1Response = - CreateMapping1Responses[keyof CreateMapping1Responses]; +export type GetChangelogResponse = + GetChangelogResponses[keyof GetChangelogResponses]; -export type SearchGithubConfigurationData = { - body?: never; - path?: never; +export type UpdateCommentData = { + body: IssueReleaseUpdateCommentRestRequest; + path: { + /** + * The key of the (issue,release) pair. + */ + key: string; + }; query?: never; - url: '/v2/dop-translation/github-configurations'; + url: '/v2/sca/issues-releases/{key}/changelog'; }; -export type SearchGithubConfigurationResponses = { +export type UpdateCommentResponses = { /** * OK */ - 200: GithubConfigurationSearchRestResponse; + 200: unknown; }; -export type SearchGithubConfigurationResponse = - SearchGithubConfigurationResponses[keyof SearchGithubConfigurationResponses]; - -export type CreateGithubConfigurationData = { - body: GithubConfigurationCreateRestRequestWritable; +export type GetFeatureEnablementData = { + body?: never; path?: never; query?: never; - url: '/v2/dop-translation/github-configurations'; + url: '/v2/sca/feature-enablements'; }; -export type CreateGithubConfigurationResponses = { +export type GetFeatureEnablementResponses = { /** * OK */ - 200: GithubConfigurationResource; + 200: FeatureEnablementResource; }; -export type CreateGithubConfigurationResponse = - CreateGithubConfigurationResponses[keyof CreateGithubConfigurationResponses]; +export type GetFeatureEnablementResponse = + GetFeatureEnablementResponses[keyof GetFeatureEnablementResponses]; -export type CreateBoundProjectData = { - body: BoundProjectCreateRestRequest; +export type UpdateFeatureEnablementData = { + body: FeatureEnablementRequest; path?: never; query?: never; - url: '/v2/dop-translation/bound-projects'; + url: '/v2/sca/feature-enablements'; }; -export type CreateBoundProjectResponses = { +export type UpdateFeatureEnablementResponses = { /** - * Created + * OK */ - 201: BoundProjectCreateRestResponse; + 200: FeatureEnablementResource; }; -export type CreateBoundProjectResponse = - CreateBoundProjectResponses[keyof CreateBoundProjectResponses]; +export type UpdateFeatureEnablementResponse = + UpdateFeatureEnablementResponses[keyof UpdateFeatureEnablementResponses]; -export type Create4Data = { - body: RuleCreateRestRequestWritable; +export type 鲥10Data = { + body?: never; path?: never; - query?: never; - url: '/v2/clean-code-policy/rules'; + query: { + jiraProjectKey: string; + sonarOrganizationUuid: string; + sonarProjectId?: string; + includeFields?: boolean; + }; + url: '/v2/jira/work-types'; }; -export type Create4Responses = { +export type 鲥10Responses = { /** * OK */ - 200: RuleRestResponse; + 200: Array; }; -export type Create4Response = Create4Responses[keyof Create4Responses]; +export type 鲥10Response = 鲥10Responses[keyof 鲥10Responses]; -export type Search1Data = { - body?: never; +export type 鲥11Data = { + body: JiraWorkTypesSelectionResource; path?: never; - query?: { - /** - * Return managed or non-managed groups. Only available for managed instances, throws for non-managed instances - */ - managed?: boolean; - /** - * Filter on name. - * This parameter performs a partial match (contains), it is case insensitive. - */ - q?: string; - /** - * Number of results per page. A value of 0 will only return the pagination information. - */ - pageSize?: number; - /** - * 1-based page index - */ - pageIndex?: number; - }; - url: '/v2/authorizations/groups'; + query?: never; + url: '/v2/jira/work-types'; }; -export type Search1Responses = { +export type 鲥11Responses = { /** * OK */ - 200: GroupsSearchRestResponse; + 200: unknown; }; -export type Search1Response = Search1Responses[keyof Search1Responses]; - -export type Create5Data = { - body: GroupCreateRestRequest; +export type 鲥12Data = { + body: PatchJiraOrganizationBindingEditResource; path?: never; query?: never; - url: '/v2/authorizations/groups'; + url: '/v2/jira/organization-binding-edit'; }; -export type Create5Responses = { +export type 鲥12Responses = { /** * Created */ - 201: GroupRestResponse; + 201: JiraOrganizationBindingResource; }; -export type Create5Response = Create5Responses[keyof Create5Responses]; +export type 鲥12Response = 鲥12Responses[keyof 鲥12Responses]; -export type Search2Data = { +export type GetSandboxSettingsData = { body?: never; path?: never; - query?: { - /** - * ID of the user for which to search groups. If not set, all groups are returned. - */ - userId?: string; - /** - * ID of the group for which to search members. If not set, all groups are returned. - */ - groupId?: string; - /** - * Number of results per page. A value of 0 will only return the pagination information. - */ - pageSize?: number; - /** - * 1-based page index - */ - pageIndex?: number; - }; - url: '/v2/authorizations/group-memberships'; + query?: never; + url: '/v2/issues/sandbox-settings'; }; -export type Search2Responses = { +export type GetSandboxSettingsResponses = { /** * OK */ - 200: GroupsMembershipSearchRestResponse; + 200: SandboxSettingsResource; }; -export type Search2Response = Search2Responses[keyof Search2Responses]; +export type GetSandboxSettingsResponse = + GetSandboxSettingsResponses[keyof GetSandboxSettingsResponses]; -export type Create6Data = { - body: GroupMembershipCreateRestRequest; +export type PatchSandboxSettingsData = { + body: SandboxSettingsResource; path?: never; query?: never; - url: '/v2/authorizations/group-memberships'; -}; - -export type Create6Responses = { - /** - * Created - */ - 201: GroupMembershipRestResponse; -}; - -export type Create6Response = Create6Responses[keyof Create6Responses]; - -export type DeactivateData = { - body?: never; - path: { - /** - * The ID of the user to delete. - */ - id: string; - }; - query?: { - /** - * Anonymize user in addition to deactivating it. - */ - anonymize?: boolean; - }; - url: '/v2/users-management/users/{id}'; + url: '/v2/issues/sandbox-settings'; }; -export type DeactivateResponses = { +export type PatchSandboxSettingsResponses = { /** - * No Content + * OK */ - 204: void; + 200: SandboxSettingsResource; }; -export type DeactivateResponse = DeactivateResponses[keyof DeactivateResponses]; +export type PatchSandboxSettingsResponse = + PatchSandboxSettingsResponses[keyof PatchSandboxSettingsResponses]; -export type FetchUserData = { +export type GetProjectSandboxSettingsData = { body?: never; path: { - /** - * The id of the user to fetch. - */ - id: string; + projectKey: string; }; query?: never; - url: '/v2/users-management/users/{id}'; + url: '/v2/issues/sandbox-settings/{projectKey}'; }; -export type FetchUserResponses = { +export type GetProjectSandboxSettingsResponses = { /** * OK */ - 200: UserRestResponseForAdmins; + 200: SandboxSettingsProjectResource; }; -export type FetchUserResponse = FetchUserResponses[keyof FetchUserResponses]; +export type GetProjectSandboxSettingsResponse = + GetProjectSandboxSettingsResponses[keyof GetProjectSandboxSettingsResponses]; -export type UpdateUserData = { - body: UserUpdateRestRequest; +export type PatchProjectSandboxSettingsData = { + body: SandboxSettingsProjectResource; path: { - id: string; + projectKey: string; }; query?: never; - url: '/v2/users-management/users/{id}'; + url: '/v2/issues/sandbox-settings/{projectKey}'; }; -export type UpdateUserResponses = { +export type PatchProjectSandboxSettingsResponses = { /** * OK */ - 200: UserRestResponseForAdmins; + 200: SandboxSettingsProjectResource; }; -export type UpdateUserResponse = UpdateUserResponses[keyof UpdateUserResponses]; +export type PatchProjectSandboxSettingsResponse = + PatchProjectSandboxSettingsResponses[keyof PatchProjectSandboxSettingsResponses]; -export type DeleteEmailConfigurationData = { +export type Delete1Data = { body?: never; path: { /** - * The id of the configuration to delete. + * ID of the integration configuration */ id: string; }; query?: never; - url: '/v2/system/email-configurations/{id}'; + url: '/v2/integrations/integration-configurations/{id}'; }; -export type DeleteEmailConfigurationResponses = { +export type Delete1Responses = { /** * No Content */ 204: void; }; -export type DeleteEmailConfigurationResponse = - DeleteEmailConfigurationResponses[keyof DeleteEmailConfigurationResponses]; +export type Delete1Response = Delete1Responses[keyof Delete1Responses]; -export type GetEmailConfigurationData = { - body?: never; +export type Update2Data = { + body: IntegrationConfigurationPatchRequest; path: { /** - * The id of the configuration to fetch. + * ID of the integration configuration */ id: string; }; query?: never; - url: '/v2/system/email-configurations/{id}'; + url: '/v2/integrations/integration-configurations/{id}'; }; -export type GetEmailConfigurationResponses = { +export type Update2Responses = { /** * OK */ - 200: EmailConfigurationResource; + 200: IntegrationConfigurationResponse; }; -export type GetEmailConfigurationResponse = - GetEmailConfigurationResponses[keyof GetEmailConfigurationResponses]; +export type Update2Response = Update2Responses[keyof Update2Responses]; -export type UpdateEmailConfigurationData = { - body: EmailConfigurationUpdateRestRequest; - path: { - id: string; - }; +export type GetFeatureEnablement1Data = { + body?: never; + path?: never; query?: never; - url: '/v2/system/email-configurations/{id}'; + url: '/v2/fix-suggestions/feature-enablements'; }; -export type UpdateEmailConfigurationResponses = { +export type GetFeatureEnablement1Responses = { /** * OK */ - 200: EmailConfigurationResource; + 200: FeatureEnablementResponse; }; -export type UpdateEmailConfigurationResponse = - UpdateEmailConfigurationResponses[keyof UpdateEmailConfigurationResponses]; +export type GetFeatureEnablement1Response = + GetFeatureEnablement1Responses[keyof GetFeatureEnablement1Responses]; -export type GetFeatureEnablementData = { - body?: never; +export type UpdateFeatureEnablement1Data = { + body: FeatureEnablementRequest; path?: never; query?: never; - url: '/v2/sca/feature-enablements'; + url: '/v2/fix-suggestions/feature-enablements'; }; -export type GetFeatureEnablementResponses = { +export type UpdateFeatureEnablement1Responses = { /** - * OK + * No Content */ - 200: FeatureEnablementResource; + 204: void; }; -export type GetFeatureEnablementResponse = - GetFeatureEnablementResponses[keyof GetFeatureEnablementResponses]; +export type UpdateFeatureEnablement1Response = + UpdateFeatureEnablement1Responses[keyof UpdateFeatureEnablement1Responses]; -export type UpdateFeatureEnablementData = { - body: FeatureEnablementRequest; +export type DeleteLicenseData = { + body?: never; path?: never; query?: never; - url: '/v2/sca/feature-enablements'; + url: '/v2/entitlements/license'; }; -export type UpdateFeatureEnablementResponses = { +export type DeleteLicenseResponses = { /** * OK */ - 200: FeatureEnablementResource; + 200: unknown; }; -export type UpdateFeatureEnablementResponse = - UpdateFeatureEnablementResponses[keyof UpdateFeatureEnablementResponses]; - -export type GetFeatureEnablement1Data = { +export type GetLicenseData = { body?: never; path?: never; query?: never; - url: '/v2/fix-suggestions/feature-enablements'; + url: '/v2/entitlements/license'; }; -export type GetFeatureEnablement1Responses = { +export type GetLicenseResponses = { /** * OK */ - 200: FeatureEnablementResponse; + 200: LicenseRestResponse; }; -export type GetFeatureEnablement1Response = - GetFeatureEnablement1Responses[keyof GetFeatureEnablement1Responses]; +export type GetLicenseResponse = GetLicenseResponses[keyof GetLicenseResponses]; -export type UpdateFeatureEnablement1Data = { - body: FeatureEnablementRequest; +export type RefreshLicenseData = { + body?: never; path?: never; query?: never; - url: '/v2/fix-suggestions/feature-enablements'; + url: '/v2/entitlements/license'; }; -export type UpdateFeatureEnablement1Responses = { +export type RefreshLicenseResponses = { /** - * No Content + * OK */ - 204: void; + 200: unknown; }; -export type UpdateFeatureEnablement1Response = - UpdateFeatureEnablement1Responses[keyof UpdateFeatureEnablement1Responses]; - export type DeleteMappingData = { body?: never; path: { @@ -2895,26 +4696,84 @@ export type GetHealthResponses = { export type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses]; +export type 鲥13Data = { + body?: never; + path?: never; + query: { + branchKey?: string; + projectKey: string; + standard: string; + version: string; + }; + url: '/v2/software-quality-reports/accessibility-reports'; +}; + +export type 鲥13Responses = { + /** + * OK + */ + 200: GetAccessibilityReportResponse; +}; + +export type 鲥13Response = 鲥13Responses[keyof 鲥13Responses]; + +export type PerformSelfTestData = { + body?: never; + path?: never; + query?: never; + url: '/v2/sca/self-test'; +}; + +export type PerformSelfTestResponses = { + /** + * OK + */ + 200: SelfTestResponse; +}; + +export type PerformSelfTestResponse = + PerformSelfTestResponses[keyof PerformSelfTestResponses]; + +export type PerformSpringConfigurationSelfTestData = { + body?: never; + path?: never; + query: { + selfTestName: string; + }; + url: '/v2/sca/self-test/spring-configuration'; +}; + +export type PerformSpringConfigurationSelfTestResponses = { + /** + * OK + */ + 200: SelfTestSpringConfigurationResponse; +}; + +export type PerformSpringConfigurationSelfTestResponse = + PerformSpringConfigurationSelfTestResponses[keyof PerformSpringConfigurationSelfTestResponses]; + export type GenerateReportData = { body?: never; path?: never; query: { /** - * Key of the project to build report for + * Key of the component (project, application, portfolio) to build report for */ - projectKey: string; + component: string; /** * Key of the branch to build report for */ - branchKey?: string; + branch?: string; /** * Type of report to generate. * The `Accept` header sent by the client determines the format of the report. * Currently supported: cyclonedx (application/vnd.cyclonedx+json), cyclonedx (application/vnd.cyclonedx+xml), - * spdx (application/vnd.spdx+json), spdx (application/vnd.spdx+xml) + * spdx_23 (application/spdx+json), spdx_23 (application/spdx+xml), + * spdx_30 (application/spdx+json) * */ - type: 'cyclonedx' | 'spdx_23'; + type: 'cyclonedx' | 'spdx_23' | 'spdx_30'; }; url: '/v2/sca/sbom-reports'; }; @@ -2929,20 +4788,49 @@ export type GenerateReportResponses = { export type GenerateReportResponse = GenerateReportResponses[keyof GenerateReportResponses]; +export type GetReportData = { + body?: never; + path?: never; + query: { + /** + * Key of the component (project, application, portfolio) to build report for + */ + component: string; + /** + * Key of the branch to build report for + */ + branch?: string; + /** + * Type of risk to filter the report by. If not provided, all risks types are included. + */ + riskType?: 'VULNERABILITY' | 'PROHIBITED_LICENSE'; + }; + url: '/v2/sca/risk-reports'; +}; + +export type GetReportResponses = { + /** + * The report in the desired output format + */ + 200: Array; +}; + +export type GetReportResponse = GetReportResponses[keyof GetReportResponses]; + export type Search3Data = { body?: never; path?: never; query: { /** - * Key of the project to fetch all dependencies from + * Key of the component (project, application, or portfolio) to fetch all dependencies from */ projectKey: string; /** - * Key of the Branch to fetch all dependencies from. If not provided, the default branch will be used unless a Pull Request Key is provided. + * Key of the branch to fetch all dependencies from. If not provided, the default branch will be used unless a pull request key is provided. */ branchKey?: string; /** - * Key of the Pull Request to fetch all dependencies from. + * Key of the pull request to fetch all dependencies from. */ pullRequestKey?: string; /** @@ -2950,9 +4838,9 @@ export type Search3Data = { */ direct?: boolean; /** - * Filter on the newInPullRequest attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target. + * Filter on the newlyIntroduced attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target. */ - newInPullRequest?: boolean; + newlyIntroduced?: boolean; /** * Filter on the productionScope attribute. TRUE stands for only production dependencies, FALSE for only not in production. If a release is both, it matches both. */ @@ -2992,38 +4880,90 @@ export type FetchReleaseData = { /** * The key of the release to fetch. */ - key: string; + key: string; + }; + query?: never; + url: '/v2/sca/releases/{key}'; +}; + +export type FetchReleaseResponses = { + /** + * OK + */ + 200: ReleaseDetailResource; +}; + +export type FetchReleaseResponse = + FetchReleaseResponses[keyof FetchReleaseResponses]; + +export type Index1Data = { + body?: never; + path?: never; + query: { + /** + * The key of the license profile whose assignable projects should be retrieved. + * + */ + licenseProfileUuid: string; + /** + * Providing this parameter filters by whether projects are assigned to the license profile or not. + * Omitting this parameter includes all projects which can be assigned to the license profile, + * regardless of whether they are already assigned to the license profile. + * + */ + assignedToLicenseProfile?: boolean; + /** + * Providing this parameter performs a partial match (contains and case insensitive) on the project name. + * + */ + q?: string; + /** + * Number of results per page. A value of 0 will only return the pagination information. + */ + pageSize?: number; + /** + * 1-based page index + */ + pageIndex?: number; }; - query?: never; - url: '/v2/sca/releases/{key}'; + url: '/v2/sca/license-profiles/assignable-projects'; }; -export type FetchReleaseResponses = { +export type Index1Responses = { /** * OK */ - 200: ReleaseDetailResource; + 200: AssignableProjectsIndexRestResponse; }; -export type FetchReleaseResponse = - FetchReleaseResponses[keyof FetchReleaseResponses]; +export type Index1Response = Index1Responses[keyof Index1Responses]; export type Search4Data = { body?: never; path?: never; query: { /** - * Key of the project to fetch all dependency risks from + * Key of the component (project, application, portfolio) to fetch all dependency risks from. */ projectKey: string; /** - * Key of the branch to fetch all dependency risks from. If not provided, the default branch will be used unless a Pull Request Key is provided. + * Key of the branch to fetch all dependency risks from. If not provided, the default branch will be used unless a pull request key is provided. */ branchKey?: string; /** - * Key of the Pull Request to fetch all dependency risks from. + * Key of the pull request to fetch all dependency risks from. */ pullRequestKey?: string; + /** + * Sort order + */ + sort?: + | '+identity' + | '-identity' + | '+severity' + | '-severity' + | '+cvssScore' + | '-cvssScore'; /** * Filter on the package manager */ @@ -3032,22 +4972,30 @@ export type Search4Data = { * Filter on the issue type */ types?: Array; + /** + * Filter on the quality domain + */ + qualities?: Array; /** * Filter on the severity */ severities?: Array; /** - * Filter on the package name This parameter performs a partial match (contains and case insensitive) on the package name. + * Filter on the status + */ + statuses?: Array; + /** + * Filter on the package name. This parameter performs a partial match (contains and case insensitive) on the package name. */ packageName?: string; /** - * Filter on the vulnerability IDThis parameter performs a partial match (contains and case insensitive) on the vulnerability ID. + * Filter on the vulnerability ID. This parameter performs a partial match (contains and case insensitive) on the vulnerability ID. */ vulnerabilityId?: string; /** - * Filter on the newInPullRequest attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target. + * Filter on the isNew attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target. */ - newInPullRequest?: boolean; + newlyIntroduced?: boolean; /** * Filter on the direct attribute. TRUE stands for only direct dependencies, FALSE for only transitive. If a release is both, it matches both. */ @@ -3057,15 +5005,17 @@ export type Search4Data = { */ productionScope?: boolean; /** - * Sort order + * Filter on assignee logins. */ - sort?: - | '+identity' - | '-identity' - | '+severity' - | '-severity' - | '+cvssScore' - | '-cvssScore'; + assignees?: Array; + /** + * Filter on project keys. + */ + projects?: Array; + /** + * Filter on whether the issue is assigned or not. + */ + assigned?: boolean; /** * Number of results per page. A value of 0 will only return the pagination information. */ @@ -3082,12 +5032,12 @@ export type Search4Responses = { /** * OK */ - 200: DependencyRisksSearchRestResponse; + 200: IssuesReleasesSearchRestResponse; }; export type Search4Response = Search4Responses[keyof Search4Responses]; -export type FetchDependencyRiskData = { +export type FetchIssueReleaseData = { body?: never; path: { /** @@ -3099,15 +5049,79 @@ export type FetchDependencyRiskData = { url: '/v2/sca/issues-releases/{key}'; }; -export type FetchDependencyRiskResponses = { +export type FetchIssueReleaseResponses = { + /** + * OK + */ + 200: IssueReleaseDetailsResource; +}; + +export type FetchIssueReleaseResponse = + FetchIssueReleaseResponses[keyof FetchIssueReleaseResponses]; + +export type GetAllAssigneesData = { + body?: never; + path?: never; + query: { + /** + * Key of the project to fetch all assignee users from. + */ + projectKey: string; + /** + * Key of the branch to fetch all assignee users from. If not provided, the default branch will be used unless a pull request key is provided. + */ + branchKey?: string; + /** + * Key of the pull request to fetch all assignee users from. + */ + pullRequestKey?: string; + }; + url: '/v2/sca/issues-releases/all-assignees'; +}; + +export type GetAllAssigneesResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetAllAssigneesResponse = + GetAllAssigneesResponses[keyof GetAllAssigneesResponses]; + +export type GetFeatureEnabledData = { + body?: never; + path?: never; + query?: never; + url: '/v2/sca/enabled'; +}; + +export type GetFeatureEnabledResponses = { + /** + * OK + */ + 200: ScaFeatureEnabledResource; +}; + +export type GetFeatureEnabledResponse = + GetFeatureEnabledResponses[keyof GetFeatureEnabledResponses]; + +export type GetFeatureEnabled1Data = { + body?: never; + path?: never; + query?: never; + url: '/v2/sca/feature-enabled'; +}; + +export type GetFeatureEnabled1Responses = { /** * OK */ - 200: DependencyRiskDetailsResource; + 200: ScaFeatureEnabledResource; }; -export type FetchDependencyRiskResponse = - FetchDependencyRiskResponses[keyof FetchDependencyRiskResponses]; +export type GetFeatureEnabled1Response = + GetFeatureEnabled1Responses[keyof GetFeatureEnabled1Responses]; export type GetScaClisMetadataData = { body?: never; @@ -3151,12 +5165,149 @@ export type DownloadScaCliResponses = { /** * OK */ - 200: ScaCliInfoRestResponse | Blob | File; + 200: ScaCliInfoRestResponse; }; export type DownloadScaCliResponse = DownloadScaCliResponses[keyof DownloadScaCliResponses]; +export type FetchAnalysisData = { + body?: never; + path?: never; + query: { + /** + * Key of the project to fetch analysis status from + */ + projectKey: string; + /** + * Key of the branch to fetch analysis status from. If not provided, the default branch will be used unless a pull request key is provided. + */ + branchKey?: string; + /** + * Key of the pull request to fetch analysis status from. + */ + pullRequestKey?: string; + }; + url: '/v2/sca/analyses'; +}; + +export type FetchAnalysisResponses = { + /** + * OK + */ + 200: AnalysisResource; +}; + +export type FetchAnalysisResponse = + FetchAnalysisResponses[keyof FetchAnalysisResponses]; + +export type 鲥14Data = { + body?: never; + path?: never; + query: { + sonarProjectId: string; + }; + url: '/v2/jira/user-actions'; +}; + +export type 鲥14Responses = { + /** + * OK + */ + 200: Array; +}; + +export type 鲥14Response = 鲥14Responses[keyof 鲥14Responses]; + +export type 鲥15Data = { + body?: never; + path?: never; + query: { + sonarOrganizationUuid: string; + }; + url: '/v2/jira/projects'; +}; + +export type 鲥15Responses = { + /** + * OK + */ + 200: Array; +}; + +export type 鲥15Response = 鲥15Responses[keyof 鲥15Responses]; + +export type 鲥16Data = { + body?: never; + path: { + sonarProjectId: string; + }; + query?: never; + url: '/v2/jira/linked-issues-count/{sonarProjectId}'; +}; + +export type 鲥16Responses = { + /** + * OK + */ + 200: LinkedIssuesCountResource; +}; + +export type 鲥16Response = 鲥16Responses[keyof 鲥16Responses]; + +export type GetUserBindingData = { + body?: never; + path?: never; + query?: never; + url: '/v2/integrations/user-bindings/{id}'; +}; + +export type GetUserBindingErrors = { + /** + * Authentication required + */ + 401: unknown; + /** + * Insufficient permissions + */ + 403: unknown; + /** + * User binding not found + */ + 404: unknown; + /** + * Internal server error + */ + 500: unknown; +}; + +export type GetUserBindingResponses = { + /** + * User binding retrieved successfully + */ + 200: UserBindingResponse; +}; + +export type GetUserBindingResponse = + GetUserBindingResponses[keyof GetUserBindingResponses]; + +export type SupportedRulesData = { + body?: never; + path?: never; + query?: never; + url: '/v2/fix-suggestions/supported-rules'; +}; + +export type SupportedRulesResponses = { + /** + * OK + */ + 200: SupportedRulesDto; +}; + +export type SupportedRulesResponse = + SupportedRulesResponses[keyof SupportedRulesResponses]; + export type GetLlmProvidersData = { body?: never; path?: never; @@ -3174,56 +5325,56 @@ export type GetLlmProvidersResponses = { export type GetLlmProvidersResponse = GetLlmProvidersResponses[keyof GetLlmProvidersResponses]; -export type GetData = { +export type Get2Data = { body?: never; path?: never; query?: never; url: '/v2/fix-suggestions/service-info'; }; -export type GetResponses = { +export type Get2Responses = { /** * OK */ 200: ServiceInfo; }; -export type GetResponse = GetResponses[keyof GetResponses]; +export type Get2Response = Get2Responses[keyof Get2Responses]; -export type GetSubscriptionTypeData = { +export type Get3Data = { body?: never; - path?: never; + path: { + issueId: string; + }; query?: never; - url: '/v2/fix-suggestions/service-info/subscription-type'; + url: '/v2/fix-suggestions/issues/{issueId}'; }; -export type GetSubscriptionTypeResponses = { +export type Get3Responses = { /** * OK */ - 200: SubscriptionTypeResponse; + 200: FixSuggestionIssueResponse; }; -export type GetSubscriptionTypeResponse = - GetSubscriptionTypeResponses[keyof GetSubscriptionTypeResponses]; +export type Get3Response = Get3Responses[keyof Get3Responses]; -export type Get1Data = { +export type GetPurchasableFeaturesData = { body?: never; - path: { - issueId: string; - }; + path?: never; query?: never; - url: '/v2/fix-suggestions/issues/{issueId}'; + url: '/v2/entitlements/purchasable-features'; }; -export type Get1Responses = { +export type GetPurchasableFeaturesResponses = { /** * OK */ - 200: FixSuggestionIssueResponse; + 200: Array; }; -export type Get1Response = Get1Responses[keyof Get1Responses]; +export type GetPurchasableFeaturesResponse = + GetPurchasableFeaturesResponses[keyof GetPurchasableFeaturesResponses]; export type GetProjectBindingByProjectIdData = { body?: never; @@ -3239,6 +5390,12 @@ export type GetProjectBindingByProjectIdData = { * Filter on the DevOps Platform setting id. */ dopSettingId?: string; + /** + * Filter on the repository URL. + * This parameter can be in different formats, the traditional URL or the git remote URL (https or ssh). + * + */ + repositoryUrl?: string; /** * Number of results per page. A value of 0 will only return the pagination information. */ @@ -3300,7 +5457,72 @@ export type FetchAllDopSettingsResponses = { export type FetchAllDopSettingsResponse = FetchAllDopSettingsResponses[keyof FetchAllDopSettingsResponses]; -export type 踼Data = { +export type 鲥17Data = { + body?: never; + path?: never; + query: { + sonarOrganizationKey: string; + sonarOrganizationUuid: string; + }; + url: '/v2/atlassian/auth-url'; +}; + +export type 鲥17Responses = { + /** + * OK + */ + 200: string; +}; + +export type 鲥17Response = 鲥17Responses[keyof 鲥17Responses]; + +export type 鲥18Data = { + body?: never; + path?: never; + query: { + /** + * The key of the project. + */ + projectKey: string; + /** + * The key of the branch. + */ + branchKey: string; + }; + url: '/v2/architecture/graphs'; +}; + +export type 鲥18Responses = { + /** + * OK + */ + 200: A; +}; + +export type 鲥18Response = 鲥18Responses[keyof 鲥18Responses]; + +export type 鲥19Data = { + body?: never; + path: { + /** + * id of the graph data. + */ + id: string; + }; + query?: never; + url: '/v2/architecture/graphs/{id}'; +}; + +export type 鲥19Responses = { + /** + * OK + */ + 200: string; +}; + +export type 鲥19Response = 鲥19Responses[keyof 鲥19Responses]; + +export type 鲥20Data = { body?: never; path?: never; query: { @@ -3320,14 +5542,14 @@ export type 踼Data = { url: '/v2/architecture/file-graph'; }; -export type 踼Responses = { +export type 鲥20Responses = { /** * OK */ 200: string; }; -export type 踼Response = 踼Responses[keyof 踼Responses]; +export type 鲥20Response = 鲥20Responses[keyof 鲥20Responses]; export type GetVersionData = { body?: never; @@ -3387,7 +5609,7 @@ export type DownloadJreResponses = { /** * OK */ - 200: JreInfoRestResponse | Blob | File; + 200: JreInfoRestResponse; }; export type DownloadJreResponse = @@ -3404,7 +5626,7 @@ export type DownloadScannerEngineResponses = { /** * OK */ - 200: EngineInfoRestResponse | Blob | File; + 200: EngineInfoRestResponse; }; export type DownloadScannerEngineResponse = @@ -3432,7 +5654,25 @@ export type GetActiveRulesResponses = { export type GetActiveRulesResponse = GetActiveRulesResponses[keyof GetActiveRulesResponses]; -export type DeleteData = { +export type Delete2Data = { + body?: never; + path: { + 'project-key': string; + }; + query?: never; + url: '/v2/sca/license-profiles/assigned-projects/{project-key}'; +}; + +export type Delete2Responses = { + /** + * No Content + */ + 204: void; +}; + +export type Delete2Response = Delete2Responses[keyof Delete2Responses]; + +export type Delete3Data = { body?: never; path: { /** @@ -3444,14 +5684,14 @@ export type DeleteData = { url: '/v2/authorizations/group-memberships/{id}'; }; -export type DeleteResponses = { +export type Delete3Responses = { /** * No Content */ 204: void; }; -export type DeleteResponse = DeleteResponses[keyof DeleteResponses]; +export type Delete3Response = Delete3Responses[keyof Delete3Responses]; export type SearchIssuesData = { body?: never; diff --git a/src/index.ts b/src/index.ts index 650c993..053e5c6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,3 @@ export { createQubekit, type QubekitOptions } from './qubekit'; export type { Qubekit } from './qubekitClient'; -export * from './generated/sdk.gen'; -export type * from './generated/types.gen'; +export * from './generated'; diff --git a/src/qubekit.test.ts b/src/qubekit.test.ts index a4bc9df..b7947ca 100644 --- a/src/qubekit.test.ts +++ b/src/qubekit.test.ts @@ -64,7 +64,7 @@ describe('sonarqubeClient', () => { token: 'token', }); - await client.issue.searchIssues(); + await client.searchIssues.searchIssues(); expect(header).toBe('Bearer token'); }); @@ -83,7 +83,7 @@ describe('sonarqubeClient', () => { token: 'token', }); - const result = await client.user.search(); + const result = await client.usersManagement.search(); expect(result.data).toEqual( expect.objectContaining({ @@ -109,7 +109,7 @@ describe('sonarqubeClient', () => { token: 'token', }); - await client.user.search(); + await client.usersManagement.search(); expect(header).toBe('Bearer token'); }); diff --git a/src/schema/sonarqube-all.yaml b/src/schema/sonarqube-all.yaml index 27a3056..840f2e9 100644 --- a/src/schema/sonarqube-all.yaml +++ b/src/schema/sonarqube-all.yaml @@ -7,11 +7,10 @@ info: The SonarQube API v2 is a REST API which enables you to interact with - SonarQube programmatically. Endpoint listed here should work as expected. + SonarQube programmatically. - However, you should not consider the API stable for now as it is still under - development. New releases of SonarQube can bring changes to existing - endpoint definitions. + While not all endpoints of the former Web API are available yet, the ones + available are stable and can be used in production environments. # SonarQube V1 API @@ -19,7 +18,7 @@ info: API definition for Sonarqube Server v1 API servers: - - url: 'http://sonarqube.internal.philips/api/v2' + - url: 'http://next.sonarqube.com/sonarqube/api/v2' description: Generated server url tags: - name: project @@ -33,7 +32,7 @@ paths: /v2/users-management/users: get: tags: - - user-controller + - Users Management summary: Users search description: |2 Get a list of users. By default, only active users are returned. @@ -176,6 +175,8 @@ paths: Filter users belonging to group. Only available for system administrators. Using != operator will exclude users from this group. + internal: 'true' + x-internal: 'true' - name: pageSize in: query description: >- @@ -200,6 +201,7 @@ paths: format: int32 default: 1 description: 1-based page index + exclusiveMinimum: 0 minimum: 1 responses: '200': @@ -210,7 +212,7 @@ paths: $ref: '#/components/schemas/UsersSearchRestResponse' post: tags: - - user-controller + - Users Management summary: User creation description: |2 Create a user. @@ -233,7 +235,7 @@ paths: /v2/system/email-configurations: get: tags: - - email-configuration-controller + - System summary: Search email configurations description: |2 Get the list of email configurations. @@ -250,7 +252,7 @@ paths: x-sonar-internal: 'true' post: tags: - - email-configuration-controller + - System summary: Create an email configuration description: |2 Create a new email configuration. @@ -271,90 +273,123 @@ paths: schema: $ref: '#/components/schemas/EmailConfigurationResource' x-sonar-internal: 'true' - /v2/fix-suggestions/feature-enablements/awareness-banner-interactions: - post: + /v2/sca/license-profiles: + get: tags: - - feature-enablement-controller - summary: Starts a GitLab synchronization run. - operationId: createAwarenessBannerClicked - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AwarenessBannerClickedRequest' - required: true + - License Profiles + summary: List license profiles + description: |2 + List the license profiles that have been configured for use when evaluating license issues. + operationId: index + parameters: + - name: projectKey + in: query + description: > + If provided, filter to the license profile that is used to analyze + the project (if one exists). + required: false + schema: + type: string + description: > + If provided, filter to the license profile that is used to analyze + the project (if one exists). responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/AwarenessBannerClickedResponse' + $ref: '#/components/schemas/LicenseProfileIndexRestResponse' x-sonar-internal: 'true' - /v2/fix-suggestions/ai-suggestions: post: tags: - - fix-suggestion-controller - summary: Suggest a fix for the given issueId - description: Requires Code Viewer permission. + - License Profiles + summary: Create new license profile + description: |2 + Create a new license profile for projects to use when evaluating license issues. operationId: create_1 + parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/FixSuggestionPostRequest' + $ref: '#/components/schemas/LicenseProfilesCreateRestRequest' required: true responses: - '200': - description: OK + '201': + description: Created content: application/json: schema: - $ref: '#/components/schemas/FixSuggestionResponse' - /v2/dop-translation/gitlab-synchronization-runs: + $ref: '#/components/schemas/LicenseProfileResource' + x-sonar-internal: 'true' + /v2/sca/issues-releases/update-assignee: post: tags: - - gitlab-synchronization-run-controller - summary: Starts a GitLab synchronization run. - description: |2 - Adds a new GitLab synchronization run in the background tasks. Requires sys-admins permissions. - operationId: create_2 + - Issues-Releases + summary: 'Update the assignee of an (issue,release) pair' + description: | + Update the assignee of an (issue,release) pair (dependency risk). + + This is an internal API and is subject to change without notice. + operationId: updateAssignee + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAssigneeRestRequest' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/GitlabSynchronizationRunResource' + $ref: '#/components/schemas/IssueReleaseDetailsResource' x-sonar-internal: 'true' - /v2/dop-translation/gitlab-permission-mappings: - get: + /v2/sca/issues-releases/set-severity: + post: tags: - - gitlab-permission-mappings-controller - summary: Fetch permissions mapping - description: >- - Get the list of all the existing roles with their permission mappings. - Requires 'Administer System' permission. - operationId: fetchAll + - Issues-Releases + summary: Manually change the severity of an issue-release pair + description: | + Change the severity of a (issue,release) pair (dependency risk). + + This is an internal API and is subject to change without notice. + operationId: setSeverity + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IssueReleaseSetSeverityRestRequest' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/PermissionMappingsSearchRestResponse' + $ref: '#/components/schemas/IssueReleaseDetailsResource' x-sonar-internal: 'true' + /v2/sca/issues-releases/clear-severity-warning: post: tags: - - gitlab-permission-mappings-controller - summary: Create a permission mapping for a custom role - description: Requires 'Administer System' permission. - operationId: createMapping + - Issues-Releases + summary: >- + Dismiss the increased severity warning for an issue-release pair after + reviewing the warning + description: > + Dismiss the increased severity warning for an (issue,release) pair + (dependency risk) after reviewing the warning. + + + This is an internal API and is subject to change without notice. + operationId: clearSeverityWarning requestBody: content: application/json: schema: - $ref: '#/components/schemas/PermissionMappingsPostRequest' + $ref: '#/components/schemas/IssueReleaseClearSeverityWarningRestRequest' required: true responses: '200': @@ -362,149 +397,196 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PermissionMappingsResource' + $ref: '#/components/schemas/IssueReleaseDetailsResource' x-sonar-internal: 'true' - /v2/dop-translation/gitlab-configurations: - get: + /v2/sca/issues-releases/change-status: + post: tags: - - gitlab-configuration-controller - summary: Search GitLab configs - description: |2 - Get the list of GitLab configurations. - Note that a single configuration is supported at this time. - Requires 'Administer System' permission. - operationId: searchGitlabConfiguration + - Issues-Releases + summary: Transition an issue-release pair to a new status + description: > + Transition a single (issue,release) pair (dependency risk) to a new + status with a comment about why the status is changing. + + + This is an internal API and is subject to change without notice. + operationId: transitionIssueRelease + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IssueReleaseStatusTransitionRequest' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/GitlabConfigurationSearchRestResponse' + $ref: '#/components/schemas/IssueReleaseDetailsResource' x-sonar-internal: 'true' + /v2/sca/issues-releases/add-comment: post: tags: - - gitlab-configuration-controller - summary: Create Gitlab configuration - description: |2 - Create a new Gitlab configuration. - Note that only a single configuration can exist at a time. - Requires 'Administer System' permission. - operationId: create_3 + - Issues-Releases + summary: Add a comment to an issue-release pair + description: | + Add a comment to a (issue,release) pair (dependency risk). + + This is an internal API and is subject to change without notice. + operationId: addComment requestBody: content: application/json: schema: - $ref: '#/components/schemas/GitlabConfigurationCreateRestRequest' + $ref: '#/components/schemas/IssueReleaseAddCommentRestRequest' required: true + responses: + '201': + description: Created + x-sonar-internal: 'true' + /v2/marketplace/azure/billing: + post: + tags: + - Marketplace Azure + summary: Bills user's Azure account with the cost of SonarQube Server license + description: >- + Used by admin to bill user's Azure account with the cost of SonarQube + Server license. + operationId: billAzureAccount responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/GitlabConfigurationResource' - x-sonar-internal: 'true' - /v2/dop-translation/github-permission-mappings: + $ref: '#/components/schemas/AzureBillingRestResponse' + /v2/jira/work-items: get: tags: - - github-permission-mappings-controller - summary: Fetch permissions mapping - description: >- - Get the list of all the existing roles with their permission mappings. - Requires 'Administer System' permission. - operationId: fetchAll_1 + - Jira + summary: Fetch Jira work items + description: | + Fetch the Jira work items for a specific Sonar project and resource. + Accepts only authenticated requests. + operationId: 鲥 + parameters: + - name: sonarProjectId + in: query + required: true + schema: + type: string + - name: resourceId + in: query + required: true + schema: + type: string + - name: resourceType + in: query + required: true + schema: + type: string + enum: + - SONAR_ISSUE + - DEPENDENCY_RISK responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/PermissionMappingsSearchRestResponse' + $ref: '#/components/schemas/JiraWorkItemResource' x-sonar-internal: 'true' post: tags: - - github-permission-mappings-controller - summary: Create a permission mapping for a custom role - description: Requires 'Administer System' permission. - operationId: createMapping_1 + - Jira + summary: Create Jira work item + description: > + Create a Jira work item for a specific resource. + + Accepts only authenticated requests with issue administration + permission. + operationId: 鲥_1 requestBody: content: application/json: schema: - $ref: '#/components/schemas/PermissionMappingsPostRequest' + $ref: '#/components/schemas/PostJiraWorkItemRequestResource' required: true responses: - '200': - description: OK + '201': + description: Created content: application/json: schema: - $ref: '#/components/schemas/PermissionMappingsResource' + $ref: '#/components/schemas/JiraWorkItemResource' x-sonar-internal: 'true' - /v2/dop-translation/github-configurations: - get: + delete: tags: - - github-configuration-controller - summary: Search GitHub configs - description: |2 - Get the list of GitHub configurations. - Note that a single configuration is supported at this time. - Requires 'Administer System' permission. - operationId: searchGithubConfiguration + - Jira + summary: Delete Jira work items + description: | + Delete the Jira work items associated with a specific resource. + operationId: 絛 + parameters: + - name: sonarProjectId + in: query + required: true + schema: + type: string + - name: resourceId + in: query + required: true + schema: + type: string + - name: resourceType + in: query + required: true + schema: + type: string + enum: + - SONAR_ISSUE + - DEPENDENCY_RISK responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/GithubConfigurationSearchRestResponse' + '204': + description: No Content x-sonar-internal: 'true' - post: + /v2/jira/project-bindings: + get: tags: - - github-configuration-controller - summary: Create GitHub configuration - description: |2 - Create a new GitHub configuration. - Note that only a single configuration can exist at a time. - Requires 'Administer System' permission. - operationId: createGithubConfiguration - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GithubConfigurationCreateRestRequest' - required: true + - Jira + summary: Fetch Jira project bindings + description: | + Fetch the Jira project binding for a specific Sonar project. + Accepts only authenticated requests. + operationId: 鲥_2 + parameters: + - name: sonarProjectId + in: query + required: true + schema: + type: string responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/GithubConfigurationResource' + $ref: '#/components/schemas/JiraProjectBindingResource' x-sonar-internal: 'true' - /v2/dop-translation/bound-projects: post: tags: - - bound-projects-controller - summary: >- - Create a SonarQube project with the information from the provided DevOps - platform project. - description: > - Create a SonarQube project with the information from the provided DevOps - platform project. - - Autoconfigure Pull-Request decoration mechanism. - - Requires the 'Create Projects' permission and setting a Personal Access - Token with api/alm_integrations/set_pat for a user who will be using - this endpoint - operationId: createBoundProject + - Jira + summary: Create or update Jira project binding + description: | + Create or update a Jira project binding for a specific Sonar project. + Accepts only authenticated requests. + operationId: 鲥_3 requestBody: content: application/json: schema: - $ref: '#/components/schemas/BoundProjectCreateRestRequest' + $ref: '#/components/schemas/PostJiraProjectBindingRequestResource' required: true responses: '201': @@ -512,21 +594,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BoundProjectCreateRestResponse' - /v2/clean-code-policy/rules: - post: + $ref: '#/components/schemas/JiraProjectBindingResource' + x-sonar-internal: 'true' + delete: tags: - - rule-controller - summary: Custom rule creation - description: |2 - Create a custom rule. - Requires the 'Administer Quality Profiles' permission. - operationId: create_4 + - Jira + summary: Delete Jira project binding + description: | + Delete the Jira project binding for a specific Sonar project. + Accepts only authenticated requests. + operationId: 絛_1 + parameters: + - name: sonarProjectId + in: query + required: true + schema: + type: string + responses: + '204': + description: No Content + x-sonar-internal: 'true' + patch: + tags: + - Jira + summary: Update Jira project binding + description: | + Update an existing Jira project binding for a specific Sonar project. + Accepts only authenticated requests. + operationId: 鲥_4 requestBody: content: application/json: schema: - $ref: '#/components/schemas/RuleCreateRestRequest' + $ref: '#/components/schemas/PatchJiraProjectBindingRequestResource' required: true responses: '200': @@ -534,86 +634,50 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RuleRestResponse' - /v2/authorizations/groups: + $ref: '#/components/schemas/JiraProjectBindingResource' + x-sonar-internal: 'true' + /v2/jira/organization-bindings: get: tags: - - group-controller - summary: Group search - description: |2 - Get the list of groups. - The results are sorted alphabetically by group name. - operationId: search_1 + - Jira + summary: Fetch the Jira instance binding + description: | + Fetch the Jira instance binding. + Requires global administrator permission. + operationId: 絛_2 parameters: - - name: managed + - name: sonarOrganizationUuid in: query - description: >- - Return managed or non-managed groups. Only available for managed - instances, throws for non-managed instances - required: false - schema: - type: boolean - description: >- - Return managed or non-managed groups. Only available for managed - instances, throws for non-managed instances - - name: q - in: query - description: >- - Filter on name. - - This parameter performs a partial match (contains), it is case - insensitive. - required: false + required: true schema: type: string - description: >- - Filter on name. - - This parameter performs a partial match (contains), it is case - insensitive. - - name: pageSize - in: query - description: >- - Number of results per page. A value of 0 will only return the - pagination information. - required: false - schema: - type: integer - format: int32 - default: 50 - description: >- - Number of results per page. A value of 0 will only return the - pagination information. - maximum: 500 - minimum: 0 - - name: pageIndex - in: query - description: 1-based page index - required: false - schema: - type: integer - format: int32 - default: 1 - description: 1-based page index - minimum: 1 + format: uuid responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/GroupsSearchRestResponse' + $ref: '#/components/schemas/JiraOrganizationBindingResource' + x-sonar-internal: 'true' post: tags: - - group-controller - summary: Create a new group - description: Create a new group. - operationId: create_5 + - Jira + summary: Create a new Jira instance binding + description: > + Receives the 3LO state and authorization code parameters and attempts to + create an instance binding. + + If successful, returns the binding. Otherwise, returns a list of + available resources. + + Requires global administrator permission. + operationId: 鲥_5 requestBody: content: application/json: schema: - $ref: '#/components/schemas/GroupCreateRestRequest' + $ref: '#/components/schemas/PostJiraOrganizationBindingRequestResource' required: true responses: '201': @@ -621,81 +685,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GroupRestResponse' - /v2/authorizations/group-memberships: - get: + $ref: >- + #/components/schemas/PostJiraOrganizationBindingResponseResource + x-sonar-internal: 'true' + delete: tags: - - group-membership-controller - summary: Search across group memberships - description: |2 - Get the list of groups and members matching the query. - operationId: search_2 + - Jira + summary: Delete the Jira instance binding + description: | + Deletes the Jira instance binding from the database. + Requires global administrator permission. + operationId: 鲥_6 parameters: - - name: userId - in: query - description: >- - ID of the user for which to search groups. If not set, all groups - are returned. - required: false - schema: - type: string - description: >- - ID of the user for which to search groups. If not set, all groups - are returned. - - name: groupId + - name: sonarOrganizationUuid in: query - description: >- - ID of the group for which to search members. If not set, all groups - are returned. - required: false + required: true schema: type: string - description: >- - ID of the group for which to search members. If not set, all - groups are returned. - - name: pageSize - in: query - description: >- - Number of results per page. A value of 0 will only return the - pagination information. - required: false - schema: - type: integer - format: int32 - default: 50 - description: >- - Number of results per page. A value of 0 will only return the - pagination information. - maximum: 500 - minimum: 0 - - name: pageIndex - in: query - description: 1-based page index - required: false - schema: - type: integer - format: int32 - default: 1 - description: 1-based page index - minimum: 1 + format: uuid responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/GroupsMembershipSearchRestResponse' - post: + '204': + description: No Content + x-sonar-internal: 'true' + patch: tags: - - group-membership-controller - summary: Add a group membership - description: Add a user to a group. - operationId: create_6 + - Jira + summary: >- + Binds the specified pending instance binding with the specified jira + cloud ID + description: > + Binds the specified pending instance binding with the specified jira + cloud ID + operationId: 鲥_7 requestBody: content: application/json: schema: - $ref: '#/components/schemas/GroupMembershipCreateRestRequest' + $ref: '#/components/schemas/PatchJiraOrganizationBindingRequestResource' required: true responses: '201': @@ -703,149 +729,153 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GroupMembershipRestResponse' - '/v2/users-management/users/{id}': - get: + $ref: '#/components/schemas/JiraOrganizationBindingResource' + x-sonar-internal: 'true' + /v2/integrations/user-bindings: + post: tags: - - user-controller - summary: Fetch a single user + - Slack User Bindings + summary: Create Slack user binding description: > - Fetch a single user. + Creates a new user binding between a SonarQube user and their Slack + account. - The following fields are only returned when user has Administer System - permission or for logged-in in user : - 'email' - 'externalIdentity' - 'externalProvider' - 'groups' - 'lastConnectionDate' - 'sonarLintLastConnectionDate' - 'tokensCount' - Field 'sonarqubeLastConnectionDate' is only updated every hour, so it may not be accurate, for instance when a user authenticates many times in less than one hour. - operationId: fetchUser - parameters: - - name: id - in: path - description: The id of the user to fetch. - required: true - schema: - type: string + This endpoint is used during the Slack OAuth flow when users connect + their accounts + + via the /sonarqube-server connect slash command. + operationId: createUserBinding + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserBindingCreationRequest' + required: true responses: - '200': - description: OK + '201': + description: User binding created successfully content: application/json: schema: - $ref: '#/components/schemas/UserRestResponseForAdmins' - delete: + $ref: '#/components/schemas/UserBindingResponse' + '400': + description: Invalid request data + '401': + description: Authentication required + '403': + description: Insufficient permissions + '409': + description: User binding already exists + '500': + description: Internal server error + x-sonar-internal: 'true' + /v2/integrations/slack/slash-commands: + post: tags: - - user-controller - summary: Deactivate a user - description: Deactivates a user. Requires Administer System permission. - operationId: deactivate - parameters: - - name: id - in: path - description: The ID of the user to delete. - required: true - schema: - type: string - - name: anonymize - in: query - description: Anonymize user in addition to deactivating it. - required: false - schema: - type: boolean - default: false + - slack-slash-command-controller + summary: Handle Slack Slash Commands + description: > + Handles incoming Slack slash command requests and command processing. + + The request body is form-encoded and contains command details. Signature + validation is performed via + + SlackSlashCommandSignatureValidationAdvice before reaching this + controller. + operationId: handleSlashCommand + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: string + required: true responses: - '204': - description: No Content - patch: + '200': + description: OK + x-sonar-internal: 'true' + /v2/integrations/slack/events: + post: tags: - - user-controller - summary: Update a user - description: | - Update users attributes. - operationId: updateUser - parameters: - - name: id - in: path - required: true - schema: - type: string + - slack-event-controller + summary: Handle Slack Events API + description: > + Handles incoming Slack Events API requests including URL verification + and workspace lifecycle events. + + The request body is JSON and contains event details. Signature + validation is performed via + + SlackEventsSignatureValidationAdvice before reaching this controller. + operationId: handleEvent requestBody: content: - application/merge-patch+json: + application/json: schema: - $ref: '#/components/schemas/UserUpdateRestRequest' + type: string required: true responses: '200': description: OK content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/UserRestResponseForAdmins' - '/v2/system/email-configurations/{id}': + type: string + x-sonar-internal: 'true' + /v2/integrations/integration-configurations: get: tags: - - email-configuration-controller - summary: Fetch an email configuration - description: | - Fetch a Email configuration. Requires 'Administer System' permission. - operationId: getEmailConfiguration + - integration-configurations-controller + summary: Get integration configurations. + description: Requires global administrator permission. + operationId: get parameters: - - name: id - in: path - description: The id of the configuration to fetch. + - name: integrationType + in: query + description: Integration type required: true schema: type: string + enum: + - SLACK responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/EmailConfigurationResource' + $ref: '#/components/schemas/IntegrationConfigurationSearchResponse' x-sonar-internal: 'true' - delete: + post: tags: - - email-configuration-controller - summary: Delete an email configuration - description: | - Delete an email configuration. - Requires 'Administer System' permission. - operationId: deleteEmailConfiguration - parameters: - - name: id - in: path - description: The id of the configuration to delete. - required: true - schema: - type: string + - integration-configurations-controller + summary: Create a configuration for an integration. + description: Requires global administrator permission. + operationId: create_2 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationConfigurationPostRequest' + required: true responses: - '204': - description: No Content - x-sonar-internal: 'true' - patch: - tags: - - email-configuration-controller - summary: Update an email configuration - description: | - Update an email configuration. Requires 'Administer System' permission. - operationId: updateEmailConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationConfigurationResponse' + x-sonar-internal: 'true' + /v2/fix-suggestions/feature-enablements/awareness-banner-interactions: + post: + tags: + - Fix Suggestions + summary: Starts a GitLab synchronization run. + operationId: createAwarenessBannerClicked requestBody: content: - application/merge-patch+json: + application/json: schema: - $ref: '#/components/schemas/EmailConfigurationUpdateRestRequest' + $ref: '#/components/schemas/AwarenessBannerClickedRequest' required: true responses: '200': @@ -853,218 +883,174 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EmailConfigurationResource' + $ref: '#/components/schemas/AwarenessBannerClickedResponse' x-sonar-internal: 'true' - /v2/sca/feature-enablements: - get: + /v2/fix-suggestions/ai-suggestions: + post: tags: - - k - summary: Get the status of SCA enablement - operationId: getFeatureEnablement + - Fix Suggestions + summary: Suggest a fix for the given issueId + description: Requires Code Viewer permission. + operationId: create_3 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FixSuggestionPostRequest' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/FeatureEnablementResource' - x-sonar-internal: 'true' - patch: + $ref: '#/components/schemas/FixSuggestionResponse' + /v2/entitlements/online-activation: + post: tags: - - k - summary: Update SCA enablement settings - operationId: updateFeatureEnablement + - Entitlements + summary: Sets the license + description: |2 + Only third party license keys are accepted. + Requires 'Administer System' permission. + operationId: setLicense requestBody: content: application/json: schema: - $ref: '#/components/schemas/FeatureEnablementRequest' + $ref: '#/components/schemas/LicenseRestRequest' required: true + responses: + '200': + description: OK + x-sonar-internal: 'true' + /v2/entitlements/offline-deactivation: + post: + tags: + - Entitlements + summary: Deactivates offline license + description: |2 + This method is for users who activated the license using offline method. It should be used to + fully deactivate the license (i.e. in cases of migrating the installation to a new server). + operationId: deactivateLicense responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/FeatureEnablementResource' + type: string + format: binary x-sonar-internal: 'true' - /v2/fix-suggestions/feature-enablements: + /v2/entitlements/offline-activation: get: tags: - - feature-enablement-controller - summary: Fetch the Ai CodeFix feature enablement configurations - operationId: getFeatureEnablement_1 + - Entitlements + summary: Retrieve a valid .req file for offline activation + description: |2 + Retrieves a .req file for offline activation of a license. + Requires 'Administer System' permission. + operationId: retrieveRequestFile + parameters: + - name: License-Key + in: header + description: >- + The unique license key associated with the license, in the format + 'ABCD-EFGH-IJKL-MNOP'. Required in the 'License-Key' HTTP header for + offline activation. + required: true + schema: + type: string responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/FeatureEnablementResponse' - patch: + type: string + format: binary + x-sonar-internal: 'true' + post: tags: - - feature-enablement-controller - summary: Enable/Disable the AI CodeFix feature at the instance or project level - operationId: updateFeatureEnablement_1 + - Entitlements + summary: Uploads a license + description: |2 + The content of the request body should be the text of the license file, along with a valid license key. + Requires 'Administer System' permission. + operationId: uploadLicense requestBody: content: - application/merge-patch+json: + application/json: schema: - $ref: '#/components/schemas/FeatureEnablementRequest' + $ref: '#/components/schemas/LicenseUploadActivationRequest' required: true responses: - '204': - description: No Content - '/v2/dop-translation/gitlab-permission-mappings/{role}': - delete: - tags: - - gitlab-permission-mappings-controller - summary: Delete a single permission mappings - description: Requires 'Administer System' permission. - operationId: deleteMapping - parameters: - - name: role - in: path - description: The name of the role to delete - required: true - schema: - type: string - responses: - '204': - description: No Content + '200': + description: OK x-sonar-internal: 'true' - patch: + /v2/entitlements/legacy-activation: + post: tags: - - gitlab-permission-mappings-controller - summary: Update a single permission mapping - description: Requires 'Administer System' permission. - operationId: updateMapping - parameters: - - name: role - in: path - description: The name of the role to update - required: true - schema: - type: string + - Entitlements + summary: Sets the license + description: |2 + Only license keys received from Sonar are accepted. + Requires 'Administer System' permission. + operationId: setLegacyLicense requestBody: content: - application/merge-patch+json: + application/json: schema: - $ref: '#/components/schemas/DevOpsPermissionMappingUpdateRequest' + $ref: '#/components/schemas/LegacyLicenseRestRequest' required: true responses: '200': description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PermissionMappingsResource' x-sonar-internal: 'true' - '/v2/dop-translation/gitlab-configurations/{id}': - get: + /v2/dop-translation/gitlab-synchronization-runs: + post: tags: - - gitlab-configuration-controller - summary: Fetch a GitLab configuration - description: | - Fetch a GitLab configuration. Requires 'Administer System' permission. - operationId: getGitlabConfiguration - parameters: - - name: id - in: path - description: The id of the configuration to fetch. - required: true - schema: - type: string + - Dop Translation + summary: Starts a GitLab synchronization run. + description: |2 + Adds a new GitLab synchronization run in the background tasks. Requires sys-admins permissions. + operationId: create_4 responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/GitlabConfigurationResource' + $ref: '#/components/schemas/GitlabSynchronizationRunResource' x-sonar-internal: 'true' - delete: + /v2/dop-translation/gitlab-permission-mappings: + get: tags: - - gitlab-configuration-controller - summary: Delete a GitLab configuration - description: | - Delete a GitLab configuration. + - Dop Translation + summary: Fetch permissions mapping + description: >- + Get the list of all the existing roles with their permission mappings. Requires 'Administer System' permission. - operationId: deleteGitlabConfiguration - parameters: - - name: id - in: path - description: The id of the configuration to delete. - required: true - schema: - type: string - responses: - '204': - description: No Content - x-sonar-internal: 'true' - patch: - tags: - - gitlab-configuration-controller - summary: Update a Gitlab configuration - description: | - Update a Gitlab configuration. Requires 'Administer System' permission. - operationId: updateGitlabConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string - requestBody: - content: - application/merge-patch+json: - schema: - $ref: '#/components/schemas/GitlabConfigurationUpdateRestRequest' - required: true + operationId: fetchAll responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/GitlabConfigurationResource' - x-sonar-internal: 'true' - '/v2/dop-translation/github-permission-mappings/{role}': - delete: - tags: - - github-permission-mappings-controller - summary: Delete a single permission mappings - description: Requires 'Administer System' permission. - operationId: deleteMapping_1 - parameters: - - name: role - in: path - description: The name of the role to delete - required: true - schema: - type: string - responses: - '204': - description: No Content + $ref: '#/components/schemas/PermissionMappingsSearchRestResponse' x-sonar-internal: 'true' - patch: + post: tags: - - github-permission-mappings-controller - summary: Update a single permission mapping + - Dop Translation + summary: Create a permission mapping for a custom role description: Requires 'Administer System' permission. - operationId: updateMapping_1 - parameters: - - name: role - in: path - description: The name of the role to update - required: true - schema: - type: string + operationId: createMapping requestBody: content: - application/merge-patch+json: + application/json: schema: - $ref: '#/components/schemas/DevOpsPermissionMappingUpdateRequest' + $ref: '#/components/schemas/PermissionMappingsPostRequest' required: true responses: '200': @@ -1074,66 +1060,38 @@ paths: schema: $ref: '#/components/schemas/PermissionMappingsResource' x-sonar-internal: 'true' - '/v2/dop-translation/github-configurations/{id}': + /v2/dop-translation/gitlab-configurations: get: tags: - - github-configuration-controller - summary: Fetch a GitHub configuration - description: | - Fetch a GitHub configuration. Requires 'Administer System' permission. - operationId: getGithubConfiguration - parameters: - - name: id - in: path - description: The id of the configuration to fetch. - required: true - schema: - type: string + - Dop Translation + summary: Search GitLab configs + description: |2 + Get the list of GitLab configurations. + Note that a single configuration is supported at this time. + Requires 'Administer System' permission. + operationId: searchGitlabConfiguration responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/GithubConfigurationResource' + $ref: '#/components/schemas/GitlabConfigurationSearchRestResponse' x-sonar-internal: 'true' - delete: + post: tags: - - github-configuration-controller - summary: Delete a GitHub configuration - description: | - Delete a GitHub configuration. - Requires 'Administer System' permission. - operationId: deleteGithubConfiguration - parameters: - - name: id - in: path - description: The id of the configuration to delete. - required: true - schema: - type: string - responses: - '204': - description: No Content - x-sonar-internal: 'true' - patch: - tags: - - github-configuration-controller - summary: Update a GitHub configuration - description: | - Update a GitHub configuration. Requires 'Administer System' permission. - operationId: updateGithubConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string + - Dop Translation + summary: Create Gitlab configuration + description: |2 + Create a new Gitlab configuration. + Note that only a single configuration can exist at a time. + Requires 'Administer System' permission. + operationId: create_5 requestBody: content: - application/merge-patch+json: + application/json: schema: - $ref: '#/components/schemas/GithubConfigurationUpdateRestRequest' + $ref: '#/components/schemas/GitlabConfigurationCreateRestRequest' required: true responses: '200': @@ -1141,40 +1099,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GithubConfigurationResource' + $ref: '#/components/schemas/GitlabConfigurationResource' x-sonar-internal: 'true' - /v2/clean-code-policy/mode: + /v2/dop-translation/github-permission-mappings: get: tags: - - mode-controller - summary: Retrieve current instance Mode - description: > - Fetch the current instance mode. Can be Multi-Quality Rules (MQR) Mode - or Standard Experience. - operationId: getMode + - Dop Translation + summary: Fetch permissions mapping + description: >- + Get the list of all the existing roles with their permission mappings. + Requires 'Administer System' permission. + operationId: fetchAll_1 responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/ModeResource' + $ref: '#/components/schemas/PermissionMappingsSearchRestResponse' x-sonar-internal: 'true' - patch: + post: tags: - - mode-controller - summary: Update current instance Mode - description: > - Update the current instance mode. Can be Multi-Quality Rules (MQR) Mode - or Standard Experience. - - Requires 'Administer System' permission. - operationId: patchMode + - Dop Translation + summary: Create a permission mapping for a custom role + description: Requires 'Administer System' permission. + operationId: createMapping_1 requestBody: content: application/json: schema: - $ref: '#/components/schemas/ModeResource' + $ref: '#/components/schemas/PermissionMappingsPostRequest' required: true responses: '200': @@ -1182,63 +1136,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModeResource' + $ref: '#/components/schemas/PermissionMappingsResource' x-sonar-internal: 'true' - '/v2/authorizations/groups/{id}': + /v2/dop-translation/github-configurations: get: tags: - - group-controller - summary: Fetch a single group - description: Fetch a single group. - operationId: fetchGroup - parameters: - - name: id - in: path - description: The id of the group to fetch. - required: true - schema: - type: string + - Dop Translation + summary: Search GitHub configs + description: |2 + Get the list of GitHub configurations. + Note that a single configuration is supported at this time. + Requires 'Administer System' permission. + operationId: searchGithubConfiguration responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/GroupRestResponse' - delete: - tags: - - group-controller - summary: Deletes a group - description: Deletes a group. - operationId: deleteGroup - parameters: - - name: id - in: path - description: The ID of the group to delete. - required: true - schema: - type: string - responses: - '204': - description: No Content - patch: + $ref: '#/components/schemas/GithubConfigurationSearchRestResponse' + x-sonar-internal: 'true' + post: tags: - - group-controller - summary: Update a group - description: | - Update a group name or description. - operationId: updateGroup - parameters: - - name: id - in: path - required: true - schema: - type: string + - Dop Translation + summary: Create GitHub configuration + description: |2 + Create a new GitHub configuration. + Note that only a single configuration can exist at a time. + Requires 'Administer System' permission. + operationId: createGithubConfiguration requestBody: content: - application/merge-patch+json: + application/json: schema: - $ref: '#/components/schemas/GroupUpdateRestRequest' + $ref: '#/components/schemas/GithubConfigurationCreateRestRequest' required: true responses: '200': @@ -1246,274 +1177,195 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GroupRestResponse' - /v2/system/migrations-status: - get: + $ref: '#/components/schemas/GithubConfigurationResource' + x-sonar-internal: 'true' + /v2/dop-translation/bound-projects: + post: tags: - - database-migrations-controller - summary: 'Gets the status of ongoing database migrations, if any' - description: >- - Return the detailed status of ongoing database migrations including - starting date. If no migration is ongoing or needed it is still possible - to call this endpoint and receive appropriate information. - operationId: getStatus + - Dop Translation + summary: >- + Create a SonarQube project with the information from the provided DevOps + platform project. + description: > + Create a SonarQube project with the information from the provided DevOps + platform project. + + Autoconfigure Pull-Request decoration mechanism. + + Requires the 'Create Projects' permission and setting a Personal Access + Token with api/alm_integrations/set_pat for a user who will be using + this endpoint + operationId: createBoundProject + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BoundProjectCreateRestRequest' + required: true + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/BoundProjectCreateRestResponse' + /v2/clean-code-policy/rules: + post: + tags: + - Clean Code Policy + summary: Custom rule creation + description: |2 + Create a custom rule. + Requires the 'Administer Quality Profiles' permission. + operationId: create_6 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RuleCreateRestRequest' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/DatabaseMigrationsResponse' - /v2/system/liveness: + $ref: '#/components/schemas/RuleRestResponse' + x-internal: 'true' + /v2/authorizations/groups: get: tags: - - liveness-controller - summary: >- - Provide liveness of SonarQube, meant to be used as a liveness probe on - Kubernetes + - Authorizations + summary: Group search description: |2 - Require 'Administer System' permission or authentication with passcode. - - When SonarQube is fully started, liveness check for database connectivity, Compute Engine status, and, except for DataCenter Edition, if ElasticSearch is Green or Yellow. - - When SonarQube is on Safe Mode (for example when a database migration is running), liveness check only for database connectivity - operationId: livenessCheck + Get the list of groups. + The results are sorted alphabetically by group name. + operationId: search_1 parameters: - - name: X-Sonar-Passcode - in: header - description: 'Passcode can be provided, see SonarQube documentation' + - name: managed + in: query + description: >- + Return managed or non-managed groups. Only available for managed + instances, throws for non-managed instances + required: false + schema: + type: boolean + description: >- + Return managed or non-managed groups. Only available for managed + instances, throws for non-managed instances + - name: q + in: query + description: >- + Filter on name. + + This parameter performs a partial match (contains), it is case + insensitive. required: false schema: type: string - responses: - '204': - description: This SonarQube node is alive - default: - description: This SonarQube node is not alive and should be rescheduled - /v2/system/health: - get: - tags: - - health-controller - operationId: getHealth - parameters: - - name: X-Sonar-Passcode - in: header + description: >- + Filter on name. + + This parameter performs a partial match (contains), it is case + insensitive. + - name: userId + in: query + description: >- + Filter groups containing the user. Only available for system + administrators. Using != operator will search for groups without the + user. required: false schema: type: string + description: >- + Filter groups containing the user. Only available for system + administrators. Using != operator will search for groups without + the user. + internal: 'true' + x-internal: 'true' + - name: pageSize + in: query + description: >- + Number of results per page. A value of 0 will only return the + pagination information. + required: false + schema: + type: integer + format: int32 + default: 50 + description: >- + Number of results per page. A value of 0 will only return the + pagination information. + maximum: 500 + minimum: 0 + - name: pageIndex + in: query + description: 1-based page index + required: false + schema: + type: integer + format: int32 + default: 1 + description: 1-based page index + exclusiveMinimum: 0 + minimum: 1 responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Health' - /v2/sca/sbom-reports: - get: + $ref: '#/components/schemas/GroupsSearchRestResponse' + post: tags: - - k - summary: Get a software bill of materials (SBOM) report - description: > - Return a report based on the dependencies in this project's branch, - using - - the type parameter and Accept header to select the report to generate. - - - Right now, the available reports have specialized MIME types that - - go along with those formats: - - - * CycloneDX: https://cyclonedx.org/specification/overview/ - * JSON & XML - * SPDX 2.3: https://spdx.github.io/spdx-spec/v2.3/ - * JSON & XML - - Theoretically you could send just the MIME type for the format you - wanted - - as the Accept header and get that report. However, there may be other - - formats that don't have a specific MIME type attached -- think two - - different flavors of a CSV report, for example. In that case, we still - - need a specific report type parameter to help differentiate more. - - - This is an internal API and is subject to change without notice. - operationId: generateReport - parameters: - - name: projectKey - in: query - description: Key of the project to build report for - required: true - schema: - type: string - description: Key of the project to build report for - - name: branchKey - in: query - description: Key of the branch to build report for - required: false - schema: - type: string - description: Key of the branch to build report for - - name: type - in: query - description: > - Type of report to generate. - - The `Accept` header sent by the client determines the format of the - report. - - Currently supported: cyclonedx (application/vnd.cyclonedx+json), - cyclonedx (application/vnd.cyclonedx+xml), - - spdx (application/vnd.spdx+json), spdx (application/vnd.spdx+xml) - required: true - schema: - type: string - description: > - Type of report to generate. - - The `Accept` header sent by the client determines the format of - the report. - - Currently supported: cyclonedx (application/vnd.cyclonedx+json), - cyclonedx (application/vnd.cyclonedx+xml), - - spdx (application/vnd.spdx+json), spdx (application/vnd.spdx+xml) - enum: - - cyclonedx - - spdx_23 + - Authorizations + summary: Create a new group + description: Create a new group. + operationId: create_7 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GroupCreateRestRequest' + required: true responses: - '200': - description: The desired report in the desired output format + '201': + description: Created content: - application/vnd.cyclonedx+json: - schema: - type: string - application/vnd.cyclonedx+xml: - schema: - type: string - application/spdx+json: - schema: - type: string - application/spdx+xml: + application/json: schema: - type: string - x-sonar-internal: 'true' - /v2/sca/releases: + $ref: '#/components/schemas/GroupRestResponse' + /v2/authorizations/group-memberships: get: tags: - - k - summary: Search for releases - description: | - Search for package releases that appear in the analyzed project, - as determined by software composition analysis. - - This endpoint returns one result for each release, - rather than one result for each time a release is pulled in. - Each result may appear in multiple files or scopes that - all use the same version of the affected package. - - The search results do not include full details on the dependencies - that pull in each release, only a summary. To get the full dependency - details, use the /releases/{key} endpoint for a single release. - - In the terminology of this endpoint, a "release" is a version of - a package like "lodash 1.2.3", and a "dependency" is a specific file - and scope that pulls in the release such as "subproject/pom.xml test". - Each returned release may have multiple dependencies. - - This is an internal API and is subject to change without notice. - operationId: search_3 + - Authorizations + summary: Search across group memberships + description: |2 + Get the list of groups and members matching the query. + operationId: search_2 parameters: - - name: projectKey - in: query - description: Key of the project to fetch all dependencies from - required: true - schema: - type: string - description: Key of the project to fetch all dependencies from - - name: branchKey + - name: userId in: query description: >- - Key of the Branch to fetch all dependencies from. If not provided, - the default branch will be used unless a Pull Request Key is - provided. - required: false - schema: - type: string - description: >- - Key of the Branch to fetch all dependencies from. If not provided, - the default branch will be used unless a Pull Request Key is - provided. - - name: pullRequestKey - in: query - description: Key of the Pull Request to fetch all dependencies from. + ID of the user for which to search groups. If not set, all groups + are returned. required: false schema: type: string - description: Key of the Pull Request to fetch all dependencies from. - - name: direct - in: query - description: >- - Filter on the direct attribute. TRUE stands for direct dependencies, - FALSE for transitive dependencies. - required: false - schema: - type: boolean - description: >- - Filter on the direct attribute. TRUE stands for direct - dependencies, FALSE for transitive dependencies. - - name: newInPullRequest - in: query - description: >- - Filter on the newInPullRequest attribute. TRUE stands for only - releases introduced vs. the target branch, FALSE for releases shared - with target. - required: false - schema: - type: boolean - description: >- - Filter on the newInPullRequest attribute. TRUE stands for only - releases introduced vs. the target branch, FALSE for releases - shared with target. - - name: productionScope - in: query - description: >- - Filter on the productionScope attribute. TRUE stands for only - production dependencies, FALSE for only not in production. If a - release is both, it matches both. - required: false - schema: - type: boolean description: >- - Filter on the productionScope attribute. TRUE stands for only - production dependencies, FALSE for only not in production. If a - release is both, it matches both. - - name: packageManagers - in: query - required: false - schema: - type: array - description: Filter on the package manager - items: - type: string - uniqueItems: true - - name: q + ID of the user for which to search groups. If not set, all groups + are returned. + - name: groupId in: query description: >- - Filter on the package name. This parameter performs a partial match - (contains and case insensitive) on the package name. + ID of the group for which to search members. If not set, all groups + are returned. required: false schema: type: string description: >- - Filter on the package name. This parameter performs a partial - match (contains and case insensitive) on the package name. + ID of the group for which to search members. If not set, all + groups are returned. - name: pageSize in: query description: >- @@ -1538,6 +1390,7 @@ paths: format: int32 default: 1 description: 1-based page index + exclusiveMinimum: 0 minimum: 1 responses: '200': @@ -1545,250 +1398,160 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ReleasesSearchRestResponse' - x-sonar-internal: 'true' - '/v2/sca/releases/{key}': + $ref: '#/components/schemas/GroupsMembershipSearchRestResponse' + post: + tags: + - Authorizations + summary: Add a group membership + description: Add a user to a group. + operationId: create_8 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GroupMembershipCreateRestRequest' + required: true + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/GroupMembershipRestResponse' + /v2/atlassian/application-configuration: get: tags: - - k - summary: Get a single release + - Atlassian + summary: Fetch the Atlassian Authentication details if they exist description: | - Fetch a single release by its key. - - This single-release endpoint lists full details for all dependencies - that mention the release. - - In the terminology of this endpoint, a "release" is a version of - a package like "lodash 1.2.3", and a "dependency" is a specific file - and scope that pulls in the release such as "subproject/pom.xml test". - Each returned release may have multiple dependencies. - - This is an internal API and is subject to change without notice. - operationId: fetchRelease - parameters: - - name: key - in: path - description: The key of the release to fetch. - required: true - schema: - type: string + Fetch the Atlassian Authentication details if they exist. + Specifically, only the client ID is returned for security purposes. + operationId: 鲥_8 responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/ReleaseDetailResource' + $ref: >- + #/components/schemas/AtlassianAuthenticationDetailsResultResource x-sonar-internal: 'true' - /v2/sca/issues-releases: - get: + post: tags: - - k - summary: Search for issue-release pairs + - Atlassian + summary: Create/Update the Atlassian Authentication details description: | - Search for software composition analysis issues (dependency risks) - of a project, paired with releases that appear in the analyzed - project. + Create/Update the Atlassian Authentication details. + operationId: 鲥_9 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AtlassianAuthenticationDetailsResource' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: >- + #/components/schemas/AtlassianAuthenticationDetailsResultResource + x-sonar-internal: 'true' + '/v2/users-management/users/{id}': + get: + tags: + - Users Management + summary: Fetch a single user + description: > + Fetch a single user. - This endpoint returns one result for each (issue,release) pair, - rather than one result for each distinct issue. So for example - if a library uses two different versions of a package and - both versions are affected by the same vulnerability, you will - get two results not one. - - However each result may appear in multiple files or scopes that - all use the same version of the affected package. - - In the terminology of this endpoint, a "release" is a version of - a package like "lodash 1.2.3", an "issue" is a problem such as - "CVE-1234", and a "dependency" is a specific file and scope that - pulls in the release such as "subproject/pom.xml test". - - The dependencyRisks attribute in the result is deprecated; please - use issuesReleases instead. - - This is an internal API and is subject to change without notice. - operationId: search_4 + The following fields are only returned when user has Administer System + permission or for logged-in in user : + 'email' + 'externalIdentity' + 'externalProvider' + 'groups' + 'lastConnectionDate' + 'sonarLintLastConnectionDate' + 'tokensCount' + Field 'sonarqubeLastConnectionDate' is only updated every hour, so it may not be accurate, for instance when a user authenticates many times in less than one hour. + operationId: fetchUser parameters: - - name: projectKey - in: query - description: Key of the project to fetch all dependency risks from + - name: id + in: path + description: The id of the user to fetch. required: true schema: type: string - description: Key of the project to fetch all dependency risks from - - name: branchKey - in: query - description: >- - Key of the branch to fetch all dependency risks from. If not - provided, the default branch will be used unless a Pull Request Key - is provided. - required: false - schema: - type: string - description: >- - Key of the branch to fetch all dependency risks from. If not - provided, the default branch will be used unless a Pull Request - Key is provided. - - name: pullRequestKey - in: query - description: Key of the Pull Request to fetch all dependency risks from. - required: false - schema: - type: string - description: Key of the Pull Request to fetch all dependency risks from. - - name: packageManagers - in: query - required: false - schema: - type: array - description: Filter on the package manager - items: - type: string - uniqueItems: true - - name: types - in: query - required: false - schema: - type: array - description: Filter on the issue type - items: - type: string - uniqueItems: true - - name: severities - in: query - required: false - schema: - type: array - description: Filter on the severity - items: - type: string - uniqueItems: true - - name: packageName - in: query - description: >- - Filter on the package name This parameter performs a partial match - (contains and case insensitive) on the package name. - required: false - schema: - type: string - description: >- - Filter on the package name This parameter performs a partial match - (contains and case insensitive) on the package name. - - name: vulnerabilityId - in: query - description: >- - Filter on the vulnerability IDThis parameter performs a partial - match (contains and case insensitive) on the vulnerability ID. - required: false + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UserRestResponseForAdmins' + delete: + tags: + - Users Management + summary: Deactivate a user + description: Deactivates a user. Requires Administer System permission. + operationId: deactivate + parameters: + - name: id + in: path + description: The ID of the user to delete. + required: true schema: type: string - description: >- - Filter on the vulnerability IDThis parameter performs a partial - match (contains and case insensitive) on the vulnerability ID. - - name: newInPullRequest - in: query - description: >- - Filter on the newInPullRequest attribute. TRUE stands for only - releases introduced vs. the target branch, FALSE for releases shared - with target. - required: false - schema: - type: boolean - description: >- - Filter on the newInPullRequest attribute. TRUE stands for only - releases introduced vs. the target branch, FALSE for releases - shared with target. - - name: direct - in: query - description: >- - Filter on the direct attribute. TRUE stands for only direct - dependencies, FALSE for only transitive. If a release is both, it - matches both. - required: false - schema: - type: boolean - description: >- - Filter on the direct attribute. TRUE stands for only direct - dependencies, FALSE for only transitive. If a release is both, it - matches both. - - name: productionScope + - name: anonymize in: query - description: >- - Filter on the productionScope attribute. TRUE stands for only - production dependencies, FALSE for only not in production. If a - release is both, it matches both. + description: Anonymize user in addition to deactivating it. required: false schema: type: boolean - description: >- - Filter on the productionScope attribute. TRUE stands for only - production dependencies, FALSE for only not in production. If a - release is both, it matches both. - - name: sort - in: query - description: Sort order - required: false + default: false + responses: + '204': + description: No Content + patch: + tags: + - Users Management + summary: Update a user + description: | + Update users attributes. + operationId: updateUser + parameters: + - name: id + in: path + required: true schema: type: string - default: +identity - description: Sort order - enum: - - +identity - - '-identity' - - +severity - - '-severity' - - +cvssScore - - '-cvssScore' - - name: pageSize - in: query - description: >- - Number of results per page. A value of 0 will only return the - pagination information. - required: false - schema: - type: integer - format: int32 - default: 50 - description: >- - Number of results per page. A value of 0 will only return the - pagination information. - maximum: 500 - minimum: 0 - - name: pageIndex - in: query - description: 1-based page index - required: false - schema: - type: integer - format: int32 - default: 1 - description: 1-based page index - minimum: 1 + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/UserUpdateRestRequest' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/DependencyRisksSearchRestResponse' - x-sonar-internal: 'true' - '/v2/sca/issues-releases/{key}': + $ref: '#/components/schemas/UserRestResponseForAdmins' + '/v2/system/email-configurations/{id}': get: tags: - - k - summary: Get a single issue-release pair - description: > - Fetch a single (issue,release) pair (dependency risk), using the key - from the search endpoint. - - - This is an internal API and is subject to change without notice. - operationId: fetchDependencyRisk + - System + summary: Fetch an email configuration + description: | + Fetch a Email configuration. Requires 'Administer System' permission. + operationId: getEmailConfiguration parameters: - - name: key + - name: id in: path - description: 'The key of the issue,release pair to fetch.' + description: The id of the configuration to fetch. required: true schema: type: string @@ -1798,324 +1561,375 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DependencyRiskDetailsResource' + $ref: '#/components/schemas/EmailConfigurationResource' x-sonar-internal: 'true' - /v2/sca/clis: - get: + delete: tags: - - k - summary: Get available CLI downloads - description: > - Gets the available SCA CLI downloads. The response includes metadata - about each option - - such as the filename and operating system. - - - This is an internal API and is subject to change without notice. - operationId: getScaClisMetadata + - System + summary: Delete an email configuration + description: | + Delete an email configuration. + Requires 'Administer System' permission. + operationId: deleteEmailConfiguration parameters: - - name: os - in: query - description: Filter by operating system - required: false - schema: - type: string - description: Filter by operating system - enum: - - windows - - linux - - macos - example: windows - example: windows - - name: arch - in: query - description: Filter by CPU architecture - required: false + - name: id + in: path + description: The id of the configuration to delete. + required: true schema: type: string - description: Filter by CPU architecture - enum: - - x64 - - aarch64 - example: x64 - example: x64 responses: - '200': - description: OK - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ScaCliInfoRestResponse' + '204': + description: No Content x-sonar-internal: 'true' - '/v2/sca/clis/{id}': - get: + patch: tags: - - k - summary: Get metadata for a specific CLI download - description: > - Gets the metadata for a specific SCA CLI download. The response includes - the - - filename, SHA-256 checksum, operating system, and CPU architecture. - - - This is an internal API and is subject to change without notice. - operationId: downloadScaCli + - System + summary: Update an email configuration + description: | + Update an email configuration. Requires 'Administer System' permission. + operationId: updateEmailConfiguration parameters: - name: id in: path - description: The ID of the SCA CLI download required: true schema: type: string + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EmailConfigurationUpdateRestRequest' + required: true responses: '200': description: OK content: - application/octet-stream: - schema: - oneOf: - - $ref: '#/components/schemas/ScaCliInfoRestResponse' - - type: string - format: binary application/json: schema: - oneOf: - - $ref: '#/components/schemas/ScaCliInfoRestResponse' - - type: string - format: binary + $ref: '#/components/schemas/EmailConfigurationResource' x-sonar-internal: 'true' - /v2/fix-suggestions/supported-llm-providers: + '/v2/sca/license-profiles/{license-profile-key}': get: tags: - - supported-llm-provider-controller - summary: Get the supported LLM providers - description: >- - Returns the LLM providers that could be used for requesting an AI fix - suggestion - operationId: getLlmProviders + - License Profiles + summary: Get the license policy for a given profile + description: | + Get the license policy for a given profile. + operationId: get_1 + parameters: + - name: license-profile-key + in: path + description: The license profile key. + required: true + schema: + type: string responses: '200': description: OK content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/LlmProviderResponseDto' - /v2/fix-suggestions/service-info: - get: + $ref: '#/components/schemas/LicenseProfileDetailsResource' + x-sonar-internal: 'true' + delete: tags: - - service-info-controller - summary: Request status and subscription information of AI CodeFix service - operationId: get + - License Profiles + summary: Delete the license profile + description: Delete the license profile. + operationId: delete + parameters: + - name: license-profile-key + in: path + description: The id of the license profile + required: true + schema: + type: string responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceInfo' - /v2/fix-suggestions/service-info/subscription-type: - get: + '204': + description: No Content + x-sonar-internal: 'true' + patch: tags: - - service-info-controller - summary: Request subscription information of AI CodeFix service - operationId: getSubscriptionType + - License Profiles + summary: Update the license profile + description: |2 + Update the license profile for projects to use when evaluating license issues. + operationId: update + parameters: + - name: license-profile-key + in: path + description: The id of the license profile + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LicenseProfilesUpdateRestRequest' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/SubscriptionTypeResponse' - '/v2/fix-suggestions/issues/{issueId}': - get: + $ref: '#/components/schemas/LicenseProfileResource' + x-sonar-internal: 'true' + '/v2/sca/license-profiles/{license-profile-key}/licenses/{license-policy-id}': + patch: tags: - - fix-suggestion-issue-controller - summary: Fetch AI suggestion availability for the given issueId - description: Requires Code Viewer permission. - operationId: get_1 + - License Profiles + summary: Update the policy for a single license + description: |2 + Update the policy for a single license in the license profile. + operationId: patchLicense parameters: - - name: issueId + - name: license-profile-key + in: path + description: The license profile key. + required: true + schema: + type: string + - name: license-policy-id in: path + description: The license ID. required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LicensePolicyLicenseUpdateRestRequest' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/FixSuggestionIssueResponse' - /v2/dop-translation/project-bindings: - get: + $ref: '#/components/schemas/LicensePolicyLicenseResource' + x-sonar-internal: 'true' + '/v2/sca/license-profiles/{license-profile-key}/categories/{category-key}': + patch: tags: - - project-bindings-controller - summary: Search across project bindings - operationId: getProjectBindingByProjectId + - License Profiles + summary: Update the policy for a license category + description: |2 + Update the policy for an entire category in the license profile. + operationId: patchCategory parameters: - - name: repository - in: query - description: | - Filter on the repository name. - This parameter performs an exact, case insensitive, match. - required: false + - name: license-profile-key + in: path + description: The license profile key. + required: true schema: type: string - description: | - Filter on the repository name. - This parameter performs an exact, case insensitive, match. - - name: dopSettingId - in: query - description: Filter on the DevOps Platform setting id. - required: false + - name: category-key + in: path + description: The category key. + required: true schema: type: string - description: Filter on the DevOps Platform setting id. - - name: pageSize - in: query - description: >- - Number of results per page. A value of 0 will only return the - pagination information. - required: false - schema: - type: integer - format: int32 - default: 50 - description: >- - Number of results per page. A value of 0 will only return the - pagination information. - maximum: 500 - minimum: 0 - - name: pageIndex - in: query - description: 1-based page index - required: false - schema: - type: integer - format: int32 - default: 1 - description: 1-based page index - minimum: 1 + enum: + - UNKNOWN + - COPYLEFT_WEAK + - COPYLEFT_STRONG + - COPYLEFT_NETWORK + - COPYLEFT_MAXIMAL + - PERMISSIVE_STANDARD + - PERMISSIVE_AMATEUR + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LicenseProfileCategoryUpdateRestRequest' + required: true responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/ProjectBindingsSearchRestResponse' + $ref: '#/components/schemas/LicenseProfileCategoryResource' x-sonar-internal: 'true' - '/v2/dop-translation/project-bindings/{id}': - get: + /v2/sca/license-profiles/assigned-projects: + patch: tags: - - project-bindings-controller - summary: Fetch a single Project Binding - operationId: getProjectBinding - parameters: - - name: id - in: path - description: The id of the project-bindings to fetch. - required: true - schema: - type: string + - License Profiles + summary: Assign project to license profile + description: |2 + Configure which license profile should be used when analyzing a project for license issues. + operationId: update_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AssignedProjectsUpdateRestRequest' + required: true responses: '200': - description: OK + description: The provided project has been assigned to the license profile. content: application/json: schema: - $ref: '#/components/schemas/ProjectBinding' + $ref: '#/components/schemas/LicenseProfileResource' x-sonar-internal: 'true' - /v2/dop-translation/dop-settings: + '/v2/sca/issues-releases/{key}/changelog': get: tags: - - dop-settings-controller - summary: List all DevOps Platform Integration settings - description: 'Requires the ''Create Projects'' permission ' - operationId: fetchAllDopSettings + - Issues-Releases + summary: Get the changelog for a single issue-release pair + description: > + Get the changelog for a single (issue,release) pair (dependency risk), + using the key from the search endpoint. + + + This is an internal API and is subject to change without notice. + operationId: getChangelog + parameters: + - name: key + in: path + description: 'The key of the (issue,release) pair.' + required: true + schema: + type: string responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/DopSettingsRestResponse' - /v2/architecture/file-graph: - get: + $ref: '#/components/schemas/IssuesReleasesChangesRestResponse' + x-sonar-internal: 'true' + delete: tags: - - k - summary: Find the file graph for this project branch and source. - operationId: 踼 + - Issues-Releases + summary: Delete a comment from an issue-release pair + description: | + Delete a comment from a (issue,release) pair (dependency risk). + + This is an internal API and is subject to change without notice. + operationId: deleteComment parameters: - - name: projectKey - in: query - description: The key of the project. + - name: key + in: path + description: 'The key of the (issue,release) pair.' required: true schema: type: string - - name: branchKey + - name: issueReleaseChangeKey in: query - description: The key of the branch. + description: Issue release change key required: true schema: type: string - - name: source - in: query - description: 'The source that produced this graph. eg. java, python, js, etc.' + description: Issue release change key + responses: + '204': + description: No Content + x-sonar-internal: 'true' + patch: + tags: + - Issues-Releases + summary: Update a comment on an issue-release pair + description: | + Update a comment on a (issue,release) pair (dependency risk). + + This is an internal API and is subject to change without notice. + operationId: updateComment + parameters: + - name: key + in: path + description: 'The key of the (issue,release) pair.' required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IssueReleaseUpdateCommentRestRequest' + required: true responses: '200': description: OK - content: - application/json: - schema: - type: string x-sonar-internal: 'true' - /v2/analysis/version: + /v2/sca/feature-enablements: get: tags: - - version-controller - summary: Server version - description: Get the version of the Scanner Engine - operationId: getVersion + - Feature Enablement + summary: >- + Get the status of SCA feature opt-in (should only be used for the + configuration UX in frontend) + operationId: getFeatureEnablement responses: '200': description: OK content: - text/plain: + application/json: schema: - type: string - /v2/analysis/jres: - get: - tags: - - jres-controller - summary: All JREs metadata - description: Get metadata of all available JREs - operationId: getJresMetadata + $ref: '#/components/schemas/FeatureEnablementResource' + x-sonar-internal: 'true' + patch: + tags: + - Feature Enablement + summary: >- + Update SCA feature opt-in (should only be used for the configuration UX + in frontend) + operationId: updateFeatureEnablement + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureEnablementRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureEnablementResource' + x-sonar-internal: 'true' + /v2/jira/work-types: + get: + tags: + - Jira + summary: >- + Returns a list of all the available Jira work types for a specific Jira + project + description: > + Returns a list of all the available Jira work types for a specific Jira + project. + + Also checks which work types are selected for a given sonar project. + Conditionally, also includes field metadata. + operationId: 鲥_10 parameters: - - name: os + - name: jiraProjectKey in: query - description: >- - Filter the JRE by operating system. Accepted values are 'windows', - 'linux', 'macos', 'alpine' (case-insensitive), with some aliases - required: false + required: true schema: type: string - - name: arch + - name: sonarOrganizationUuid + in: query + required: true + schema: + type: string + format: uuid + - name: sonarProjectId in: query - description: >- - Filter the JRE by CPU architecture. Accepted values are 'x64' and - 'aarch64' (case-insensitive), with some aliases. required: false schema: type: string + - name: includeFields + in: query + required: false + schema: + type: boolean responses: '200': description: OK @@ -2124,77 +1938,116 @@ paths: schema: type: array items: - $ref: '#/components/schemas/JreInfoRestResponse' - '/v2/analysis/jres/{id}': - get: + $ref: '#/components/schemas/JiraWorkTypeResultResource' + x-sonar-internal: 'true' + patch: tags: - - jres-controller - summary: JRE download/metadata - description: >- - This endpoint return the JRE metadata by default. To download the JRE - binary asset, set the Accept header of the request to - 'application/octet-stream'. - operationId: downloadJre - parameters: - - name: id - in: path - description: The ID of the JRE - required: true - schema: - type: string + - Jira + summary: Saves the selected Jira work types for a project + description: > + Receives a Jira project key and a list of work type and stores the work + types. + operationId: 鲥_11 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/JiraWorkTypesSelectionResource' + required: true responses: '200': description: OK + x-sonar-internal: 'true' + /v2/jira/organization-binding-edit: + patch: + tags: + - Jira + summary: TODO + description: | + TODO + operationId: 鲥_12 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchJiraOrganizationBindingEditResource' + required: true + responses: + '201': + description: Created content: - application/octet-stream: - schema: - oneOf: - - $ref: '#/components/schemas/JreInfoRestResponse' - - type: string - format: binary application/json: schema: - oneOf: - - $ref: '#/components/schemas/JreInfoRestResponse' - - type: string - format: binary - /v2/analysis/engine: + $ref: '#/components/schemas/JiraOrganizationBindingResource' + x-sonar-internal: 'true' + /v2/issues/sandbox-settings: get: tags: - - scanner-engine-controller - summary: Scanner engine download/metadata - description: >- - This endpoint return the Scanner Engine metadata by default. To download - the Scanner Engine, set the Accept header of the request to - 'application/octet-stream'. - operationId: downloadScannerEngine + - Issues + summary: Fetch instance sandbox settings + description: > + Fetch the current instance-level sandbox settings. + + Returns configuration including enabled status, default value, + allowOverride setting, and software qualities or rule types based on + current mode. + + Requires 'Administer System' permission. + operationId: getSandboxSettings responses: '200': description: OK content: - application/octet-stream: + application/json: schema: - oneOf: - - $ref: '#/components/schemas/EngineInfoRestResponse' - - type: string - format: binary + $ref: '#/components/schemas/SandboxSettingsResource' + x-sonar-internal: 'true' + patch: + tags: + - Issues + summary: Update instance sandbox settings + description: > + Update the instance-level sandbox settings. + + Cannot enable sandbox without providing software qualities or rule types + unless they already exist. + + When disabling allowOverride, all project-level software quality + overrides are deleted. + + Requires 'Administer System' permission. + operationId: patchSandboxSettings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SandboxSettingsResource' + required: true + responses: + '200': + description: OK + content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/EngineInfoRestResponse' - - type: string - format: binary - /v2/analysis/active_rules: + $ref: '#/components/schemas/SandboxSettingsResource' + x-sonar-internal: 'true' + '/v2/issues/sandbox-settings/{projectKey}': get: tags: - - active-rules-controller - summary: Get all active rules for a specific project - description: Used by the scanner-engine to get all active rules for a given project. - operationId: getActiveRules + - Issues + summary: Fetch project sandbox settings + description: > + Fetch the sandbox settings for a specific project. + + Returns effective configuration including enabled status, software + qualities overrides, and whether settings are inherited from instance or + overridden at project level. + + Requires 'Administer Project' permission. + operationId: getProjectSandboxSettings parameters: - name: projectKey - in: query - description: Project Key + in: path required: true schema: type: string @@ -2204,2823 +2057,5531 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/ActiveRule' - '/v2/authorizations/group-memberships/{id}': + $ref: '#/components/schemas/SandboxSettingsProjectResource' + x-sonar-internal: 'true' + patch: + tags: + - Issues + summary: Update project sandbox settings + description: > + Update the sandbox settings for a specific project. + + The enabled setting can be changed independently of software quality + overrides. + + When allowOverride is disabled at instance level, software quality + changes are not allowed but enabled changes are still permitted. + + Setting overridden=false removes project-level software quality + overrides to inherit from instance settings. + + Requires 'Administer Project' permission and instance sandbox must be + enabled. + operationId: patchProjectSandboxSettings + parameters: + - name: projectKey + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SandboxSettingsProjectResource' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SandboxSettingsProjectResource' + x-sonar-internal: 'true' + '/v2/integrations/integration-configurations/{id}': delete: tags: - - group-membership-controller - summary: Remove a group membership - description: Remove a user from a group - operationId: delete + - integration-configurations-controller + summary: Delete an integration configuration and all its related data. + description: > + Requires global administrator permission. + + This will permanently delete the integration configuration, all + associated workspaces, user bindings, and subscriptions. + operationId: delete_1 parameters: - name: id in: path - description: The ID of the group membership to delete. + description: ID of the integration configuration required: true schema: type: string + format: uuid responses: '204': description: No Content - /issues/search: + x-sonar-internal: 'true' + patch: + tags: + - integration-configurations-controller + summary: Update an integration configuration. + description: Requires global administrator permission. + operationId: update_2 + parameters: + - name: id + in: path + description: ID of the integration configuration + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationConfigurationPatchRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationConfigurationResponse' + x-sonar-internal: 'true' + /v2/fix-suggestions/feature-enablements: get: tags: - - issue - summary: Search Issues - security: - - basicAuth: [] - - tokenAuth: [] + - Fix Suggestions + summary: Fetch the Ai CodeFix feature enablement configurations + operationId: getFeatureEnablement_1 responses: '200': + description: OK content: application/json: schema: - $ref: '#/components/schemas/IssueSearchResponse' - description: >- - The request was successful, and the server has returned the - requested resource in the response body. - '400': - $ref: '#/components/responses/BadRequest' - '401': + $ref: '#/components/schemas/FeatureEnablementResponse' + x-sonar-internal: 'true' + patch: + tags: + - Fix Suggestions + summary: Enable/Disable the AI CodeFix feature at the instance or project level + operationId: updateFeatureEnablement_1 + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/FeatureEnablementRequest' + required: true + responses: + '204': + description: No Content + x-sonar-internal: 'true' + /v2/entitlements/license: + get: + tags: + - Entitlements + summary: Returns information about the license + description: |2 + Returns information about the current license. + Requires 'Administer System' permission. + operationId: getLicense + responses: + '200': + description: OK content: application/json: schema: - type: object - required: - - message - properties: - message: - type: string - description: >- - Authentication is required to access the requested resource. The - client must include the appropriate credentials. - '403': - description: Forbidden - The user does not have the required permissions - '404': - description: Not found - The requested resource does not exist - '500': - description: Internal server error - '503': - $ref: '#/components/responses/Service Unavailable' - parameters: - - $ref: '#/components/parameters/ps' - - $ref: '#/components/parameters/p' - - in: query - name: componentKeys - style: form - schema: - type: string - explode: true - required: false - description: >- - Comma-separated list of component keys. Retrieve issues associated - with the specified components and their descendants. - allowReserved: false - - in: query - name: projectKeys - style: form + $ref: '#/components/schemas/LicenseRestResponse' + x-sonar-internal: 'true' + delete: + tags: + - Entitlements + summary: Deletes the existing license + description: |2 + Deletes the license. Both license keys received from Sonar and from 3rd party system can be removed. + Requires 'Administer System' permission. + operationId: deleteLicense + responses: + '200': + description: OK + x-sonar-internal: 'true' + patch: + tags: + - Entitlements + summary: Refreshes the existing license + description: |2 + Fetches the latest information about the license and updates it on the SonarQube Server instance. + Requires 'Administer System' permission. + operationId: refreshLicense + responses: + '200': + description: OK + x-sonar-internal: 'true' + '/v2/dop-translation/gitlab-permission-mappings/{role}': + delete: + tags: + - Dop Translation + summary: Delete a single permission mappings + description: Requires 'Administer System' permission. + operationId: deleteMapping + parameters: + - name: role + in: path + description: The name of the role to delete + required: true schema: type: string - explode: true - required: false - description: >- - Comma-separated list of project keys. Retrieve issues associated - with the specified projects. - allowReserved: false - - in: query - name: severities - style: form + responses: + '204': + description: No Content + x-sonar-internal: 'true' + patch: + tags: + - Dop Translation + summary: Update a single permission mapping + description: Requires 'Administer System' permission. + operationId: updateMapping + parameters: + - name: role + in: path + description: The name of the role to update + required: true schema: type: string - examples: - - 'INFO,MINOR,MAJOR,CRITICAL,BLOCKER' - explode: true - required: false - description: >- - Comma-separated list of severities (INFO, MINOR, MAJOR, CRITICAL, - BLOCKER). - allowReserved: false - - in: query - name: assignees - style: form + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/DevOpsPermissionMappingUpdateRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PermissionMappingsResource' + x-sonar-internal: 'true' + '/v2/dop-translation/gitlab-configurations/{id}': + get: + tags: + - Dop Translation + summary: Fetch a GitLab configuration + description: | + Fetch a GitLab configuration. Requires 'Administer System' permission. + operationId: getGitlabConfiguration + parameters: + - name: id + in: path + description: The id of the configuration to fetch. + required: true schema: type: string - examples: - - 'admin,usera,__me__' - explode: true - required: false - description: >- - Comma-separated list of assignee logins. The value '__me__' can be - used as a placeholder for user who performs the request - allowReserved: false - - in: query - name: types - style: form + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GitlabConfigurationResource' + x-sonar-internal: 'true' + delete: + tags: + - Dop Translation + summary: Delete a GitLab configuration + description: | + Delete a GitLab configuration. + Requires 'Administer System' permission. + operationId: deleteGitlabConfiguration + parameters: + - name: id + in: path + description: The id of the configuration to delete. + required: true schema: type: string - examples: - - CODE_SMELL - - BUG - - VULNERABILITY - explode: true - required: false - description: >- - Comma-separated list of issue types (CODE_SMELL, BUG, - VULNERABILITY). - allowReserved: false - - in: query - name: statuses - style: form + responses: + '204': + description: No Content + x-sonar-internal: 'true' + patch: + tags: + - Dop Translation + summary: Update a Gitlab configuration + description: | + Update a Gitlab configuration. Requires 'Administer System' permission. + operationId: updateGitlabConfiguration + parameters: + - name: id + in: path + required: true schema: type: string - examples: - - 'OPEN,CONFIRMED,REOPENED,RESOLVED,CLOSED' - explode: true - required: false - description: >- - Comma-separated list of statuses (OPEN, CONFIRMED, REOPENED, - RESOLVED, CLOSED). - allowReserved: false - - in: query - name: resolutions - style: form + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/GitlabConfigurationUpdateRestRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GitlabConfigurationResource' + x-sonar-internal: 'true' + '/v2/dop-translation/github-permission-mappings/{role}': + delete: + tags: + - Dop Translation + summary: Delete a single permission mappings + description: Requires 'Administer System' permission. + operationId: deleteMapping_1 + parameters: + - name: role + in: path + description: The name of the role to delete + required: true schema: type: string - examples: - - 'FALSE-POSITIVE,WONTFIX,FIXED,REMOVED' - explode: true - required: false - description: >- - Comma-separated list of resolutions (FALSE-POSITIVE, WONTFIX, FIXED, - REMOVED). - allowReserved: false - - in: query - name: s - style: form + responses: + '204': + description: No Content + x-sonar-internal: 'true' + patch: + tags: + - Dop Translation + summary: Update a single permission mapping + description: Requires 'Administer System' permission. + operationId: updateMapping_1 + parameters: + - name: role + in: path + description: The name of the role to update + required: true schema: - enum: - - HOTSPOTS - - FILE_LINE - - STATUS - - SEVERITY - - CLOSE_DATE - - CREATION_DATE - - UPDATE_DATE type: string - explode: true - required: false - description: Sort field - allowReserved: false - - in: query - name: asc - style: form - schema: - type: boolean - default: false - explode: true - required: false - description: Ascending sort. Default is false (descending). - allowReserved: false - - in: query - name: resolved - style: form - schema: - type: boolean - explode: true - required: false - description: To match resolved or unresolved issues - allowReserved: false - - in: query - name: rules - style: form - schema: - type: string - explode: true - required: false - description: Comma-separated list of rule keys. - allowReserved: false - - in: query - name: tags - style: form - schema: - type: string - explode: true - required: false - description: Comma-separated list of tags. - allowReserved: false - - in: query - name: authors - style: form - schema: - type: string - examples: - - torvalds@linux-foundation.org - explode: true - required: false - description: >- - Comma-separated list of SCM accounts. To set several values, the - parameter must be called once for each value. - allowReserved: false - - in: query - name: createdAfter - style: form - schema: - type: string - format: date-time - explode: true - required: false - description: >- - Filter issues created after the given date (format YYYY-MM-DD or - datetime ISO format). - allowReserved: false - - in: query - name: createdBefore - style: form - schema: - type: string - format: date-time - explode: true - required: false - description: >- - Filter issues created before the given date (format YYYY-MM-DD or - datetime ISO format). - allowReserved: false - - in: query - name: createdAt - style: form - schema: - type: string - format: date-time - explode: true - required: false - description: >- - Filter issues created at a specific date (format YYYY-MM-DD or - datetime ISO format). - allowReserved: false - - in: query - name: createdInLast - style: form - schema: - type: string - examples: - - 1m - - 1h - - 1d - - 1w - - 1y - explode: true - required: false - description: >- - Filter issues created during a time span before now (e.g. 1m, 1h, - 1d, 1w, 1y). - allowReserved: false - - in: query - name: languages - style: form + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/DevOpsPermissionMappingUpdateRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PermissionMappingsResource' + x-sonar-internal: 'true' + '/v2/dop-translation/github-configurations/{id}': + get: + tags: + - Dop Translation + summary: Fetch a GitHub configuration + description: | + Fetch a GitHub configuration. Requires 'Administer System' permission. + operationId: getGithubConfiguration + parameters: + - name: id + in: path + description: The id of the configuration to fetch. + required: true schema: type: string - explode: true - required: false - description: Comma-separated list of language keys. - allowReserved: false - - in: query - name: facets - style: form + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GithubConfigurationResource' + x-sonar-internal: 'true' + delete: + tags: + - Dop Translation + summary: Delete a GitHub configuration + description: | + Delete a GitHub configuration. + Requires 'Administer System' permission. + operationId: deleteGithubConfiguration + parameters: + - name: id + in: path + description: The id of the configuration to delete. + required: true schema: type: string - explode: true - required: false - description: Comma-separated list of facets to include in the response. - allowReserved: false - - in: query - name: additionalFields - style: form + responses: + '204': + description: No Content + x-sonar-internal: 'true' + patch: + tags: + - Dop Translation + summary: Update a GitHub configuration + description: | + Update a GitHub configuration. Requires 'Administer System' permission. + operationId: updateGithubConfiguration + parameters: + - name: id + in: path + required: true schema: type: string - examples: - - _all - - comments - - languages - - rules - - ruleDescriptionContextKey - - transitions - - actions - - users - explode: true - required: false - description: >- - Comma-separated list of the optional fields to be returned in - response. Action plans are dropped in 5.5, it is not returned in the - response. - allowReserved: false - description: >- - Search for issues based on various criteria. This endpoint supports - pagination and filtering. The response includes issue details, paging - information, and facets if requested. - - Requires the 'Browse' permission on the specified project(s). - - For applications, it also requires 'Browse' permission on its child - projects. - - When issue indexing is in progress returns 503 service unavailable HTTP - code. - operationId: searchIssues - /projects/search: + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/GithubConfigurationUpdateRestRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GithubConfigurationResource' + x-sonar-internal: 'true' + /v2/clean-code-policy/mode: get: tags: - - project - summary: Search Projects + - Clean Code Policy + summary: Retrieve current instance Mode + description: > + Fetch the current instance mode. Can be Multi-Quality Rules (MQR) Mode + or Standard Experience. + operationId: getMode responses: '200': + description: OK content: application/json: schema: - $ref: '#/components/schemas/ProjectSearchResponse' - description: >- - The request was successful, and the server has returned the - requested resource in the response body. - '401': + $ref: '#/components/schemas/ModeResource' + x-sonar-internal: 'true' + patch: + tags: + - Clean Code Policy + summary: Update current instance Mode + description: > + Update the current instance mode. Can be Multi-Quality Rules (MQR) Mode + or Standard Experience. + + Requires 'Administer System' permission. + operationId: patchMode + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ModeResource' + required: true + responses: + '200': + description: OK content: application/json: schema: - type: object - required: - - message - properties: - message: - type: string - description: >- - Authentication is required to access the requested resource. The - client must include the appropriate credentials. + $ref: '#/components/schemas/ModeResource' + x-sonar-internal: 'true' + '/v2/authorizations/groups/{id}': + get: + tags: + - Authorizations + summary: Fetch a single group + description: Fetch a single group. + operationId: fetchGroup parameters: - - in: query - name: analyzedBefore - style: form + - name: id + in: path + description: The id of the group to fetch. + required: true schema: type: string - explode: true - required: false - description: >- - Filter the projects for which the last analysis of all branches are - older than the given date (exclusive). - - Either a date (server timezone) or datetime can be provided. - allowReserved: false - - in: query - name: p - style: form + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GroupRestResponse' + delete: + tags: + - Authorizations + summary: Deletes a group + description: Deletes a group. + operationId: deleteGroup + parameters: + - name: id + in: path + description: The ID of the group to delete. + required: true schema: - type: integer - explode: true - required: false - description: 1-based page number - allowReserved: false - - in: query - name: q - style: form + type: string + responses: + '204': + description: No Content + patch: + tags: + - Authorizations + summary: Update a group + description: | + Update a group name or description. + operationId: updateGroup + parameters: + - name: id + in: path + required: true schema: type: string - explode: true + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/GroupUpdateRestRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GroupRestResponse' + /v2/system/migrations-status: + get: + tags: + - System + summary: 'Gets the status of ongoing database migrations, if any' + description: >- + Return the detailed status of ongoing database migrations including + starting date. If no migration is ongoing or needed it is still possible + to call this endpoint and receive appropriate information. + operationId: getStatus + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseMigrationsResponse' + /v2/system/liveness: + get: + tags: + - System + summary: >- + Provide liveness of SonarQube, meant to be used as a liveness probe on + Kubernetes + description: |2 + Require 'Administer System' permission or authentication with passcode. + + When SonarQube is fully started, liveness check for database connectivity, Compute Engine status, and, except for DataCenter Edition, if ElasticSearch is Green or Yellow. + + When SonarQube is on Safe Mode (for example when a database migration is running), liveness check only for database connectivity + operationId: livenessCheck + parameters: + - name: X-Sonar-Passcode + in: header + description: 'Passcode can be provided, see SonarQube documentation' required: false - description: |- - Limit search to: - component names that contain the supplied string - component keys that contain the supplied string - allowReserved: false - - in: query - name: onProvisionedOnly - style: form schema: - type: boolean - explode: true + type: string + responses: + '204': + description: This SonarQube node is alive + default: + description: This SonarQube node is not alive and should be rescheduled + /v2/system/health: + get: + tags: + - System + operationId: getHealth + parameters: + - name: X-Sonar-Passcode + in: header required: false - description: Filter the projects that are provisioned - allowReserved: false - - in: query - name: projects - style: form schema: type: string - explode: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Health' + /v2/software-quality-reports/accessibility-reports: + get: + tags: + - software-quality-reports-controller + summary: Get accessibility report + description: Get the accessibility report for a project branch. + operationId: 鲥_13 + parameters: + - name: branchKey + in: query required: false - description: Comma-separated list of project keys - allowReserved: false - - in: query - name: ps - style: form schema: - type: integer - explode: true - required: false - description: Page size. Must be greater than 0 and less or equal than 500 - allowReserved: false - - in: query - name: qualifiers - style: form + type: string + - name: projectKey + in: query + required: true + schema: + type: string + - name: standard + in: query + required: true + schema: + type: string + - name: version + in: query + required: true schema: type: string - explode: true - required: false - description: >- - Comma-separated list of component qualifiers. Filter the results - with the specified qualifiers - allowReserved: false - description: Search for projects - operationId: searchProjects - /measures/component: - get: - tags: - - measures - summary: Component responses: '200': + description: OK content: application/json: schema: - $ref: '#/components/schemas/MeasureComponentResponse' - description: >- - The request was successful, and the server has returned the - requested resource in the response body. - '401': + $ref: '#/components/schemas/GetAccessibilityReportResponse' + x-sonar-internal: 'true' + /v2/sca/self-test: + get: + tags: + - Self Test + summary: Run a self test + description: > + Run a self test that the dependency analysis (SCA) feature is enabled + and + + able to reach the cloud services it relies on. + + + This is an internal API and is subject to change without notice. + operationId: performSelfTest + responses: + '200': + description: OK content: application/json: schema: - type: object - required: - - message - properties: - message: - type: string - description: >- - Authentication is required to access the requested resource. The - client must include the appropriate credentials. - '403': + $ref: '#/components/schemas/SelfTestResponse' + x-sonar-internal: 'true' + /v2/sca/self-test/spring-configuration: + get: + tags: + - Self Test + summary: Run a self test that Spring is configured as expected + description: | + Run a self test that Spring is set up and working as we expect. + + This is an internal API and is subject to change without notice. + operationId: performSpringConfigurationSelfTest + parameters: + - name: selfTestName + in: query + required: true + schema: + type: string + minLength: 1 + responses: + '200': + description: OK content: application/json: schema: - type: object - required: - - message - properties: - message: - type: string - description: >- - The server understood the request, but refuses to authorize it. - Ensure the client has appropriate permissions. + $ref: '#/components/schemas/SelfTestSpringConfigurationResponse' + x-sonar-internal: 'true' + /v2/sca/sbom-reports: + get: + tags: + - SBOM Reports + summary: Get a software bill of materials (SBOM) report + description: > + Return a report based on the dependencies in this component's branch, + using + + the type parameter and Accept header to select the report to generate. + + + Right now, the available reports have specialized MIME types that + + go along with those formats: + + + * CycloneDX: https://cyclonedx.org/specification/overview/ + * JSON & XML + * SPDX 2.3: https://spdx.github.io/spdx-spec/v2.3/ + * JSON & XML + * SPDX 3.0: https://spdx.github.io/spdx-spec/v3.0.1/ + * JSON + operationId: generateReport parameters: - - in: query - name: additionalFields - style: form + - name: component + in: query + description: >- + Key of the component (project, application, portfolio) to build + report for + required: true schema: - enum: - - metrics - - period type: string - explode: true + description: >- + Key of the component (project, application, portfolio) to build + report for + - name: branch + in: query + description: Key of the branch to build report for required: false - description: >- - Comma-separated list of additional fields that can be returned in - the response. - allowReserved: false - - in: query - name: branch - style: form schema: type: string - explode: true - required: false - description: Branch key. Not available in the community edition. - allowReserved: false - - in: query - name: component - style: form - schema: - type: string - examples: - - my_project - explode: true - required: true - description: Component key - allowReserved: false - - in: query - name: metricKeys - style: form - schema: - enum: - - accepted_issues - - new_software_quality_maintainability_remediation_effort - - new_technical_debt - - high_impact_accepted_issues - - blocker_violations - - software_quality_blocker_issues - - bugs - - classes - - code_smells - - cognitive_complexity - - comment_lines - - comment_lines_density - - branch_coverage - - new_branch_coverage - - conditions_to_cover - - new_conditions_to_cover - - confirmed_issues - - coverage - - new_coverage - - critical_violations - - complexity - - duplicated_blocks - - new_duplicated_blocks - - duplicated_files - - duplicated_lines - - duplicated_lines_density - - new_duplicated_lines_density - - new_duplicated_lines - - effort_to_reach_software_quality_maintainability_rating_a - - effort_to_reach_maintainability_rating_a - - false_positive_issues - - files - - functions - - generated_lines - - generated_ncloc - - software_quality_high_issues - - info_violations - - software_quality_info_issues - - violations - - prioritized_rule_issues - - line_coverage - - new_line_coverage - - lines - - ncloc - - lines_to_cover - - new_lines_to_cover - - software_quality_low_issues - - software_quality_maintainability_issues - - sqale_rating - - software_quality_maintainability_rating - - new_maintainability_rating - - new_software_quality_maintainability_rating - - major_violations - - software_quality_medium_issues - - minor_violations - - new_accepted_issues - - new_blocker_violations - - new_software_quality_blocker_issues - - new_bugs - - new_code_smells - - new_critical_violations - - new_software_quality_high_issues - - new_info_violations - - new_software_quality_info_issues - - new_violations - - new_lines - - new_software_quality_low_issues - - new_software_quality_maintainability_issues - - new_major_violations - - new_software_quality_medium_issues - - new_minor_violations - - new_software_quality_reliability_issues - - new_security_hotspots - - new_software_quality_security_issues - - new_vulnerabilities - - open_issues - - projects - - alert_status - - releasability_rating - - software_quality_reliability_issues - - reliability_rating - - software_quality_reliability_rating - - new_software_quality_reliability_rating - - new_reliability_rating - - software_quality_reliability_remediation_effort - - reliability_remediation_effort - - new_reliability_remediation_effort - - new_software_quality_reliability_remediation_effort - - reopened_issues - - security_hotspots - - security_hotspots_reviewed - - new_security_hotspots_reviewed - - software_quality_security_issues - - security_rating - - software_quality_security_rating - - new_software_quality_security_rating - - new_security_rating - - security_remediation_effort - - software_quality_security_remediation_effort - - new_software_quality_security_remediation_effort - - new_security_remediation_effort - - security_review_rating - - new_security_review_rating - - skipped_tests - - statements - - sqale_index - - software_quality_maintainability_remediation_effort - - sqale_debt_ratio - - software_quality_maintainability_debt_ratio - - new_software_quality_maintainability_debt_ratio - - new_sqale_debt_ratio - - uncovered_conditions - - new_uncovered_conditions - - uncovered_lines - - new_uncovered_lines - - test_execution_time - - test_errors - - test_failures - - tests - - test_success_density - - vulnerabilities - type: string - explode: true + description: Key of the branch to build report for + - name: type + in: query + description: > + Type of report to generate. + + The `Accept` header sent by the client determines the format of the + report. + + Currently supported: cyclonedx (application/vnd.cyclonedx+json), + cyclonedx (application/vnd.cyclonedx+xml), + + spdx_23 (application/spdx+json), spdx_23 (application/spdx+xml), + + spdx_30 (application/spdx+json) required: true - description: Comma-separated list of metric keys - allowReserved: false - - in: query - name: pullRequest - style: form schema: type: string - examples: - - '5461' - explode: true - required: true - description: Pull request id. Not available in the community edition. - allowReserved: false - description: >- - Return component with specified measures. + description: > + Type of report to generate. - Requires the following permission: 'Browse' on the project of specified - component. - operationId: component - /permissions/add_user: - post: - tags: - - permission - summary: Add permission to a user + The `Accept` header sent by the client determines the format of + the report. + + Currently supported: cyclonedx (application/vnd.cyclonedx+json), + cyclonedx (application/vnd.cyclonedx+xml), + + spdx_23 (application/spdx+json), spdx_23 (application/spdx+xml), + + spdx_30 (application/spdx+json) + enum: + - cyclonedx + - spdx_23 + - spdx_30 responses: '200': - $ref: '#/components/responses/Ok' + description: The desired report in the desired output format + content: + application/vnd.cyclonedx+json: + schema: + type: string + application/vnd.cyclonedx+xml: + schema: + type: string + application/spdx+json: + schema: + type: string + application/spdx+xml: + schema: + type: string + x-sonar-public: 'true' + /v2/sca/risk-reports: + get: + tags: + - Risk Reports + summary: >- + Get a report for all the current SCA dependency risks for a given + component and branch + description: > + Returns list of all risks for a given component and branch. CSV format + is available by setting `Accept: text/csv` in your request headers. + operationId: getReport parameters: - - in: query - name: login - style: form + - name: component + in: query + description: >- + Key of the component (project, application, portfolio) to build + report for + required: true schema: type: string - explode: true - required: true - description: User login - allowReserved: false - - in: query - name: permission - style: form + description: >- + Key of the component (project, application, portfolio) to build + report for + - name: branch + in: query + description: Key of the branch to build report for + required: false schema: type: string - explode: true - required: true + description: Key of the branch to build report for + - name: riskType + in: query description: >- - The permission you would like to grant to the user + Type of risk to filter the report by. If not provided, all risks + types are included. + required: false + schema: + type: string + description: >- + Type of risk to filter the report by. If not provided, all risks + types are included. + enum: + - VULNERABILITY + - PROHIBITED_LICENSE + responses: + '200': + description: The report in the desired output format + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RiskReportItem' + text/csv: + schema: + type: string + x-sonar-public: 'true' + /v2/sca/releases: + get: + tags: + - Releases + summary: Search for releases + description: > + Search for package releases that appear in the analyzed project, + application, or portfolio, as determined by software composition + analysis. - Possible values for global permissions: admin, gateadmin, - profileadmin, provisioning, scan, applicationcreator, - portfoliocreator + This endpoint returns one result for each release, - Possible values for project permissions admin, codeviewer, - issueadmin, securityhotspotadmin, scan, user - allowReserved: false - - in: query - name: projectId - style: form - schema: - type: string - explode: true - required: false - description: Project id - allowReserved: false - - in: query - name: projectKey - style: form - schema: - type: string - explode: true - required: false - description: Project key - allowReserved: false - description: >- - This service defaults to global permissions, but can be limited to - project permissions by providing project id or project key. + rather than one result for each time a release is pulled in. + Each result may appear in multiple files or scopes that - Requires one of the following permissions: + all use the same version of the affected package. - 'Administer System' or 'Administer' rights on the specified project - operationId: addPermissionToAUser - /permissions/add_group: - post: - tags: - - permission - summary: Add a permission to a group - responses: - '200': - $ref: '#/components/responses/Ok' - parameters: - - in: query - name: groupName - style: form - schema: - type: string - explode: true - required: true - description: Group name or 'anyone' (case insensitive) - allowReserved: false - - in: query - name: permission - style: form - schema: - type: string - explode: true - required: true - description: >- - The permission you would like to grant to the group. + The search results do not include full details on the dependencies - Possible values for global permissions: admin, gateadmin, - profileadmin, provisioning, scan, applicationcreator, - portfoliocreator + that pull in each release, only a summary. To get the full dependency + details, use the /releases/{key} endpoint for a single release. - Possible values for project permissions admin, codeviewer, - issueadmin, securityhotspotadmin, scan, user - allowReserved: false - - in: query - name: projectId - style: form - schema: - type: string - explode: true - required: false - description: Project id - allowReserved: false - - in: query - name: projectKey - style: form - schema: - type: string - explode: true - required: false - description: Project key - allowReserved: false - description: >- - This service defaults to global permissions, but can be limited to - project permissions by providing project id or project key. + In the terminology of this endpoint, a "release" is a version of - The group name must be provided. + a package like "lodash 1.2.3", and a "dependency" is a specific file + and scope that pulls in the release such as "subproject/pom.xml test". - Requires one of the following permissions: + Each returned release may have multiple dependencies. - 'Administer System' or 'Administer' rights on the specified project - operationId: addAPermissionToAGroup - /permissions/remove_user: - post: - tags: - - permission - summary: Remove permission from a user - responses: - '200': - $ref: '#/components/responses/Ok' + + This is an internal API and is subject to change without notice. + operationId: search_3 parameters: - - in: query - name: login - style: form - schema: - type: string - explode: true + - name: projectKey + in: query + description: >- + Key of the component (project, application, or portfolio) to fetch + all dependencies from required: true - description: User login - allowReserved: false - - in: query - name: permission - style: form schema: type: string - explode: true - required: true + description: >- + Key of the component (project, application, or portfolio) to fetch + all dependencies from + - name: branchKey + in: query description: >- - The permission you would like to revoke from the user. - - - Possible values for global permissions: admin, gateadmin, - profileadmin, provisioning, scan, applicationcreator, - portfoliocreator - - - Possible values for project permissions admin, codeviewer, - issueadmin, securityhotspotadmin, scan, user - allowReserved: false - - in: query - name: projectId - style: form + Key of the branch to fetch all dependencies from. If not provided, + the default branch will be used unless a pull request key is + provided. + required: false schema: type: string - explode: true + description: >- + Key of the branch to fetch all dependencies from. If not provided, + the default branch will be used unless a pull request key is + provided. + - name: pullRequestKey + in: query + description: Key of the pull request to fetch all dependencies from. required: false - description: Project id - allowReserved: false - - in: query - name: projectKey - style: form schema: type: string - explode: true + description: Key of the pull request to fetch all dependencies from. + - name: direct + in: query + description: >- + Filter on the direct attribute. TRUE stands for direct dependencies, + FALSE for transitive dependencies. required: false - description: Project key - allowReserved: false - description: >- - This service defaults to global permissions, but can be limited to - project permissions by providing project id or project key. - - - Requires one of the following permissions: - - 'Administer System' - - - 'Administer' rights on the specified project - operationId: removePermissionFromAUser - /permissions/remove_group: - post: - tags: - - permission - summary: Remove a permission from a group - responses: - '200': - $ref: '#/components/responses/Ok' - parameters: - - in: query - name: groupName - style: form schema: - type: string - explode: true - required: true - description: Group name or 'anyone' (case insensitive) - allowReserved: false - - in: query - name: permission - style: form + type: boolean + description: >- + Filter on the direct attribute. TRUE stands for direct + dependencies, FALSE for transitive dependencies. + - name: newlyIntroduced + in: query + description: >- + Filter on the newlyIntroduced attribute. TRUE stands for only + releases introduced vs. the target branch, FALSE for releases shared + with target. + required: false schema: - type: string - explode: true - required: true + type: boolean + description: >- + Filter on the newlyIntroduced attribute. TRUE stands for only + releases introduced vs. the target branch, FALSE for releases + shared with target. + - name: productionScope + in: query description: >- - The permission you would like to revoke from the group. - - - Possible values for global permissions: admin, gateadmin, - profileadmin, provisioning, scan, applicationcreator, - portfoliocreator - - - Possible values for project permissions admin, codeviewer, - issueadmin, securityhotspotadmin, scan, user - allowReserved: false - - in: query - name: projectId - style: form + Filter on the productionScope attribute. TRUE stands for only + production dependencies, FALSE for only not in production. If a + release is both, it matches both. + required: false schema: - type: string - explode: true + type: boolean + description: >- + Filter on the productionScope attribute. TRUE stands for only + production dependencies, FALSE for only not in production. If a + release is both, it matches both. + - name: packageManagers + in: query required: false - description: Project id - allowReserved: false - - in: query - name: projectKey - style: form schema: - type: string - explode: true + type: array + description: Filter on the package manager + items: + type: string + uniqueItems: true + - name: q + in: query + description: >- + Filter on the package name. This parameter performs a partial match + (contains and case insensitive) on the package name. required: false - description: Project key - allowReserved: false - description: >- - This service defaults to global permissions, but can be limited to - project permissions by providing project id or project key. - - - The group name must be provided. - - - Requires one of the following permissions: - - 'Administer System' or 'Administer' rights on the specified project - operationId: removeAPermissionFromAGroup - /projects/license_usage: - get: - operationId: getAListOfProjectsAndLicenseUsage - tags: - - project - summary: Get a list of projects and license usage. + schema: + type: string + description: >- + Filter on the package name. This parameter performs a partial + match (contains and case insensitive) on the package name. + - name: pageSize + in: query + description: >- + Number of results per page. A value of 0 will only return the + pagination information. + required: false + schema: + type: integer + format: int32 + default: 50 + description: >- + Number of results per page. A value of 0 will only return the + pagination information. + maximum: 500 + minimum: 0 + - name: pageIndex + in: query + description: 1-based page index + required: false + schema: + type: integer + format: int32 + default: 1 + description: 1-based page index + exclusiveMinimum: 0 + minimum: 1 responses: '200': - description: >- - The request was successful, and the server has returned the - requested resource in the response body. - content: - application/json: - schema: - type: object - properties: - projects: - type: array - items: - type: object - properties: - projectKey: - type: string - projectName: - type: string - branch: - type: string - licenseUsagePercentage: - type: number - linesOfCode: - type: integer - required: - - projectKey - - projectName - - branch - - licenseUsagePercentage - - linesOfCode - required: - - projects - '401': - description: >- - Authentication is required to access the requested resource. The - client must include the appropriate credentials. - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '403': - description: >- - The server understood the request, but refuses to authorize it. - Ensure the client has appropriate permissions. + description: OK content: application/json: schema: - type: object - properties: - message: - type: string - required: - - message - '500': - $ref: '#/components/responses/InternalServerErrror' - /user_tokens/search: + $ref: '#/components/schemas/ReleasesSearchRestResponse' + x-sonar-internal: 'true' + '/v2/sca/releases/{key}': get: - operationId: searchUserTokens tags: - - user_token - summary: Search user tokens - security: - - basicAuth: [] - - tokenAuth: [] + - Releases + summary: Get a single release + description: | + Fetch a single release by its key. + + This single-release endpoint lists full details for all dependencies + that mention the release. + + In the terminology of this endpoint, a "release" is a version of + a package like "lodash 1.2.3", and a "dependency" is a specific file + and scope that pulls in the release such as "subproject/pom.xml test". + Each returned release may have multiple dependencies. + + This is an internal API and is subject to change without notice. + operationId: fetchRelease parameters: - - in: query - name: login - style: form + - name: key + in: path + description: The key of the release to fetch. + required: true schema: type: string - explode: true - required: false - description: >- - User login (admin credentials required to list tokens of another - user) - allowReserved: false responses: '200': - description: >- - The request was successful, and the server has returned the - requested resource in the response body. - content: - application/json: - schema: - $ref: '#/components/schemas/UserTokenSearchResponse' - '401': - description: >- - Authentication is required to access the requested resource. The - client must include the appropriate credentials. - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '403': - description: >- - The server understood the request, but refuses to authorize it. - Ensure the client has appropriate permissions. + description: OK content: application/json: schema: - type: object - properties: - message: - type: string - required: - - message - description: >- - List the tokens for the current user or the specified user. Requires - 'Administer System' permission to list tokens of another user. - /user_tokens/generate: - post: - operationId: generateUserToken + $ref: '#/components/schemas/ReleaseDetailResource' + x-sonar-internal: 'true' + /v2/sca/license-profiles/assignable-projects: + get: tags: - - user_token - summary: Generate a user token - security: - - basicAuth: [] - - tokenAuth: [] + - License Profiles + summary: License profile assignable projects + description: |2 + List the projects that can be assigned to the license profile. Assigning the + project to a license profile will cause that license profile to be used when + analyzing the project for license issues. + operationId: index_1 parameters: - - in: query - name: name - style: form - schema: - type: string - explode: true + - name: licenseProfileUuid + in: query + description: > + The key of the license profile whose assignable projects should be + retrieved. required: true - description: Token name - allowReserved: false - - in: query - name: login - style: form schema: type: string - explode: true + description: > + The key of the license profile whose assignable projects should be + retrieved. + - name: assignedToLicenseProfile + in: query + description: |2 + Providing this parameter filters by whether projects are assigned to the license profile or not. + Omitting this parameter includes all projects which can be assigned to the license profile, + regardless of whether they are already assigned to the license profile. required: false - description: >- - User login (admin credentials required to generate token for another - user) - allowReserved: false - - in: query - name: type - style: form schema: - type: string - enum: - - USER_TOKEN - - GLOBAL_ANALYSIS_TOKEN - - PROJECT_ANALYSIS_TOKEN - - PROJECT_BADGE_TOKEN - explode: true + type: boolean + description: |2 + Providing this parameter filters by whether projects are assigned to the license profile or not. + Omitting this parameter includes all projects which can be assigned to the license profile, + regardless of whether they are already assigned to the license profile. + - name: q + in: query + description: |2 + Providing this parameter performs a partial match (contains and case insensitive) on the project name. required: false - description: Token type (default is USER_TOKEN) - allowReserved: false - - in: query - name: projectKey - style: form schema: type: string - explode: true - required: false + description: |2 + Providing this parameter performs a partial match (contains and case insensitive) on the project name. + - name: pageSize + in: query description: >- - Project key (required for PROJECT_ANALYSIS_TOKEN and - PROJECT_BADGE_TOKEN types) - allowReserved: false - - in: query - name: expirationDate - style: form + Number of results per page. A value of 0 will only return the + pagination information. + required: false schema: - type: string - format: date - explode: true + type: integer + format: int32 + default: 50 + description: >- + Number of results per page. A value of 0 will only return the + pagination information. + maximum: 500 + minimum: 0 + - name: pageIndex + in: query + description: 1-based page index required: false - description: Token expiration date in ISO 8601 date format (YYYY-MM-DD) - allowReserved: false - responses: + schema: + type: integer + format: int32 + default: 1 + description: 1-based page index + exclusiveMinimum: 0 + minimum: 1 + responses: '200': - description: >- - The request was successful, and the server has returned the - requested resource in the response body. - content: - application/json: - schema: - $ref: '#/components/schemas/UserTokenGenerateResponse' - '400': - $ref: '#/components/responses/BadRequest' - '401': - description: >- - Authentication is required to access the requested resource. The - client must include the appropriate credentials. - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '403': - description: >- - The server understood the request, but refuses to authorize it. - Ensure the client has appropriate permissions. + description: OK content: application/json: schema: - type: object - properties: - message: - type: string - required: - - message - description: >- - Generate a user token. Requires 'Administer System' permission to - generate a token for another user. - /user_tokens/revoke: - post: - operationId: revokeUserToken + $ref: '#/components/schemas/AssignableProjectsIndexRestResponse' + x-sonar-internal: 'true' + /v2/sca/issues-releases: + get: tags: - - user_token - summary: Revoke a user token - security: - - basicAuth: [] - - tokenAuth: [] + - Issues-Releases + summary: Search for issue-release pairs + description: | + Search for software composition analysis issues (dependency risks) + of a project, paired with releases that appear in the analyzed + project, application, or portfolio. + + This endpoint returns one result for each (issue,release) pair, + rather than one result for each distinct issue. So for example + if a library uses two different versions of a package and + both versions are affected by the same vulnerability, you will + get two results not one. + + However each result may appear in multiple files or scopes that + all use the same version of the affected package. + + In the terminology of this endpoint, a "release" is a version of + a package like "lodash 1.2.3", an "issue" is a problem such as + "CVE-1234", and a "dependency" is a specific file and scope that + pulls in the release such as "subproject/pom.xml test". + + This is an internal API and is subject to change without notice. + operationId: search_4 parameters: - - in: query - name: name - style: form - schema: - type: string - explode: true + - name: projectKey + in: query + description: >- + Key of the component (project, application, portfolio) to fetch all + dependency risks from. required: true - description: Token name - allowReserved: false - - in: query - name: login - style: form schema: type: string - explode: true - required: false - description: >- - User login (admin credentials required to revoke token of another - user) - allowReserved: false - responses: - '204': - description: No content - Token successfully revoked - '400': - $ref: '#/components/responses/BadRequest' - '401': - description: >- - Authentication is required to access the requested resource. The - client must include the appropriate credentials. - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '403': + description: >- + Key of the component (project, application, portfolio) to fetch + all dependency risks from. + - name: branchKey + in: query description: >- - The server understood the request, but refuses to authorize it. - Ensure the client has appropriate permissions. - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '404': - description: Not found - The token does not exist - description: >- - Revoke a user token. Requires 'Administer System' permission to revoke a - token for another user. - /alm_settings/list: - get: - tags: - - alm_settings - summary: List ALM settings - operationId: listAlmSettings - description: >- - List the available DevOps Platform settings for a given project, sorted - by ALM key. Requires 'Administer project' permission if project is - specified, or 'Create Projects' permission otherwise. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - - in: query - name: project - style: form + Key of the branch to fetch all dependency risks from. If not + provided, the default branch will be used unless a pull request key + is provided. + required: false schema: type: string + description: >- + Key of the branch to fetch all dependency risks from. If not + provided, the default branch will be used unless a pull request + key is provided. + - name: pullRequestKey + in: query + description: Key of the pull request to fetch all dependency risks from. required: false - description: Project key - allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/list_definitions: - get: - tags: - - alm_settings - summary: List all ALM definitions - operationId: listAlmDefinitions - description: >- - List all DevOps Platform settings, sorted by creation date. Requires - 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/count_binding: - get: - tags: - - alm_settings - summary: Count project bindings - operationId: countAlmBindings - description: >- - Returns the number of projects bound to a DevOps Platform setting. - Requires 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - - in: query - name: almSetting - style: form schema: type: string - required: true - description: ALM setting key - allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/validate: - get: - tags: - - alm_settings - summary: Validate ALM setting - operationId: validateAlmSetting - description: >- - Validates an ALM setting by checking credentials and connectivity. - Requires 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - - in: query - name: key - style: form + description: Key of the pull request to fetch all dependency risks from. + - name: sort + in: query + description: Sort order + required: false schema: type: string - required: true - description: ALM setting key - allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/create_github: - post: - tags: - - alm_settings - summary: Create GitHub ALM setting - operationId: createGithubAlmSetting - description: >- - Creates a new GitHub integration configuration. Requires 'Administer - System' permission. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - - in: query - name: key - style: form + default: +identity + description: Sort order + enum: + - +identity + - '-identity' + - +severity + - '-severity' + - +cvssScore + - '-cvssScore' + - name: packageManagers + in: query + required: false schema: - type: string - required: true - description: Unique key for the GitHub ALM setting - allowReserved: false - - in: query - name: appId - style: form + type: array + description: Filter on the package manager + items: + type: string + uniqueItems: true + - name: types + in: query + required: false schema: - type: string - required: true - description: GitHub App ID - allowReserved: false - - in: query - name: clientId - style: form + type: array + description: Filter on the issue type + items: + type: string + uniqueItems: true + - name: qualities + in: query + required: false schema: - type: string - required: true - description: GitHub OAuth client ID - allowReserved: false - - in: query - name: clientSecret - style: form + type: array + description: Filter on the quality domain + items: + type: string + uniqueItems: true + - name: severities + in: query + required: false schema: - type: string - required: true - description: GitHub OAuth client secret - allowReserved: false - - in: query - name: privateKey - style: form + type: array + description: Filter on the severity + items: + type: string + uniqueItems: true + - name: statuses + in: query + required: false schema: - type: string - required: true - description: GitHub App private key - allowReserved: false - - in: query - name: url - style: form + type: array + description: Filter on the status + items: + type: string + uniqueItems: true + - name: packageName + in: query + description: >- + Filter on the package name. This parameter performs a partial match + (contains and case insensitive) on the package name. + required: false schema: type: string - required: true - description: 'GitHub API URL (e.g., https://api.github.com)' - allowReserved: false - - in: query - name: webhookSecret - style: form + description: >- + Filter on the package name. This parameter performs a partial + match (contains and case insensitive) on the package name. + - name: vulnerabilityId + in: query + description: >- + Filter on the vulnerability ID. This parameter performs a partial + match (contains and case insensitive) on the vulnerability ID. + required: false schema: type: string + description: >- + Filter on the vulnerability ID. This parameter performs a partial + match (contains and case insensitive) on the vulnerability ID. + - name: newlyIntroduced + in: query + description: >- + Filter on the isNew attribute. TRUE stands for only releases + introduced vs. the target branch, FALSE for releases shared with + target. required: false - description: GitHub webhook secret - allowReserved: false + schema: + type: boolean + description: >- + Filter on the isNew attribute. TRUE stands for only releases + introduced vs. the target branch, FALSE for releases shared with + target. + - name: direct + in: query + description: >- + Filter on the direct attribute. TRUE stands for only direct + dependencies, FALSE for only transitive. If a release is both, it + matches both. + required: false + schema: + type: boolean + description: >- + Filter on the direct attribute. TRUE stands for only direct + dependencies, FALSE for only transitive. If a release is both, it + matches both. + - name: productionScope + in: query + description: >- + Filter on the productionScope attribute. TRUE stands for only + production dependencies, FALSE for only not in production. If a + release is both, it matches both. + required: false + schema: + type: boolean + description: >- + Filter on the productionScope attribute. TRUE stands for only + production dependencies, FALSE for only not in production. If a + release is both, it matches both. + - name: assignees + in: query + required: false + schema: + type: array + description: Filter on assignee logins. + items: + type: string + uniqueItems: true + - name: projects + in: query + required: false + schema: + type: array + description: Filter on project keys. + items: + type: string + uniqueItems: true + - name: assigned + in: query + description: Filter on whether the issue is assigned or not. + required: false + schema: + type: boolean + description: Filter on whether the issue is assigned or not. + - name: pageSize + in: query + description: >- + Number of results per page. A value of 0 will only return the + pagination information. + required: false + schema: + type: integer + format: int32 + default: 50 + description: >- + Number of results per page. A value of 0 will only return the + pagination information. + maximum: 500 + minimum: 0 + - name: pageIndex + in: query + description: 1-based page index + required: false + schema: + type: integer + format: int32 + default: 1 + description: 1-based page index + exclusiveMinimum: 0 + minimum: 1 responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/create_gitlab: - post: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/IssuesReleasesSearchRestResponse' + x-sonar-internal: 'true' + '/v2/sca/issues-releases/{key}': + get: tags: - - alm_settings - summary: Create GitLab ALM setting - operationId: createGitlabAlmSetting - description: >- - Creates a new GitLab integration configuration. Requires 'Administer - System' permission. - security: - - basicAuth: [] - - tokenAuth: [] + - Issues-Releases + summary: Get a single issue-release pair + description: > + Fetch a single (issue,release) pair (dependency risk), using the key + from the search endpoint. + + + This is an internal API and is subject to change without notice. + operationId: fetchIssueRelease parameters: - - in: query - name: key - style: form + - name: key + in: path + description: 'The key of the issue,release pair to fetch.' + required: true schema: type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/IssueReleaseDetailsResource' + x-sonar-internal: 'true' + /v2/sca/issues-releases/all-assignees: + get: + tags: + - Issues-Releases + summary: Get the list of users assigned to at least one issue in a given branch + description: | + Get the list of users assigned to at least one issue in a given branch. + operationId: getAllAssignees + parameters: + - name: projectKey + in: query + description: Key of the project to fetch all assignee users from. required: true - description: Unique key for the GitLab ALM setting - allowReserved: false - - in: query - name: personalAccessToken - style: form schema: type: string - required: true - description: GitLab personal access token - allowReserved: false - - in: query - name: url - style: form + description: Key of the project to fetch all assignee users from. + - name: branchKey + in: query + description: >- + Key of the branch to fetch all assignee users from. If not provided, + the default branch will be used unless a pull request key is + provided. + required: false schema: type: string - required: true - description: 'GitLab API URL (e.g., https://gitlab.com/api/v4)' - allowReserved: false + description: >- + Key of the branch to fetch all assignee users from. If not + provided, the default branch will be used unless a pull request + key is provided. + - name: pullRequestKey + in: query + description: Key of the pull request to fetch all assignee users from. + required: false + schema: + type: string + description: Key of the pull request to fetch all assignee users from. responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/create_azure: - post: + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserResource' + x-sonar-internal: 'true' + /v2/sca/enabled: + get: tags: - - alm_settings - summary: Create Azure DevOps ALM setting - operationId: createAzureAlmSetting - description: >- - Creates a new Azure DevOps integration configuration. Requires - 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] + - SCA Enabled + summary: >- + Get whether SCA is licensed and set up for a resource's organization or + enterprise, prefer the /feature-enabled path in new code + operationId: getFeatureEnabled + parameters: [] + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ScaFeatureEnabledResource' + x-sonar-internal: 'true' + /v2/sca/feature-enabled: + get: + tags: + - SCA Enabled + summary: >- + Get whether SCA is licensed and set up for a resource's organization or + enterprise, prefer the /feature-enabled path in new code + operationId: getFeatureEnabled_1 + parameters: [] + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ScaFeatureEnabledResource' + x-sonar-internal: 'true' + /v2/sca/clis: + get: + tags: + - SCA CLIs + summary: Get available CLI downloads + description: > + Gets the available SCA CLI downloads. The response includes metadata + about each option + + such as the filename and operating system. + + + This is an internal API and is subject to change without notice. + operationId: getScaClisMetadata parameters: - - in: query - name: key - style: form + - name: os + in: query + description: Filter by operating system + required: false schema: type: string - required: true - description: Unique key for the Azure ALM setting - allowReserved: false - - in: query - name: personalAccessToken - style: form + description: Filter by operating system + enum: + - windows + - linux + - macos + example: windows + example: windows + - name: arch + in: query + description: Filter by CPU architecture + required: false schema: type: string + description: Filter by CPU architecture + enum: + - x64 + - aarch64 + example: x64 + example: x64 + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ScaCliInfoRestResponse' + x-sonar-internal: 'true' + '/v2/sca/clis/{id}': + get: + tags: + - SCA CLIs + summary: Get metadata for a specific CLI download + description: > + Gets the metadata for a specific SCA CLI download. The response includes + the + + filename, SHA-256 checksum, operating system, and CPU architecture. + + + This is an internal API and is subject to change without notice. + operationId: downloadScaCli + parameters: + - name: id + in: path + description: The ID of the SCA CLI download required: true - description: Azure personal access token - allowReserved: false - - in: query - name: url - style: form schema: type: string - required: true - description: 'Azure DevOps URL (e.g., https://dev.azure.com)' - allowReserved: false responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/create_bitbucket: - post: + description: OK + content: + application/octet-stream: + schema: + type: string + format: binary + application/json: + schema: + $ref: '#/components/schemas/ScaCliInfoRestResponse' + x-sonar-internal: 'true' + /v2/sca/analyses: + get: tags: - - alm_settings - summary: Create Bitbucket Server ALM setting - operationId: createBitbucketAlmSetting - description: >- - Creates a new Bitbucket Server integration configuration. Requires - 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] + - Analyses + summary: Fetch analysis status for one branch + description: | + Fetch analysis status information for a branch. If the branch has + never been analyzed, will return a status of 404. + + This is an internal API and is subject to change without notice. + operationId: fetchAnalysis parameters: - - in: query - name: key - style: form + - name: projectKey + in: query + description: Key of the project to fetch analysis status from + required: true schema: type: string - required: true - description: Unique key for the Bitbucket ALM setting - allowReserved: false - - in: query - name: personalAccessToken - style: form + description: Key of the project to fetch analysis status from + - name: branchKey + in: query + description: >- + Key of the branch to fetch analysis status from. If not provided, + the default branch will be used unless a pull request key is + provided. + required: false schema: type: string - required: true - description: Bitbucket Server personal access token - allowReserved: false - - in: query - name: url - style: form + description: >- + Key of the branch to fetch analysis status from. If not provided, + the default branch will be used unless a pull request key is + provided. + - name: pullRequestKey + in: query + description: Key of the pull request to fetch analysis status from. + required: false schema: type: string - required: true - description: Bitbucket Server URL - allowReserved: false + description: Key of the pull request to fetch analysis status from. responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/create_bitbucketcloud: - post: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AnalysisResource' + x-sonar-internal: 'true' + /v2/jira/user-actions: + get: tags: - - alm_settings - summary: Create Bitbucket Cloud ALM setting - operationId: createBitbucketcloudAlmSetting - description: >- - Creates a new Bitbucket Cloud integration configuration. Requires - 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] + - Jira + summary: Returns a list of available user actions for a project + description: > + Returns a list of available user actions for the authenticated user in + the context of a specific project. + + If the user is not authenticated, returns an empty list. + operationId: 鲥_14 parameters: - - in: query - name: key - style: form - schema: - type: string + - name: sonarProjectId + in: query required: true - description: Unique key for the Bitbucket Cloud ALM setting - allowReserved: false - - in: query - name: clientId - style: form schema: type: string + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + type: string + x-sonar-internal: 'true' + /v2/jira/projects: + get: + tags: + - Jira + summary: Returns a list of all the available Jira projects + description: Returns a list of all the available Jira projects + operationId: 鲥_15 + parameters: + - name: sonarOrganizationUuid + in: query required: true - description: Bitbucket Cloud OAuth client ID - allowReserved: false - - in: query - name: clientSecret - style: form schema: type: string + format: uuid + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/JiraProjectResultResource' + x-sonar-internal: 'true' + '/v2/jira/linked-issues-count/{sonarProjectId}': + get: + tags: + - Jira + summary: Count linked Jira issues + description: | + Count the number of Jira issues linked to a specific Sonar project. + Accepts only authenticated requests. + operationId: 鲥_16 + parameters: + - name: sonarProjectId + in: path required: true - description: Bitbucket Cloud OAuth client secret - allowReserved: false - - in: query - name: workspace - style: form schema: type: string - required: true - description: Bitbucket Cloud workspace ID - allowReserved: false responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedIssuesCountResource' + x-sonar-internal: 'true' + '/v2/integrations/user-bindings/{id}': + get: + tags: + - Slack User Bindings + summary: Get Slack user binding + description: > + Retrieves a Slack user binding by its ID. Users can only access their + own bindings + + unless they have administrative privileges. + operationId: getUserBinding + parameters: [] + responses: + '200': + description: User binding retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/UserBindingResponse' + '401': + description: Authentication required '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/set_github_binding: - post: + description: Insufficient permissions + '404': + description: User binding not found + '500': + description: Internal server error + x-sonar-internal: 'true' + /v2/fix-suggestions/supported-rules: + get: tags: - - alm_settings - summary: Bind project to GitHub repository - operationId: setGithubBinding + - Fix Suggestions + summary: Get the supported rules + description: Returns the list of rules for which a fix suggestion can be generated + operationId: supportedRules + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SupportedRulesDto' + x-sonar-internal: 'true' + /v2/fix-suggestions/supported-llm-providers: + get: + tags: + - Fix Suggestions + summary: Get the supported LLM providers description: >- - Binds a SonarQube project to a GitHub repository. Requires 'Administer' - permission on the project. - security: - - basicAuth: [] - - tokenAuth: [] + Returns the LLM providers that could be used for requesting an AI fix + suggestion + operationId: getLlmProviders + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LlmProviderResponseDto' + x-sonar-internal: 'true' + /v2/fix-suggestions/service-info: + get: + tags: + - Fix Suggestions + summary: Request status of AI CodeFix service + operationId: get_2 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + x-sonar-internal: 'true' + '/v2/fix-suggestions/issues/{issueId}': + get: + tags: + - Fix Suggestions + summary: Fetch AI suggestion availability for the given issueId + description: Requires Code Viewer permission. + operationId: get_3 parameters: - - in: query - name: almSetting - style: form + - name: issueId + in: path + required: true schema: type: string - required: true - description: ALM setting key - allowReserved: false - - in: query - name: project - style: form + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/FixSuggestionIssueResponse' + /v2/entitlements/purchasable-features: + get: + tags: + - Entitlements + summary: Returns a list of all available purchasable features for this edition + description: |2 + Returns a list of all available purchasable features for this edition including the ones who are already purchased + operationId: getPurchasableFeatures + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PurchasableFeatureRestResponse' + x-sonar-internal: 'true' + /v2/dop-translation/project-bindings: + get: + tags: + - Dop Translation + summary: Search across project bindings + operationId: getProjectBindingByProjectId + parameters: + - name: repository + in: query + description: | + Filter on the repository name. + This parameter performs an exact, case insensitive, match. + required: false schema: type: string - required: true - description: SonarQube project key - allowReserved: false - - in: query - name: repository - style: form + description: | + Filter on the repository name. + This parameter performs an exact, case insensitive, match. + - name: dopSettingId + in: query + description: Filter on the DevOps Platform setting id. + required: false schema: type: string - required: true - description: GitHub repository name (org/repo) - allowReserved: false - - in: query - name: monorepo - style: form + description: Filter on the DevOps Platform setting id. + - name: repositoryUrl + in: query + description: > + Filter on the repository URL. + + This parameter can be in different formats, the traditional URL or + the git remote URL (https or ssh). + required: false schema: - type: boolean + type: string + description: > + Filter on the repository URL. + + This parameter can be in different formats, the traditional URL or + the git remote URL (https or ssh). + - name: pageSize + in: query + description: >- + Number of results per page. A value of 0 will only return the + pagination information. required: false - description: Whether the project is part of a monorepo - allowReserved: false - - in: query - name: summaryCommentEnabled - style: form schema: - type: boolean + type: integer + format: int32 + default: 50 + description: >- + Number of results per page. A value of 0 will only return the + pagination information. + maximum: 500 + minimum: 0 + - name: pageIndex + in: query + description: 1-based page index required: false - description: Enable summary comments in GitHub PRs - allowReserved: false + schema: + type: integer + format: int32 + default: 1 + description: 1-based page index + exclusiveMinimum: 0 + minimum: 1 responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/set_gitlab_binding: - post: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBindingsSearchRestResponse' + x-sonar-internal: 'true' + '/v2/dop-translation/project-bindings/{id}': + get: tags: - - alm_settings - summary: Bind project to GitLab repository - operationId: setGitlabBinding - description: >- - Binds a SonarQube project to a GitLab repository. Requires 'Administer' - permission on the project. - security: - - basicAuth: [] - - tokenAuth: [] + - Dop Translation + summary: Fetch a single Project Binding + operationId: getProjectBinding parameters: - - in: query - name: almSetting - style: form - schema: - type: string + - name: id + in: path + description: The id of the project-bindings to fetch. required: true - description: ALM setting key - allowReserved: false - - in: query - name: project - style: form schema: type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectBinding' + x-sonar-internal: 'true' + /v2/dop-translation/dop-settings: + get: + tags: + - Dop Translation + summary: List all DevOps Platform Integration settings + description: 'Requires the ''Create Projects'' permission ' + operationId: fetchAllDopSettings + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DopSettingsRestResponse' + /v2/atlassian/auth-url: + get: + tags: + - Atlassian + summary: Generate Jira authentication URL + description: | + Generate the authentication URL for Jira OAuth flow. + Requires authenticated user. + operationId: 鲥_17 + parameters: + - name: sonarOrganizationKey + in: query required: true - description: SonarQube project key - allowReserved: false - - in: query - name: repository - style: form schema: type: string + - name: sonarOrganizationUuid + in: query required: true - description: GitLab project ID - allowReserved: false - - in: query - name: monorepo - style: form schema: - type: boolean - required: false - description: Whether the project is part of a monorepo - allowReserved: false + type: string + format: uuid responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/set_azure_binding: - post: + description: OK + content: + application/json: + schema: + type: string + x-sonar-internal: 'true' + /v2/architecture/graphs: + get: tags: - - alm_settings - summary: Bind project to Azure DevOps repository - operationId: setAzureBinding - description: >- - Binds a SonarQube project to an Azure DevOps repository. Requires - 'Administer' permission on the project. - security: - - basicAuth: [] - - tokenAuth: [] + - Architecture + summary: >- + Search all current graphs available for a branch. This endpoint do not + includes graph Data itself + operationId: 鲥_18 parameters: - - in: query - name: almSetting - style: form - schema: - type: string + - name: projectKey + in: query + description: The key of the project. required: true - description: ALM setting key - allowReserved: false - - in: query - name: project - style: form schema: type: string + - name: branchKey + in: query + description: The key of the branch. required: true - description: SonarQube project key - allowReserved: false - - in: query - name: projectName - style: form schema: type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/_a' + x-sonar-internal: 'true' + '/v2/architecture/graphs/{id}': + get: + tags: + - Architecture + summary: Get graph data by id. + description: Fetch the graph data produced by analysis. + operationId: 鲥_19 + parameters: + - name: id + in: path + description: id of the graph data. required: true - description: Azure DevOps project name - allowReserved: false - - in: query - name: repositoryName - style: form schema: type: string - required: true - description: Azure DevOps repository name - allowReserved: false - - in: query - name: monorepo - style: form - schema: - type: boolean - required: false - description: Whether the project is part of a monorepo - allowReserved: false responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/set_bitbucket_binding: - post: + description: OK + content: + application/graph+json: + schema: + type: string + x-sonar-internal: 'true' + /v2/architecture/file-graph: + get: tags: - - alm_settings - summary: Bind project to Bitbucket Server repository - operationId: setBitbucketBinding - description: >- - Binds a SonarQube project to a Bitbucket Server repository. Requires - 'Administer' permission on the project. - security: - - basicAuth: [] - - tokenAuth: [] + - Architecture + summary: Find the file graph for this project branch and source. + operationId: 鲥_20 parameters: - - in: query - name: almSetting - style: form - schema: - type: string + - name: projectKey + in: query + description: The key of the project. required: true - description: ALM setting key - allowReserved: false - - in: query - name: project - style: form schema: type: string + - name: branchKey + in: query + description: The key of the branch. required: true - description: SonarQube project key - allowReserved: false - - in: query - name: repository - style: form schema: type: string + - name: source + in: query + description: 'The source that produced this graph. eg. java, python, js, etc.' required: true - description: Bitbucket repository slug - allowReserved: false - - in: query - name: slug - style: form schema: type: string - required: true - description: Bitbucket project key - allowReserved: false - - in: query - name: monorepo - style: form - schema: - type: boolean - required: false - description: Whether the project is part of a monorepo - allowReserved: false responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/set_bitbucketcloud_binding: - post: + description: OK + content: + application/json: + schema: + type: string + x-sonar-internal: 'true' + /v2/analysis/version: + get: tags: - - alm_settings - summary: Bind project to Bitbucket Cloud repository - operationId: setBitbucketcloudBinding - description: >- - Binds a SonarQube project to a Bitbucket Cloud repository. Requires - 'Administer' permission on the project. - security: - - basicAuth: [] - - tokenAuth: [] + - Analysis + summary: Server version + description: Get the version of the Scanner Engine + operationId: getVersion + responses: + '200': + description: OK + content: + text/plain: + schema: + type: string + /v2/analysis/jres: + get: + tags: + - Analysis + summary: All JREs metadata + description: Get metadata of all available JREs + operationId: getJresMetadata parameters: - - in: query - name: almSetting - style: form - schema: - type: string - required: true - description: ALM setting key - allowReserved: false - - in: query - name: project - style: form + - name: os + in: query + description: >- + Filter the JRE by operating system. Accepted values are 'windows', + 'linux', 'macos', 'alpine' (case-insensitive), with some aliases + required: false schema: type: string - required: true - description: SonarQube project key - allowReserved: false - - in: query - name: repository - style: form + - name: arch + in: query + description: >- + Filter the JRE by CPU architecture. Accepted values are 'x64' and + 'aarch64' (case-insensitive), with some aliases. + required: false schema: type: string - required: true - description: Bitbucket Cloud repository slug - allowReserved: false - - in: query - name: monorepo - style: form - schema: - type: boolean - required: false - description: Whether the project is part of a monorepo - allowReserved: false responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/delete: - post: + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/JreInfoRestResponse' + '/v2/analysis/jres/{id}': + get: tags: - - alm_settings - summary: Delete ALM setting - operationId: deleteAlmSetting + - Analysis + summary: JRE download/metadata description: >- - Deletes a DevOps Platform setting from SonarQube. Requires 'Administer - System' permission. - security: - - basicAuth: [] - - tokenAuth: [] + This endpoint return the JRE metadata by default. To download the JRE + binary asset, set the Accept header of the request to + 'application/octet-stream'. + operationId: downloadJre parameters: - - in: query - name: key - style: form + - name: id + in: path + description: The ID of the JRE + required: true schema: type: string - required: true - description: ALM setting key - allowReserved: false responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/get_binding: + description: OK + content: + application/octet-stream: + schema: + type: string + format: binary + application/json: + schema: + $ref: '#/components/schemas/JreInfoRestResponse' + /v2/analysis/engine: get: tags: - - alm_settings - summary: Get project binding - operationId: getAlmBinding + - Analysis + summary: Scanner engine download/metadata description: >- - Gets the DevOps Platform binding for a project. Requires 'Browse' - permission on the project. - security: - - basicAuth: [] - - tokenAuth: [] + This endpoint return the Scanner Engine metadata by default. To download + the Scanner Engine, set the Accept header of the request to + 'application/octet-stream'. + operationId: downloadScannerEngine + responses: + '200': + description: OK + content: + application/octet-stream: + schema: + type: string + format: binary + application/json: + schema: + $ref: '#/components/schemas/EngineInfoRestResponse' + /v2/analysis/active_rules: + get: + tags: + - Analysis + summary: Get all active rules for a specific project + description: Used by the scanner-engine to get all active rules for a given project. + operationId: getActiveRules parameters: - - in: query - name: project - style: form + - name: projectKey + in: query + description: Project Key + required: true schema: type: string - required: true - description: Project key - allowReserved: false responses: '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - '404': - description: Not found - The requested project or binding does not exist - /alm_settings/delete_binding: - post: + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ActiveRule' + '/v2/sca/license-profiles/assigned-projects/{project-key}': + delete: tags: - - alm_settings - summary: Delete project binding - operationId: deleteAlmBinding - description: >- - Removes the DevOps Platform binding from a project. Requires - 'Administer' permission on the project. - security: - - basicAuth: [] - - tokenAuth: [] + - License Profiles + summary: Remove the project's assignment to the license profile. + description: |2 + Remove the project's assignment to the license profile. If there is a default license profile, + it will be used to analyze license issues for this project. + operationId: delete_2 parameters: - - in: query - name: project - style: form + - name: project-key + in: path + required: true schema: type: string + responses: + '204': + description: No Content + x-sonar-internal: 'true' + '/v2/authorizations/group-memberships/{id}': + delete: + tags: + - Authorizations + summary: Remove a group membership + description: Remove a user from a group + operationId: delete_3 + parameters: + - name: id + in: path + description: The ID of the group membership to delete. required: true - description: Project key - allowReserved: false + schema: + type: string responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/validate_binding: + '204': + description: No Content + /issues/search: get: tags: - - alm_settings - summary: Validate project binding - operationId: validateAlmBinding - description: >- - Validates the DevOps Platform binding for a project. Requires 'Browse' - permission on the project. + - searchIssues + summary: Search Issues security: - basicAuth: [] - tokenAuth: [] - parameters: - - in: query - name: project - style: form - schema: - type: string - required: true - description: Project key - allowReserved: false responses: '200': - $ref: '#/components/responses/Ok' + content: + application/json: + schema: + $ref: '#/components/schemas/IssueSearchResponse' + description: >- + The request was successful, and the server has returned the + requested resource in the response body. + '400': + $ref: '#/components/responses/BadRequest' '401': - $ref: '#/components/responses/Unauthorized' + content: + application/json: + schema: + type: object + required: + - message + properties: + message: + type: string + description: >- + Authentication is required to access the requested resource. The + client must include the appropriate credentials. '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/update_github: - post: - tags: - - alm_settings - summary: Update GitHub ALM setting - operationId: updateGithubAlmSetting - description: >- - Updates an existing GitHub integration configuration. Requires - 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] + description: Forbidden - The user does not have the required permissions + '404': + description: Not found - The requested resource does not exist + '500': + description: Internal server error + '503': + $ref: '#/components/responses/Service Unavailable' parameters: + - $ref: '#/components/parameters/ps' + - $ref: '#/components/parameters/p' - in: query - name: key + name: componentKeys style: form schema: type: string - required: true - description: ALM setting key to update + explode: true + required: false + description: >- + Comma-separated list of component keys. Retrieve issues associated + with the specified components and their descendants. allowReserved: false - in: query - name: newKey + name: projectKeys style: form schema: type: string + explode: true required: false - description: New key for the GitHub ALM setting + description: >- + Comma-separated list of project keys. Retrieve issues associated + with the specified projects. allowReserved: false - in: query - name: appId + name: severities style: form schema: type: string - required: true - description: GitHub App ID + examples: + - 'INFO,MINOR,MAJOR,CRITICAL,BLOCKER' + explode: true + required: false + description: >- + Comma-separated list of severities (INFO, MINOR, MAJOR, CRITICAL, + BLOCKER). allowReserved: false - in: query - name: clientId + name: assignees style: form schema: type: string - required: true - description: GitHub OAuth client ID + examples: + - 'admin,usera,__me__' + explode: true + required: false + description: >- + Comma-separated list of assignee logins. The value '__me__' can be + used as a placeholder for user who performs the request allowReserved: false - in: query - name: clientSecret + name: types style: form schema: type: string + examples: + - CODE_SMELL + - BUG + - VULNERABILITY + explode: true required: false - description: GitHub OAuth client secret + description: >- + Comma-separated list of issue types (CODE_SMELL, BUG, + VULNERABILITY). allowReserved: false - in: query - name: privateKey + name: statuses style: form schema: type: string + examples: + - 'OPEN,CONFIRMED,REOPENED,RESOLVED,CLOSED' + explode: true required: false - description: GitHub App private key + description: >- + Comma-separated list of statuses (OPEN, CONFIRMED, REOPENED, + RESOLVED, CLOSED). allowReserved: false - in: query - name: url + name: resolutions style: form schema: type: string - required: true - description: GitHub API URL + examples: + - 'FALSE-POSITIVE,WONTFIX,FIXED,REMOVED' + explode: true + required: false + description: >- + Comma-separated list of resolutions (FALSE-POSITIVE, WONTFIX, FIXED, + REMOVED). allowReserved: false - in: query - name: webhookSecret + name: s style: form schema: + enum: + - HOTSPOTS + - FILE_LINE + - STATUS + - SEVERITY + - CLOSE_DATE + - CREATION_DATE + - UPDATE_DATE type: string + explode: true required: false - description: GitHub webhook secret + description: Sort field allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/update_gitlab: - post: - tags: - - alm_settings - summary: Update GitLab ALM setting - operationId: updateGitlabAlmSetting - description: >- - Updates an existing GitLab integration configuration. Requires - 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - in: query - name: key + name: asc style: form schema: - type: string - required: true - description: ALM setting key to update + type: boolean + default: false + explode: true + required: false + description: Ascending sort. Default is false (descending). allowReserved: false - in: query - name: newKey + name: resolved style: form schema: - type: string + type: boolean + explode: true required: false - description: New key for the GitLab ALM setting + description: To match resolved or unresolved issues allowReserved: false - in: query - name: personalAccessToken + name: rules style: form schema: type: string + explode: true required: false - description: GitLab personal access token + description: Comma-separated list of rule keys. allowReserved: false - in: query - name: url + name: tags style: form schema: type: string - required: true - description: GitLab API URL + explode: true + required: false + description: Comma-separated list of tags. allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/update_azure: - post: - tags: - - alm_settings - summary: Update Azure DevOps ALM setting - operationId: updateAzureAlmSetting - description: >- - Updates an existing Azure DevOps integration configuration. Requires - 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - in: query - name: key + name: authors style: form schema: type: string - required: true - description: ALM setting key to update + examples: + - torvalds@linux-foundation.org + explode: true + required: false + description: >- + Comma-separated list of SCM accounts. To set several values, the + parameter must be called once for each value. allowReserved: false - in: query - name: newKey + name: createdAfter style: form schema: type: string + format: date-time + explode: true required: false - description: New key for the Azure ALM setting + description: >- + Filter issues created after the given date (format YYYY-MM-DD or + datetime ISO format). allowReserved: false - in: query - name: personalAccessToken + name: createdBefore style: form schema: type: string + format: date-time + explode: true required: false - description: Azure personal access token + description: >- + Filter issues created before the given date (format YYYY-MM-DD or + datetime ISO format). allowReserved: false - in: query - name: url + name: createdAt style: form schema: type: string - required: true - description: Azure DevOps URL + format: date-time + explode: true + required: false + description: >- + Filter issues created at a specific date (format YYYY-MM-DD or + datetime ISO format). allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/update_bitbucket: - post: - tags: - - alm_settings - summary: Update Bitbucket Server ALM setting - operationId: updateBitbucketAlmSetting - description: >- - Updates an existing Bitbucket Server integration configuration. Requires - 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - in: query - name: key + name: createdInLast style: form schema: type: string - required: true - description: ALM setting key to update + examples: + - 1m + - 1h + - 1d + - 1w + - 1y + explode: true + required: false + description: >- + Filter issues created during a time span before now (e.g. 1m, 1h, + 1d, 1w, 1y). allowReserved: false - in: query - name: newKey + name: languages style: form schema: type: string + explode: true required: false - description: New key for the Bitbucket ALM setting + description: Comma-separated list of language keys. allowReserved: false - in: query - name: personalAccessToken + name: facets style: form schema: type: string + explode: true required: false - description: Bitbucket Server personal access token + description: Comma-separated list of facets to include in the response. allowReserved: false - in: query - name: url + name: additionalFields style: form schema: type: string - required: true - description: Bitbucket Server URL + examples: + - _all + - comments + - languages + - rules + - ruleDescriptionContextKey + - transitions + - actions + - users + explode: true + required: false + description: >- + Comma-separated list of the optional fields to be returned in + response. Action plans are dropped in 5.5, it is not returned in the + response. allowReserved: false + description: >- + Search for issues based on various criteria. This endpoint supports + pagination and filtering. The response includes issue details, paging + information, and facets if requested. + + Requires the 'Browse' permission on the specified project(s). + + For applications, it also requires 'Browse' permission on its child + projects. + + When issue indexing is in progress returns 503 service unavailable HTTP + code. + operationId: searchIssues + /projects/search: + get: + tags: + - project + summary: Search Projects responses: '200': - $ref: '#/components/responses/Ok' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectSearchResponse' + description: >- + The request was successful, and the server has returned the + requested resource in the response body. '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /alm_settings/update_bitbucketcloud: - post: - tags: - - alm_settings - summary: Update Bitbucket Cloud ALM setting - operationId: updateBitbucketcloudAlmSetting - description: >- - Updates an existing Bitbucket Cloud integration configuration. Requires - 'Administer System' permission. - security: - - basicAuth: [] - - tokenAuth: [] + content: + application/json: + schema: + type: object + required: + - message + properties: + message: + type: string + description: >- + Authentication is required to access the requested resource. The + client must include the appropriate credentials. parameters: - in: query - name: key + name: analyzedBefore style: form schema: type: string - required: true - description: ALM setting key to update + explode: true + required: false + description: >- + Filter the projects for which the last analysis of all branches are + older than the given date (exclusive). + + Either a date (server timezone) or datetime can be provided. allowReserved: false - in: query - name: newKey + name: p style: form schema: - type: string + type: integer + explode: true required: false - description: New key for the Bitbucket Cloud ALM setting + description: 1-based page number allowReserved: false - in: query - name: clientId + name: q style: form schema: type: string - required: true - description: Bitbucket Cloud OAuth client ID + explode: true + required: false + description: |- + Limit search to: + component names that contain the supplied string + component keys that contain the supplied string allowReserved: false - in: query - name: clientSecret + name: onProvisionedOnly style: form schema: - type: string + type: boolean + explode: true required: false - description: Bitbucket Cloud OAuth client secret + description: Filter the projects that are provisioned allowReserved: false - in: query - name: workspace + name: projects style: form schema: type: string - required: true - description: Bitbucket Cloud workspace ID - allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /applications/create: - post: - tags: - - applications - summary: Create application - operationId: createApplication - description: >- - Creates a new application in SonarQube. Requires 'Create Applications' - permission. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - - in: query - name: key - style: form - schema: - type: string - required: true - description: Application key - allowReserved: false - - in: query - name: name - style: form - schema: - type: string - required: true - description: Application name + explode: true + required: false + description: Comma-separated list of project keys allowReserved: false - in: query - name: description + name: ps style: form schema: - type: string + type: integer + explode: true required: false - description: Application description + description: Page size. Must be greater than 0 and less or equal than 500 allowReserved: false - in: query - name: visibility + name: qualifiers style: form schema: type: string - enum: - - public - - private + explode: true required: false - description: Application visibility + description: >- + Comma-separated list of component qualifiers. Filter the results + with the specified qualifiers allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /applications/show: + description: Search for projects + operationId: searchProjects + /measures/component: get: tags: - - applications - summary: Show application details - operationId: showApplication - description: >- - Returns details about a specific application. Requires 'Browse' - permission on the application. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - - in: query - name: application - style: form - schema: - type: string - required: true - description: Application key - allowReserved: false + - measures + summary: Component responses: '200': - $ref: '#/components/responses/Ok' + content: + application/json: + schema: + $ref: '#/components/schemas/MeasureComponentResponse' + description: >- + The request was successful, and the server has returned the + requested resource in the response body. '401': - $ref: '#/components/responses/Unauthorized' + content: + application/json: + schema: + type: object + required: + - message + properties: + message: + type: string + description: >- + Authentication is required to access the requested resource. The + client must include the appropriate credentials. '403': - $ref: '#/components/responses/Forbidden' - '404': - description: Not found - The requested application does not exist - /applications/update: - post: - tags: - - applications - summary: Update application - operationId: updateApplication - description: >- - Updates an application's name and/or description. Requires 'Administer' - permission on the application. - security: - - basicAuth: [] - - tokenAuth: [] + content: + application/json: + schema: + type: object + required: + - message + properties: + message: + type: string + description: >- + The server understood the request, but refuses to authorize it. + Ensure the client has appropriate permissions. parameters: - in: query - name: application - style: form - schema: - type: string - required: true - description: Application key - allowReserved: false - - in: query - name: name + name: additionalFields style: form schema: + enum: + - metrics + - period type: string + explode: true required: false - description: New application name + description: >- + Comma-separated list of additional fields that can be returned in + the response. allowReserved: false - in: query - name: description + name: branch style: form schema: type: string + explode: true required: false - description: New application description - allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /applications/add_project: - post: - tags: - - applications - summary: Add project to application - operationId: addProjectToApplication - description: >- - Adds a project to an application. Requires 'Administer' permission on - the application. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - - in: query - name: application - style: form - schema: - type: string - required: true - description: Application key - allowReserved: false - - in: query - name: project - style: form - schema: - type: string - required: true - description: Project key - allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /applications/remove_project: - post: - tags: - - applications - summary: Remove project from application - operationId: removeProjectFromApplication - description: >- - Removes a project from an application. Requires 'Administer' permission - on the application. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - - in: query - name: application - style: form - schema: - type: string - required: true - description: Application key + description: Branch key. Not available in the community edition. allowReserved: false - in: query - name: project + name: component style: form schema: type: string + examples: + - my_project + explode: true required: true - description: Project key + description: Component key allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /applications/set_tags: - post: - tags: - - applications - summary: Set application tags - operationId: setApplicationTags - description: >- - Sets tags for an application. Requires 'Administer' permission on the - application. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - in: query - name: application + name: metricKeys style: form schema: - type: string - required: true - description: Application key - allowReserved: false + enum: + - accepted_issues + - new_software_quality_maintainability_remediation_effort + - new_technical_debt + - high_impact_accepted_issues + - blocker_violations + - software_quality_blocker_issues + - bugs + - classes + - code_smells + - cognitive_complexity + - comment_lines + - comment_lines_density + - branch_coverage + - new_branch_coverage + - conditions_to_cover + - new_conditions_to_cover + - confirmed_issues + - coverage + - new_coverage + - critical_violations + - complexity + - duplicated_blocks + - new_duplicated_blocks + - duplicated_files + - duplicated_lines + - duplicated_lines_density + - new_duplicated_lines_density + - new_duplicated_lines + - effort_to_reach_software_quality_maintainability_rating_a + - effort_to_reach_maintainability_rating_a + - false_positive_issues + - files + - functions + - generated_lines + - generated_ncloc + - software_quality_high_issues + - info_violations + - software_quality_info_issues + - violations + - prioritized_rule_issues + - line_coverage + - new_line_coverage + - lines + - ncloc + - lines_to_cover + - new_lines_to_cover + - software_quality_low_issues + - software_quality_maintainability_issues + - sqale_rating + - software_quality_maintainability_rating + - new_maintainability_rating + - new_software_quality_maintainability_rating + - major_violations + - software_quality_medium_issues + - minor_violations + - new_accepted_issues + - new_blocker_violations + - new_software_quality_blocker_issues + - new_bugs + - new_code_smells + - new_critical_violations + - new_software_quality_high_issues + - new_info_violations + - new_software_quality_info_issues + - new_violations + - new_lines + - new_software_quality_low_issues + - new_software_quality_maintainability_issues + - new_major_violations + - new_software_quality_medium_issues + - new_minor_violations + - new_software_quality_reliability_issues + - new_security_hotspots + - new_software_quality_security_issues + - new_vulnerabilities + - open_issues + - projects + - alert_status + - releasability_rating + - software_quality_reliability_issues + - reliability_rating + - software_quality_reliability_rating + - new_software_quality_reliability_rating + - new_reliability_rating + - software_quality_reliability_remediation_effort + - reliability_remediation_effort + - new_reliability_remediation_effort + - new_software_quality_reliability_remediation_effort + - reopened_issues + - security_hotspots + - security_hotspots_reviewed + - new_security_hotspots_reviewed + - software_quality_security_issues + - security_rating + - software_quality_security_rating + - new_software_quality_security_rating + - new_security_rating + - security_remediation_effort + - software_quality_security_remediation_effort + - new_software_quality_security_remediation_effort + - new_security_remediation_effort + - security_review_rating + - new_security_review_rating + - skipped_tests + - statements + - sqale_index + - software_quality_maintainability_remediation_effort + - sqale_debt_ratio + - software_quality_maintainability_debt_ratio + - new_software_quality_maintainability_debt_ratio + - new_sqale_debt_ratio + - uncovered_conditions + - new_uncovered_conditions + - uncovered_lines + - new_uncovered_lines + - test_execution_time + - test_errors + - test_failures + - tests + - test_success_density + - vulnerabilities + type: string + explode: true + required: true + description: Comma-separated list of metric keys + allowReserved: false - in: query - name: tags + name: pullRequest style: form schema: type: string + examples: + - '5461' + explode: true required: true - description: Comma-separated list of tags + description: Pull request id. Not available in the community edition. allowReserved: false + description: >- + Return component with specified measures. + + Requires the following permission: 'Browse' on the project of specified + component. + operationId: component + /permissions/add_user: + post: + tags: + - permission + summary: Add permission to a user responses: '200': $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /applications/search: - get: - tags: - - applications - summary: Search applications - operationId: searchApplications - description: >- - Search for applications based on various criteria. Requires 'Browse' - permission. - security: - - basicAuth: [] - - tokenAuth: [] parameters: - - $ref: '#/components/parameters/p' - - $ref: '#/components/parameters/ps' - in: query - name: q + name: login style: form schema: type: string - required: false - description: >- - Limit search to application names or keys containing the supplied - string + explode: true + required: true + description: User login allowReserved: false - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - /applications/refresh: - post: - tags: - - applications - summary: Refresh application - operationId: refreshApplication - description: >- - Triggers a recalculation of the application's data. Requires - 'Administer' permission on the application. - security: - - basicAuth: [] - - tokenAuth: [] - parameters: - in: query - name: application + name: permission style: form schema: type: string + explode: true required: true - description: Application key + description: >- + The permission you would like to grant to the user + + + Possible values for global permissions: admin, gateadmin, + profileadmin, provisioning, scan, applicationcreator, + portfoliocreator + + + Possible values for project permissions admin, codeviewer, + issueadmin, securityhotspotadmin, scan, user + allowReserved: false + - in: query + name: projectId + style: form + schema: + type: string + explode: true + required: false + description: Project id + allowReserved: false + - in: query + name: projectKey + style: form + schema: + type: string + explode: true + required: false + description: Project key allowReserved: false + description: >- + This service defaults to global permissions, but can be limited to + project permissions by providing project id or project key. + + + Requires one of the following permissions: + + 'Administer System' or 'Administer' rights on the specified project + operationId: addPermissionToAUser + /permissions/add_group: + post: + tags: + - permission + summary: Add a permission to a group responses: '200': $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - /applications/delete: - post: - tags: - - applications - summary: Delete application - operationId: deleteApplication - description: >- - Deletes an application from SonarQube. Requires 'Administer' permission - on the application. - security: - - basicAuth: [] - - tokenAuth: [] parameters: - in: query - name: application + name: groupName style: form schema: type: string + explode: true required: true - description: Application key + description: Group name or 'anyone' (case insensitive) + allowReserved: false + - in: query + name: permission + style: form + schema: + type: string + explode: true + required: true + description: >- + The permission you would like to grant to the group. + + + Possible values for global permissions: admin, gateadmin, + profileadmin, provisioning, scan, applicationcreator, + portfoliocreator + + + Possible values for project permissions admin, codeviewer, + issueadmin, securityhotspotadmin, scan, user + allowReserved: false + - in: query + name: projectId + style: form + schema: + type: string + explode: true + required: false + description: Project id + allowReserved: false + - in: query + name: projectKey + style: form + schema: + type: string + explode: true + required: false + description: Project key + allowReserved: false + description: >- + This service defaults to global permissions, but can be limited to + project permissions by providing project id or project key. + + + The group name must be provided. + + + Requires one of the following permissions: + + 'Administer System' or 'Administer' rights on the specified project + operationId: addAPermissionToAGroup + /permissions/remove_user: + post: + tags: + - permission + summary: Remove permission from a user + responses: + '200': + $ref: '#/components/responses/Ok' + parameters: + - in: query + name: login + style: form + schema: + type: string + explode: true + required: true + description: User login + allowReserved: false + - in: query + name: permission + style: form + schema: + type: string + explode: true + required: true + description: >- + The permission you would like to revoke from the user. + + + Possible values for global permissions: admin, gateadmin, + profileadmin, provisioning, scan, applicationcreator, + portfoliocreator + + + Possible values for project permissions admin, codeviewer, + issueadmin, securityhotspotadmin, scan, user + allowReserved: false + - in: query + name: projectId + style: form + schema: + type: string + explode: true + required: false + description: Project id + allowReserved: false + - in: query + name: projectKey + style: form + schema: + type: string + explode: true + required: false + description: Project key allowReserved: false + description: >- + This service defaults to global permissions, but can be limited to + project permissions by providing project id or project key. + + + Requires one of the following permissions: + + 'Administer System' + + + 'Administer' rights on the specified project + operationId: removePermissionFromAUser + /permissions/remove_group: + post: + tags: + - permission + summary: Remove a permission from a group responses: '200': $ref: '#/components/responses/Ok' + parameters: + - in: query + name: groupName + style: form + schema: + type: string + explode: true + required: true + description: Group name or 'anyone' (case insensitive) + allowReserved: false + - in: query + name: permission + style: form + schema: + type: string + explode: true + required: true + description: >- + The permission you would like to revoke from the group. + + + Possible values for global permissions: admin, gateadmin, + profileadmin, provisioning, scan, applicationcreator, + portfoliocreator + + + Possible values for project permissions admin, codeviewer, + issueadmin, securityhotspotadmin, scan, user + allowReserved: false + - in: query + name: projectId + style: form + schema: + type: string + explode: true + required: false + description: Project id + allowReserved: false + - in: query + name: projectKey + style: form + schema: + type: string + explode: true + required: false + description: Project key + allowReserved: false + description: >- + This service defaults to global permissions, but can be limited to + project permissions by providing project id or project key. + + + The group name must be provided. + + + Requires one of the following permissions: + + 'Administer System' or 'Administer' rights on the specified project + operationId: removeAPermissionFromAGroup + /projects/license_usage: + get: + operationId: getAListOfProjectsAndLicenseUsage + tags: + - project + summary: Get a list of projects and license usage. + responses: + '200': + description: >- + The request was successful, and the server has returned the + requested resource in the response body. + content: + application/json: + schema: + type: object + properties: + projects: + type: array + items: + type: object + properties: + projectKey: + type: string + projectName: + type: string + branch: + type: string + licenseUsagePercentage: + type: number + linesOfCode: + type: integer + required: + - projectKey + - projectName + - branch + - licenseUsagePercentage + - linesOfCode + required: + - projects '401': - $ref: '#/components/responses/Unauthorized' + description: >- + Authentication is required to access the requested resource. The + client must include the appropriate credentials. + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message '403': - $ref: '#/components/responses/Forbidden' - '404': - description: Not found - The requested application does not exist -components: - schemas: - UserCreateRestRequest: + description: >- + The server understood the request, but refuses to authorize it. + Ensure the client has appropriate permissions. + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + $ref: '#/components/responses/InternalServerErrror' + /user_tokens/search: + get: + operationId: searchUserTokens + tags: + - user_token + summary: Search user tokens + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: login + style: form + schema: + type: string + explode: true + required: false + description: >- + User login (admin credentials required to list tokens of another + user) + allowReserved: false + responses: + '200': + description: >- + The request was successful, and the server has returned the + requested resource in the response body. + content: + application/json: + schema: + $ref: '#/components/schemas/UserTokenSearchResponse' + '401': + description: >- + Authentication is required to access the requested resource. The + client must include the appropriate credentials. + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: >- + The server understood the request, but refuses to authorize it. + Ensure the client has appropriate permissions. + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + description: >- + List the tokens for the current user or the specified user. Requires + 'Administer System' permission to list tokens of another user. + /user_tokens/generate: + post: + operationId: generateUserToken + tags: + - user_token + summary: Generate a user token + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: name + style: form + schema: + type: string + explode: true + required: true + description: Token name + allowReserved: false + - in: query + name: login + style: form + schema: + type: string + explode: true + required: false + description: >- + User login (admin credentials required to generate token for another + user) + allowReserved: false + - in: query + name: type + style: form + schema: + type: string + enum: + - USER_TOKEN + - GLOBAL_ANALYSIS_TOKEN + - PROJECT_ANALYSIS_TOKEN + - PROJECT_BADGE_TOKEN + explode: true + required: false + description: Token type (default is USER_TOKEN) + allowReserved: false + - in: query + name: projectKey + style: form + schema: + type: string + explode: true + required: false + description: >- + Project key (required for PROJECT_ANALYSIS_TOKEN and + PROJECT_BADGE_TOKEN types) + allowReserved: false + - in: query + name: expirationDate + style: form + schema: + type: string + format: date + explode: true + required: false + description: Token expiration date in ISO 8601 date format (YYYY-MM-DD) + allowReserved: false + responses: + '200': + description: >- + The request was successful, and the server has returned the + requested resource in the response body. + content: + application/json: + schema: + $ref: '#/components/schemas/UserTokenGenerateResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + description: >- + Authentication is required to access the requested resource. The + client must include the appropriate credentials. + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: >- + The server understood the request, but refuses to authorize it. + Ensure the client has appropriate permissions. + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + description: >- + Generate a user token. Requires 'Administer System' permission to + generate a token for another user. + /user_tokens/revoke: + post: + operationId: revokeUserToken + tags: + - user_token + summary: Revoke a user token + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: name + style: form + schema: + type: string + explode: true + required: true + description: Token name + allowReserved: false + - in: query + name: login + style: form + schema: + type: string + explode: true + required: false + description: >- + User login (admin credentials required to revoke token of another + user) + allowReserved: false + responses: + '204': + description: No content - Token successfully revoked + '400': + $ref: '#/components/responses/BadRequest' + '401': + description: >- + Authentication is required to access the requested resource. The + client must include the appropriate credentials. + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: >- + The server understood the request, but refuses to authorize it. + Ensure the client has appropriate permissions. + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: Not found - The token does not exist + description: >- + Revoke a user token. Requires 'Administer System' permission to revoke a + token for another user. + /alm_settings/list: + get: + tags: + - alm_settings + summary: List ALM settings + operationId: listAlmSettings + description: >- + List the available DevOps Platform settings for a given project, sorted + by ALM key. Requires 'Administer project' permission if project is + specified, or 'Create Projects' permission otherwise. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: project + style: form + schema: + type: string + required: false + description: Project key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/list_definitions: + get: + tags: + - alm_settings + summary: List all ALM definitions + operationId: listAlmDefinitions + description: >- + List all DevOps Platform settings, sorted by creation date. Requires + 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/count_binding: + get: + tags: + - alm_settings + summary: Count project bindings + operationId: countAlmBindings + description: >- + Returns the number of projects bound to a DevOps Platform setting. + Requires 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: almSetting + style: form + schema: + type: string + required: true + description: ALM setting key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/validate: + get: + tags: + - alm_settings + summary: Validate ALM setting + operationId: validateAlmSetting + description: >- + Validates an ALM setting by checking credentials and connectivity. + Requires 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: ALM setting key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/create_github: + post: + tags: + - alm_settings + summary: Create GitHub ALM setting + operationId: createGithubAlmSetting + description: >- + Creates a new GitHub integration configuration. Requires 'Administer + System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: Unique key for the GitHub ALM setting + allowReserved: false + - in: query + name: appId + style: form + schema: + type: string + required: true + description: GitHub App ID + allowReserved: false + - in: query + name: clientId + style: form + schema: + type: string + required: true + description: GitHub OAuth client ID + allowReserved: false + - in: query + name: clientSecret + style: form + schema: + type: string + required: true + description: GitHub OAuth client secret + allowReserved: false + - in: query + name: privateKey + style: form + schema: + type: string + required: true + description: GitHub App private key + allowReserved: false + - in: query + name: url + style: form + schema: + type: string + required: true + description: 'GitHub API URL (e.g., https://api.github.com)' + allowReserved: false + - in: query + name: webhookSecret + style: form + schema: + type: string + required: false + description: GitHub webhook secret + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/create_gitlab: + post: + tags: + - alm_settings + summary: Create GitLab ALM setting + operationId: createGitlabAlmSetting + description: >- + Creates a new GitLab integration configuration. Requires 'Administer + System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: Unique key for the GitLab ALM setting + allowReserved: false + - in: query + name: personalAccessToken + style: form + schema: + type: string + required: true + description: GitLab personal access token + allowReserved: false + - in: query + name: url + style: form + schema: + type: string + required: true + description: 'GitLab API URL (e.g., https://gitlab.com/api/v4)' + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/create_azure: + post: + tags: + - alm_settings + summary: Create Azure DevOps ALM setting + operationId: createAzureAlmSetting + description: >- + Creates a new Azure DevOps integration configuration. Requires + 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: Unique key for the Azure ALM setting + allowReserved: false + - in: query + name: personalAccessToken + style: form + schema: + type: string + required: true + description: Azure personal access token + allowReserved: false + - in: query + name: url + style: form + schema: + type: string + required: true + description: 'Azure DevOps URL (e.g., https://dev.azure.com)' + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/create_bitbucket: + post: + tags: + - alm_settings + summary: Create Bitbucket Server ALM setting + operationId: createBitbucketAlmSetting + description: >- + Creates a new Bitbucket Server integration configuration. Requires + 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: Unique key for the Bitbucket ALM setting + allowReserved: false + - in: query + name: personalAccessToken + style: form + schema: + type: string + required: true + description: Bitbucket Server personal access token + allowReserved: false + - in: query + name: url + style: form + schema: + type: string + required: true + description: Bitbucket Server URL + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/create_bitbucketcloud: + post: + tags: + - alm_settings + summary: Create Bitbucket Cloud ALM setting + operationId: createBitbucketcloudAlmSetting + description: >- + Creates a new Bitbucket Cloud integration configuration. Requires + 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: Unique key for the Bitbucket Cloud ALM setting + allowReserved: false + - in: query + name: clientId + style: form + schema: + type: string + required: true + description: Bitbucket Cloud OAuth client ID + allowReserved: false + - in: query + name: clientSecret + style: form + schema: + type: string + required: true + description: Bitbucket Cloud OAuth client secret + allowReserved: false + - in: query + name: workspace + style: form + schema: + type: string + required: true + description: Bitbucket Cloud workspace ID + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/set_github_binding: + post: + tags: + - alm_settings + summary: Bind project to GitHub repository + operationId: setGithubBinding + description: >- + Binds a SonarQube project to a GitHub repository. Requires 'Administer' + permission on the project. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: almSetting + style: form + schema: + type: string + required: true + description: ALM setting key + allowReserved: false + - in: query + name: project + style: form + schema: + type: string + required: true + description: SonarQube project key + allowReserved: false + - in: query + name: repository + style: form + schema: + type: string + required: true + description: GitHub repository name (org/repo) + allowReserved: false + - in: query + name: monorepo + style: form + schema: + type: boolean + required: false + description: Whether the project is part of a monorepo + allowReserved: false + - in: query + name: summaryCommentEnabled + style: form + schema: + type: boolean + required: false + description: Enable summary comments in GitHub PRs + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/set_gitlab_binding: + post: + tags: + - alm_settings + summary: Bind project to GitLab repository + operationId: setGitlabBinding + description: >- + Binds a SonarQube project to a GitLab repository. Requires 'Administer' + permission on the project. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: almSetting + style: form + schema: + type: string + required: true + description: ALM setting key + allowReserved: false + - in: query + name: project + style: form + schema: + type: string + required: true + description: SonarQube project key + allowReserved: false + - in: query + name: repository + style: form + schema: + type: string + required: true + description: GitLab project ID + allowReserved: false + - in: query + name: monorepo + style: form + schema: + type: boolean + required: false + description: Whether the project is part of a monorepo + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/set_azure_binding: + post: + tags: + - alm_settings + summary: Bind project to Azure DevOps repository + operationId: setAzureBinding + description: >- + Binds a SonarQube project to an Azure DevOps repository. Requires + 'Administer' permission on the project. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: almSetting + style: form + schema: + type: string + required: true + description: ALM setting key + allowReserved: false + - in: query + name: project + style: form + schema: + type: string + required: true + description: SonarQube project key + allowReserved: false + - in: query + name: projectName + style: form + schema: + type: string + required: true + description: Azure DevOps project name + allowReserved: false + - in: query + name: repositoryName + style: form + schema: + type: string + required: true + description: Azure DevOps repository name + allowReserved: false + - in: query + name: monorepo + style: form + schema: + type: boolean + required: false + description: Whether the project is part of a monorepo + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/set_bitbucket_binding: + post: + tags: + - alm_settings + summary: Bind project to Bitbucket Server repository + operationId: setBitbucketBinding + description: >- + Binds a SonarQube project to a Bitbucket Server repository. Requires + 'Administer' permission on the project. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: almSetting + style: form + schema: + type: string + required: true + description: ALM setting key + allowReserved: false + - in: query + name: project + style: form + schema: + type: string + required: true + description: SonarQube project key + allowReserved: false + - in: query + name: repository + style: form + schema: + type: string + required: true + description: Bitbucket repository slug + allowReserved: false + - in: query + name: slug + style: form + schema: + type: string + required: true + description: Bitbucket project key + allowReserved: false + - in: query + name: monorepo + style: form + schema: + type: boolean + required: false + description: Whether the project is part of a monorepo + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/set_bitbucketcloud_binding: + post: + tags: + - alm_settings + summary: Bind project to Bitbucket Cloud repository + operationId: setBitbucketcloudBinding + description: >- + Binds a SonarQube project to a Bitbucket Cloud repository. Requires + 'Administer' permission on the project. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: almSetting + style: form + schema: + type: string + required: true + description: ALM setting key + allowReserved: false + - in: query + name: project + style: form + schema: + type: string + required: true + description: SonarQube project key + allowReserved: false + - in: query + name: repository + style: form + schema: + type: string + required: true + description: Bitbucket Cloud repository slug + allowReserved: false + - in: query + name: monorepo + style: form + schema: + type: boolean + required: false + description: Whether the project is part of a monorepo + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/delete: + post: + tags: + - alm_settings + summary: Delete ALM setting + operationId: deleteAlmSetting + description: >- + Deletes a DevOps Platform setting from SonarQube. Requires 'Administer + System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: ALM setting key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/get_binding: + get: + tags: + - alm_settings + summary: Get project binding + operationId: getAlmBinding + description: >- + Gets the DevOps Platform binding for a project. Requires 'Browse' + permission on the project. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: project + style: form + schema: + type: string + required: true + description: Project key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + description: Not found - The requested project or binding does not exist + /alm_settings/delete_binding: + post: + tags: + - alm_settings + summary: Delete project binding + operationId: deleteAlmBinding + description: >- + Removes the DevOps Platform binding from a project. Requires + 'Administer' permission on the project. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: project + style: form + schema: + type: string + required: true + description: Project key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/validate_binding: + get: + tags: + - alm_settings + summary: Validate project binding + operationId: validateAlmBinding + description: >- + Validates the DevOps Platform binding for a project. Requires 'Browse' + permission on the project. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: project + style: form + schema: + type: string + required: true + description: Project key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/update_github: + post: + tags: + - alm_settings + summary: Update GitHub ALM setting + operationId: updateGithubAlmSetting + description: >- + Updates an existing GitHub integration configuration. Requires + 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: ALM setting key to update + allowReserved: false + - in: query + name: newKey + style: form + schema: + type: string + required: false + description: New key for the GitHub ALM setting + allowReserved: false + - in: query + name: appId + style: form + schema: + type: string + required: true + description: GitHub App ID + allowReserved: false + - in: query + name: clientId + style: form + schema: + type: string + required: true + description: GitHub OAuth client ID + allowReserved: false + - in: query + name: clientSecret + style: form + schema: + type: string + required: false + description: GitHub OAuth client secret + allowReserved: false + - in: query + name: privateKey + style: form + schema: + type: string + required: false + description: GitHub App private key + allowReserved: false + - in: query + name: url + style: form + schema: + type: string + required: true + description: GitHub API URL + allowReserved: false + - in: query + name: webhookSecret + style: form + schema: + type: string + required: false + description: GitHub webhook secret + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/update_gitlab: + post: + tags: + - alm_settings + summary: Update GitLab ALM setting + operationId: updateGitlabAlmSetting + description: >- + Updates an existing GitLab integration configuration. Requires + 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: ALM setting key to update + allowReserved: false + - in: query + name: newKey + style: form + schema: + type: string + required: false + description: New key for the GitLab ALM setting + allowReserved: false + - in: query + name: personalAccessToken + style: form + schema: + type: string + required: false + description: GitLab personal access token + allowReserved: false + - in: query + name: url + style: form + schema: + type: string + required: true + description: GitLab API URL + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/update_azure: + post: + tags: + - alm_settings + summary: Update Azure DevOps ALM setting + operationId: updateAzureAlmSetting + description: >- + Updates an existing Azure DevOps integration configuration. Requires + 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: ALM setting key to update + allowReserved: false + - in: query + name: newKey + style: form + schema: + type: string + required: false + description: New key for the Azure ALM setting + allowReserved: false + - in: query + name: personalAccessToken + style: form + schema: + type: string + required: false + description: Azure personal access token + allowReserved: false + - in: query + name: url + style: form + schema: + type: string + required: true + description: Azure DevOps URL + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/update_bitbucket: + post: + tags: + - alm_settings + summary: Update Bitbucket Server ALM setting + operationId: updateBitbucketAlmSetting + description: >- + Updates an existing Bitbucket Server integration configuration. Requires + 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: ALM setting key to update + allowReserved: false + - in: query + name: newKey + style: form + schema: + type: string + required: false + description: New key for the Bitbucket ALM setting + allowReserved: false + - in: query + name: personalAccessToken + style: form + schema: + type: string + required: false + description: Bitbucket Server personal access token + allowReserved: false + - in: query + name: url + style: form + schema: + type: string + required: true + description: Bitbucket Server URL + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /alm_settings/update_bitbucketcloud: + post: + tags: + - alm_settings + summary: Update Bitbucket Cloud ALM setting + operationId: updateBitbucketcloudAlmSetting + description: >- + Updates an existing Bitbucket Cloud integration configuration. Requires + 'Administer System' permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: ALM setting key to update + allowReserved: false + - in: query + name: newKey + style: form + schema: + type: string + required: false + description: New key for the Bitbucket Cloud ALM setting + allowReserved: false + - in: query + name: clientId + style: form + schema: + type: string + required: true + description: Bitbucket Cloud OAuth client ID + allowReserved: false + - in: query + name: clientSecret + style: form + schema: + type: string + required: false + description: Bitbucket Cloud OAuth client secret + allowReserved: false + - in: query + name: workspace + style: form + schema: + type: string + required: true + description: Bitbucket Cloud workspace ID + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /applications/create: + post: + tags: + - applications + summary: Create application + operationId: createApplication + description: >- + Creates a new application in SonarQube. Requires 'Create Applications' + permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: key + style: form + schema: + type: string + required: true + description: Application key + allowReserved: false + - in: query + name: name + style: form + schema: + type: string + required: true + description: Application name + allowReserved: false + - in: query + name: description + style: form + schema: + type: string + required: false + description: Application description + allowReserved: false + - in: query + name: visibility + style: form + schema: + type: string + enum: + - public + - private + required: false + description: Application visibility + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /applications/show: + get: + tags: + - applications + summary: Show application details + operationId: showApplication + description: >- + Returns details about a specific application. Requires 'Browse' + permission on the application. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: application + style: form + schema: + type: string + required: true + description: Application key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + description: Not found - The requested application does not exist + /applications/update: + post: + tags: + - applications + summary: Update application + operationId: updateApplication + description: >- + Updates an application's name and/or description. Requires 'Administer' + permission on the application. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: application + style: form + schema: + type: string + required: true + description: Application key + allowReserved: false + - in: query + name: name + style: form + schema: + type: string + required: false + description: New application name + allowReserved: false + - in: query + name: description + style: form + schema: + type: string + required: false + description: New application description + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /applications/add_project: + post: + tags: + - applications + summary: Add project to application + operationId: addProjectToApplication + description: >- + Adds a project to an application. Requires 'Administer' permission on + the application. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: application + style: form + schema: + type: string + required: true + description: Application key + allowReserved: false + - in: query + name: project + style: form + schema: + type: string + required: true + description: Project key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /applications/remove_project: + post: + tags: + - applications + summary: Remove project from application + operationId: removeProjectFromApplication + description: >- + Removes a project from an application. Requires 'Administer' permission + on the application. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: application + style: form + schema: + type: string + required: true + description: Application key + allowReserved: false + - in: query + name: project + style: form + schema: + type: string + required: true + description: Project key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /applications/set_tags: + post: + tags: + - applications + summary: Set application tags + operationId: setApplicationTags + description: >- + Sets tags for an application. Requires 'Administer' permission on the + application. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: application + style: form + schema: + type: string + required: true + description: Application key + allowReserved: false + - in: query + name: tags + style: form + schema: + type: string + required: true + description: Comma-separated list of tags + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /applications/search: + get: + tags: + - applications + summary: Search applications + operationId: searchApplications + description: >- + Search for applications based on various criteria. Requires 'Browse' + permission. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - $ref: '#/components/parameters/p' + - $ref: '#/components/parameters/ps' + - in: query + name: q + style: form + schema: + type: string + required: false + description: >- + Limit search to application names or keys containing the supplied + string + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + /applications/refresh: + post: + tags: + - applications + summary: Refresh application + operationId: refreshApplication + description: >- + Triggers a recalculation of the application's data. Requires + 'Administer' permission on the application. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: application + style: form + schema: + type: string + required: true + description: Application key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + /applications/delete: + post: + tags: + - applications + summary: Delete application + operationId: deleteApplication + description: >- + Deletes an application from SonarQube. Requires 'Administer' permission + on the application. + security: + - basicAuth: [] + - tokenAuth: [] + parameters: + - in: query + name: application + style: form + schema: + type: string + required: true + description: Application key + allowReserved: false + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + description: Not found - The requested application does not exist +components: + schemas: + UserCreateRestRequest: + type: object + properties: + email: + type: string + format: email + description: User email + maxLength: 100 + minLength: 1 + local: + type: boolean + default: true + description: >- + Specify if the user should be authenticated from SonarQube server or + from an external authentication system. Password should not be set + when local is set to false. + login: + type: string + description: User login + maxLength: 100 + minLength: 2 + name: + type: string + description: User name + maxLength: 200 + minLength: 0 + password: + type: string + description: >- + User password. Only mandatory when creating local user, otherwise it + should not be set + writeOnly: true + scmAccounts: + type: array + description: List of SCM accounts. + items: + type: string + required: + - login + - name + UserRestResponseForAdmins: + type: object + properties: + id: + type: string + readOnly: true + login: + type: string + name: + type: string + email: + type: string + active: + type: boolean + readOnly: true + local: + type: boolean + readOnly: true + managed: + type: boolean + readOnly: true + externalLogin: + type: string + externalProvider: + type: string + externalId: + type: string + avatar: + type: string + sonarQubeLastConnectionDate: + type: string + readOnly: true + sonarLintLastConnectionDate: + type: string + readOnly: true + scmAccounts: + type: array + items: + type: string + EmailConfigurationCreateRestRequest: + type: object + properties: + host: + type: string + description: URL of your SMTP server + minLength: 1 + port: + type: string + description: 'Port of your SMTP server (usually 25, 587 or 465)' + minLength: 1 + securityProtocol: + type: string + description: >- + Security protocol used to connect to your SMTP server (SSLTLS is + recommended) + enum: + - NONE + - SSLTLS + - STARTTLS + fromAddress: + type: string + description: Address emails will come from + minLength: 1 + fromName: + type: string + description: Name emails will come from (usually "SonarQube") + minLength: 1 + subjectPrefix: + type: string + description: >- + Prefix added to email so they can be easily recognized (usually + "[SonarQube]") + minLength: 1 + authMethod: + type: string + description: >- + Authentication method used to connect to the SMTP server. OAuth is + only supported for Microsoft Exchange + enum: + - BASIC + - OAUTH + username: + type: string + description: >- + For Basic and OAuth authentication: username used to authenticate to + the SMTP server + minLength: 1 + basicPassword: + type: string + description: >- + For basic authentication: password used to authenticate to the SMTP + server + writeOnly: true + oauthAuthenticationHost: + type: string + description: >- + For OAuth authentication: host of the Identity Provider issuing + access tokens + oauthClientId: + type: string + description: >- + For OAuth authentication: Client ID provided by Microsoft Exchange + when registering the application + writeOnly: true + oauthClientSecret: + type: string + description: >- + For OAuth authentication: Client secret provided by Microsoft + Exchange when registering the application + writeOnly: true + oauthTenant: + type: string + description: 'For OAuth authentication: Microsoft tenant' + required: + - authMethod + - fromAddress + - fromName + - host + - port + - securityProtocol + - subjectPrefix + - username + EmailConfigurationResource: + type: object + properties: + id: + type: string + readOnly: true + host: + type: string + description: URL of your SMTP server + port: + type: string + description: 'Port of your SMTP server (usually 25, 587 or 465)' + securityProtocol: + type: string + description: >- + Security protocol used to connect to your SMTP server (SSLTLS is + recommended) + enum: + - NONE + - SSLTLS + - STARTTLS + fromAddress: + type: string + description: Address emails will come from + fromName: + type: string + description: Name emails will come from (usually "SonarQube") + subjectPrefix: + type: string + description: >- + Prefix added to email so they can be easily recognized (usually + "[SonarQube]") + authMethod: + type: string + description: >- + Authentication method used to connect to the SMTP server. OAuth is + only supported for Microsoft Exchange + enum: + - BASIC + - OAUTH + username: + type: string + description: >- + For Basic and OAuth authentication: username used to authenticate to + the SMTP server + isBasicPasswordSet: + type: boolean + description: 'For Basic authentication: has the password field been set?' + oauthAuthenticationHost: + type: string + description: >- + For OAuth authentication: host of the Identity Provider issuing + access tokens + isOauthClientIdSet: + type: boolean + description: 'For OAuth authentication: has the Client ID field been set?' + isOauthClientSecretSet: + type: boolean + description: 'For OAuth authentication: has the Client secret field been set?' + oauthTenant: + type: string + description: 'For OAuth authentication: Microsoft tenant' + LicenseProfilesCreateRestRequest: + type: object + properties: + name: + type: string + description: The name of the license policy + default: + type: boolean + description: Whether this license policy is the default or not + required: + - name + LicenseProfileResource: + type: object + properties: + id: + type: string + name: + type: string + default: + type: boolean + actions: + $ref: '#/components/schemas/LicenseProfileSingleActions' + updatedAt: + type: string + LicenseProfileSingleActions: + type: object + properties: + edit: + type: boolean + setAsDefault: + type: boolean + associateProjects: + type: boolean + delete: + type: boolean + UpdateAssigneeRestRequest: + type: object + properties: + issueReleaseKey: + type: string + description: Issue release key + assigneeLogin: + type: string + description: Assignee login + required: + - issueReleaseKey + AffectedPackageResource: + type: object + properties: + purl: + type: string + recommendation: + type: string + description: 'The maintainer''s overall recommendation, if available' + enum: + - ignore + - upgrade + - upgrade_or_workaround + recommendationDetails: + $ref: '#/components/schemas/VulnerabilityRecommendationDetailsResource' + versionOptions: + type: array + items: + $ref: '#/components/schemas/VersionOptionResource' + affectedVersions: + type: array + items: + type: string + unaffectedVersions: + type: string + IssueReleaseBranchResource: + type: object + properties: + uuid: + type: string + key: + type: string + pullRequest: + type: boolean + projectKey: + type: string + projectName: + type: string + legacyProjectUuid: + type: string + organizationUuid: + type: string + format: uuid + IssueReleaseDetailsResource: + type: object + properties: + key: + type: string + severity: + type: string + originalSeverity: + type: string + manualSeverity: + type: string + showIncreasedSeverityWarning: + type: boolean + release: + $ref: '#/components/schemas/ReleaseSearchResource' + type: + type: string + enum: + - VULNERABILITY + - PROHIBITED_LICENSE + quality: + type: string + enum: + - MAINTAINABILITY + - RELIABILITY + - SECURITY + status: + type: string + createdAt: + type: string + assignee: + $ref: '#/components/schemas/UserResource' + commentCount: + type: integer + format: int32 + vulnerability: + $ref: '#/components/schemas/VulnerabilityResource' + spdxLicenseId: + type: string + transitions: + type: array + items: + type: string + enum: + - CONFIRM + - REOPEN + - SAFE + - FIXED + - ACCEPT + actions: + type: array + items: + type: string + enum: + - COMMENT + - ASSIGN + - SET_SEVERITY + uniqueItems: true + branch: + $ref: '#/components/schemas/IssueReleaseBranchResource' + ReleaseSearchResource: + type: object + properties: + key: + type: string + branchUuid: + type: string + packageUrl: + type: string + packageManager: + type: string + packageName: + type: string + version: + type: string + licenseExpression: + type: string + known: + type: boolean + knownPackage: + type: boolean + newlyIntroduced: + type: boolean + directSummary: + type: boolean + scopeSummary: + type: string + productionScopeSummary: + type: boolean + dependencyFilePaths: + type: array + items: + type: string + UserResource: + type: object + properties: + login: + type: string + name: + type: string + avatar: + type: string + active: + type: boolean + VersionOptionResource: + type: object + properties: + version: + type: string + description: The version being presented as an option + vulnerabilityIds: + type: array + description: Vulnerability IDs affecting this version + items: + type: string + prerelease: + type: boolean + description: Is this version a pre-release version + fixLevel: + type: string + description: Describes which vulnerabilities are fixed + enum: + - COMPLETE + - PARTIAL + - NONE + - UNKNOWN + descriptionCode: + type: string + description: How the frontend should label this version + enum: + - VERSION_IN_USE + - NEAREST_PARTIAL + - NEAREST_COMPLETE + - LATEST_PARTIAL + - LATEST_COMPLETE + - LATEST_STABLE + - LATEST_PRERELEASE + - UNKNOWN + VulnerabilityRecommendationDetailsResource: + type: object + properties: + impactScore: + type: integer + format: int32 + impactDescription: + type: string + realIssue: + type: boolean + falsePositiveReason: + type: string + includesDev: + type: boolean + specificMethodsAffected: + type: boolean + specificMethodsDescription: + type: string + otherConditions: + type: boolean + otherConditionsDescription: + type: string + workaroundAvailable: + type: boolean + workaroundDescription: + type: string + visibility: + type: string + VulnerabilityReportResource: type: object properties: - email: + id: type: string - description: User email - maxLength: 100 - minLength: 1 - local: - type: boolean - default: 'true' - description: >- - Specify if the user should be authenticated from SonarQube server or - from an external authentication system. Password should not be set - when local is set to false. - login: + url: type: string - description: User login - maxLength: 100 - minLength: 2 - name: + type: type: string - description: User name - maxLength: 200 - minLength: 0 - password: + cvssScore: type: string - description: >- - User password. Only mandatory when creating local user, otherwise it - should not be set - writeOnly: true - scmAccounts: + cvssSeverity: + type: string + withdrawnAt: + type: string + VulnerabilityResource: + type: object + properties: + vulnerabilityId: + type: string + reports: + type: array + items: + $ref: '#/components/schemas/VulnerabilityReportResource' + description: + type: string + epssPercentile: + type: string + epssProbability: + type: string + knownExploited: + type: boolean + cweIds: type: array - description: List of SCM accounts. items: type: string + publishedOn: + type: string + affectedPackages: + type: array + items: + $ref: '#/components/schemas/AffectedPackageResource' + withdrawn: + type: boolean + IssueReleaseSetSeverityRestRequest: + type: object + properties: + issueReleaseKey: + type: string + description: Issue release key + quality: + type: string + description: Software Quality + enum: + - MAINTAINABILITY + - RELIABILITY + - SECURITY + severity: + type: string + description: Severity + enum: + - INFO + - LOW + - MEDIUM + - HIGH + - BLOCKER required: - - login - - name - UserRestResponseForAdmins: + - issueReleaseKey + - quality + - severity + IssueReleaseClearSeverityWarningRestRequest: type: object properties: - id: + issueReleaseKey: type: string - readOnly: true - login: + description: Issue release key + required: + - issueReleaseKey + IssueReleaseStatusTransitionRequest: + type: object + properties: + issueReleaseKey: type: string - name: + description: Issue release key + transitionKey: type: string - email: + description: Transition key + enum: + - CONFIRM + - REOPEN + - SAFE + - FIXED + - ACCEPT + comment: + type: string + description: Transition comment + required: + - issueReleaseKey + - transitionKey + IssueReleaseAddCommentRestRequest: + type: object + properties: + issueReleaseKey: type: string - active: - type: boolean - readOnly: true - local: - type: boolean - readOnly: true - managed: + description: Issue release key + comment: + type: string + description: comment + required: + - issueReleaseKey + AzureBillingRestResponse: + type: object + properties: + success: type: boolean - readOnly: true - externalLogin: + message: type: string - externalProvider: + PostJiraWorkItemRequestResource: + type: object + properties: + resourceId: type: string - externalId: + description: Resource identifier + minLength: 1 + writeOnly: true + resourceType: type: string - avatar: + description: Resource type + enum: + - SONAR_ISSUE + - DEPENDENCY_RISK + writeOnly: true + sonarProjectId: type: string - sonarQubeLastConnectionDate: + description: Sonar project identifier + minLength: 1 + writeOnly: true + workTypeId: + type: string + description: Work type identifier + minLength: 1 + writeOnly: true + summary: + type: string + description: Work item summary + minLength: 1 + writeOnly: true + description: + type: string + description: Work item description + minLength: 1 + writeOnly: true + required: + - description + - resourceId + - resourceType + - sonarProjectId + - summary + - workTypeId + JiraWorkItemResource: + type: object + properties: + id: type: string + description: Work item identifier readOnly: true - sonarLintLastConnectionDate: + jiraIssueId: type: string + description: Jira issue identifier readOnly: true - scmAccounts: - type: array - items: - type: string - EmailConfigurationCreateRestRequest: + jiraIssueKey: + type: string + description: Jira issue key + readOnly: true + jiraIssueUrl: + type: string + description: Jira issue URL + readOnly: true + jiraIssueStatus: + type: string + description: Jira issue status + readOnly: true + PostJiraProjectBindingRequestResource: type: object properties: - host: + sonarProjectId: type: string - description: URL of your SMTP server - port: + description: Sonar project identifier + minLength: 1 + writeOnly: true + jiraOrganizationId: type: string - description: 'Port of your SMTP server (usually 25, 587 or 465)' - securityProtocol: + description: Jira instance binding identifier + writeOnly: true + jiraProjectKey: type: string - description: >- - Security protocol used to connect to your SMTP server (SSLTLS is - recommended) - enum: - - NONE - - SSLTLS - - STARTTLS - fromAddress: + description: Jira project key + minLength: 1 + writeOnly: true + required: + - jiraOrganizationId + - jiraProjectKey + - sonarProjectId + JiraProjectBindingResource: + type: object + properties: + id: type: string - description: Address emails will come from - fromName: + format: uuid + description: Jira project binding identifier + readOnly: true + sonarProjectId: type: string - description: Name emails will come from (usually "SonarQube") - subjectPrefix: + description: Sonar project identifier + readOnly: true + jiraOrganizationId: type: string - description: >- - Prefix added to email so they can be easily recognized (usually - "[SonarQube]") - authMethod: + description: Jira instance binding identifier + readOnly: true + jiraProjectKey: type: string - description: >- - Authentication method used to connect to the SMTP server. OAuth is - only supported for Microsoft Exchange - enum: - - BASIC - - OAUTH - username: + description: Jira project key + readOnly: true + PostJiraOrganizationBindingRequestResource: + type: object + properties: + state: type: string - description: >- - For Basic and OAuth authentication: username used to authenticate to - the SMTP server - basicPassword: + description: Base64-encoded OAuth state parameter + minLength: 1 + writeOnly: true + authorizationCode: type: string - description: >- - For basic authentication: password used to authenticate to the SMTP - server + description: OAuth authorization code (no whitespace) + minLength: 1 writeOnly: true - oauthAuthenticationHost: + required: + - authorizationCode + - state + JiraOrganizationBindingResource: + type: object + properties: + id: type: string - description: >- - For OAuth authentication: host of the Identity Provider issuing - access tokens - oauthClientId: + description: Jira instance binding identifier + readOnly: true + sonarOrganizationUuid: type: string - description: >- - For OAuth authentication: Client ID provided by Microsoft Exchange - when registering the application - writeOnly: true - oauthClientSecret: + format: uuid + description: Sonar organization UUID + readOnly: true + jiraInstanceUrl: + type: string + description: Jira instance URL + readOnly: true + createdBy: + type: string + description: User who created or reauthorized the jira connection + readOnly: true + createdAt: + type: integer + format: int64 + description: Creation timestamp + readOnly: true + isTokenShared: + type: boolean + description: TODO + readOnly: true + OAuthResource: + type: object + properties: + cloudId: + type: string + description: The resource's cloud ID + readOnly: true + url: + type: string + description: The resource's URL + readOnly: true + PostJiraOrganizationBindingResponseResource: + type: object + properties: + binding: + $ref: '#/components/schemas/JiraOrganizationBindingResource' + description: The successfully created binding (present if binding was created) + readOnly: true + resources: + type: array + description: Array of available resources to bind the instance to + items: + $ref: '#/components/schemas/OAuthResource' + readOnly: true + required: + - resources + UserBindingCreationRequest: + type: object + description: User binding creation request + properties: + bindingData: + $ref: '#/components/schemas/UserBindingCreationRequestBindingData' + userId: type: string - description: >- - For OAuth authentication: Client secret provided by Microsoft - Exchange when registering the application - writeOnly: true - oauthTenant: + minLength: 1 + required: + - bindingData + - userId + UserBindingCreationRequestBindingData: + type: object + properties: + code: type: string - description: 'For OAuth authentication: Microsoft tenant' + minLength: 1 required: - - authMethod - - fromAddress - - fromName - - host - - port - - securityProtocol - - subjectPrefix - - username - EmailConfigurationResource: + - code + UserBindingResponse: type: object properties: id: type: string - readOnly: true - host: + format: uuid + user_id: type: string - description: URL of your SMTP server - port: + slack_user_id: type: string - description: 'Port of your SMTP server (usually 25, 587 or 465)' - securityProtocol: + slack_workspace_id: + type: string + slack_workspace_name: + type: string + created_at: + type: integer + format: int64 + IntegrationConfigurationPostRequest: + type: object + properties: + integrationType: type: string - description: >- - Security protocol used to connect to your SMTP server (SSLTLS is - recommended) enum: - - NONE - - SSLTLS - - STARTTLS - fromAddress: + - SLACK + clientId: type: string - description: Address emails will come from - fromName: + minLength: 1 + clientSecret: type: string - description: Name emails will come from (usually "SonarQube") - subjectPrefix: + minLength: 1 + signingSecret: type: string - description: >- - Prefix added to email so they can be easily recognized (usually - "[SonarQube]") - authMethod: + minLength: 1 + required: + - clientId + - clientSecret + - integrationType + - signingSecret + IntegrationConfigurationResponse: + type: object + properties: + id: type: string - description: >- - Authentication method used to connect to the SMTP server. OAuth is - only supported for Microsoft Exchange - enum: - - BASIC - - OAUTH - username: + format: uuid + integrationType: type: string - description: >- - For Basic and OAuth authentication: username used to authenticate to - the SMTP server - isBasicPasswordSet: - type: boolean - description: 'For Basic authentication: has the password field been set?' - oauthAuthenticationHost: + enum: + - SLACK + clientId: type: string - description: >- - For OAuth authentication: host of the Identity Provider issuing - access tokens - isOauthClientIdSet: - type: boolean - description: 'For OAuth authentication: has the Client ID field been set?' - isOauthClientSecretSet: - type: boolean - description: 'For OAuth authentication: has the Client secret field been set?' - oauthTenant: + appId: type: string - description: 'For OAuth authentication: Microsoft tenant' AwarenessBannerClickedRequest: type: object properties: @@ -5038,11 +7599,35 @@ components: FixSuggestionPostRequest: type: object properties: + projectKey: + type: string issueId: type: string description: Issue key + issue: + $ref: '#/components/schemas/Issue' + description: Issue + Issue: + type: object + properties: + message: + type: string + startLine: + type: integer + format: int32 + endLine: + type: integer + format: int32 + ruleKey: + type: string + sourceCode: + type: string required: - - issueId + - endLine + - message + - ruleKey + - sourceCode + - startLine ChangeDto: type: object properties: @@ -5068,6 +7653,27 @@ components: type: array items: $ref: '#/components/schemas/ChangeDto' + LicenseRestRequest: + type: object + properties: + licenseKey: + type: string + description: New license key + LicenseUploadActivationRequest: + type: object + properties: + license: + type: string + description: Contents of a valid .lic file + licenseKey: + type: string + description: License key for the license + LegacyLicenseRestRequest: + type: object + properties: + licenseKey: + type: string + description: New license key GitlabSynchronizationRunResource: type: object properties: @@ -5134,14 +7740,17 @@ components: applicationId: type: string description: Gitlab Application id + minLength: 1 url: type: string description: >- Url of Gitlab instance for authentication (for instance https://gitlab.com) + minLength: 1 secret: type: string description: Secret of the application + minLength: 1 writeOnly: true synchronizeGroups: type: boolean @@ -5218,16 +7827,19 @@ components: clientId: type: string description: Client ID provided by GitHub when registering the application. + minLength: 1 writeOnly: true clientSecret: type: string description: Client password provided by GitHub when registering the application. + minLength: 1 writeOnly: true applicationId: type: string description: >- The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps. + minLength: 1 privateKey: type: string description: > @@ -5235,6 +7847,7 @@ components: your GitHub App's page under Private keys. Copy and paste the whole contents of the file here. + minLength: 1 writeOnly: true synchronizeGroups: type: boolean @@ -5250,12 +7863,14 @@ components: The API url for a GitHub instance. https://api.github.com/ for Github.com, https://github.company.com/api/v3/ when using Github Enterprise + minLength: 1 webUrl: type: string description: > The WEB url for a GitHub instance. https://github.com/ for Github.com, https://github.company.com/ when using GitHub Enterprise. + minLength: 1 allowedOrganizations: type: array items: @@ -5342,14 +7957,17 @@ components: projectKey: type: string description: Key of the project to create + minLength: 1 projectName: type: string description: Name of the project to create + minLength: 1 devOpsPlatformSettingId: type: string description: >- Identifier of DevOps platform configuration to use. Use /dop-translation/dop-settings to retrieve the settings and their ID + minLength: 1 repositoryIdentifier: type: string description: | @@ -5357,6 +7975,7 @@ components: - repository slug for GitHub and Bitbucket (Cloud and Server) - repository id for GitLab - repository name for Azure DevOps + minLength: 1 projectIdentifier: type: string description: > @@ -5686,6 +8305,24 @@ components: userId: type: string readOnly: true + AtlassianAuthenticationDetailsResource: + type: object + properties: + clientId: + type: string + description: Atlassian 3LO App Client ID + writeOnly: true + secret: + type: string + description: Atlassian 3LO App Secret + writeOnly: true + AtlassianAuthenticationDetailsResultResource: + type: object + properties: + clientId: + type: string + description: Atlassian 3LO App Client ID + readOnly: true UpdateFieldListString: type: object properties: @@ -5695,19 +8332,14 @@ components: type: string defined: type: boolean - UpdateFieldString: - type: object - properties: - value: - type: string - defined: - type: boolean UserUpdateRestRequest: type: object properties: login: - $ref: '#/components/schemas/UpdateFieldString' + type: string description: User login + maxLength: 100 + minLength: 2 name: type: string description: User first name and last name @@ -5715,11 +8347,14 @@ components: minLength: 0 email: type: string + format: email description: Email maxLength: 100 minLength: 1 scmAccounts: $ref: '#/components/schemas/UpdateFieldListString' + items: + type: string externalProvider: type: string description: > @@ -5788,38 +8423,308 @@ components: the SMTP server basicPassword: type: string - description: >- - For basic authentication: password used to authenticate to the SMTP - server - oauthAuthenticationHost: + description: >- + For basic authentication: password used to authenticate to the SMTP + server + oauthAuthenticationHost: + type: string + description: >- + For OAuth authentication: host of the Identity Provider issuing + access tokens + oauthClientId: + type: string + description: >- + For OAuth authentication: Client ID provided by Microsoft Exchange + when registering the application + oauthClientSecret: + type: string + description: >- + For OAuth authentication: Client password provided by Microsoft + Exchange when registering the application + oauthTenant: + type: string + description: 'For OAuth authentication: Microsoft tenant' + LicenseProfilesUpdateRestRequest: + type: object + properties: + name: + type: string + description: The name of the license policy + default: + type: boolean + description: Whether this license policy is the default or not + LicensePolicyLicenseUpdateRestRequest: + type: object + properties: + policy: + type: string + description: The new status of this license. + enum: + - DENY + - ALLOW + required: + - policy + LicensePolicyLicenseResource: + type: object + properties: + id: + type: string + spdxLicenseId: + type: string + name: + type: string + category: + type: string + enum: + - UNKNOWN + - COPYLEFT_WEAK + - COPYLEFT_STRONG + - COPYLEFT_NETWORK + - COPYLEFT_MAXIMAL + - PERMISSIVE_STANDARD + - PERMISSIVE_AMATEUR + policy: + type: string + description: The policy status of this license. + enum: + - DENY + - ALLOW + LicenseProfileCategoryUpdateRestRequest: + type: object + properties: + policy: + type: string + description: The new status of this category. + enum: + - DENY + - ALLOW + required: + - policy + LicenseProfileCategoryResource: + type: object + properties: + id: + type: string + key: + type: string + enum: + - UNKNOWN + - COPYLEFT_WEAK + - COPYLEFT_STRONG + - COPYLEFT_NETWORK + - COPYLEFT_MAXIMAL + - PERMISSIVE_STANDARD + - PERMISSIVE_AMATEUR + policy: + type: string + description: The policy status of this category. + enum: + - DENY + - ALLOW + AssignedProjectsUpdateRestRequest: + type: object + properties: + licenseProfileUuid: + type: string + description: >- + The id of the license profile that should be used when analyzing the + project for license issues. + projectKey: + type: string + description: >- + The key of the project that should be assigned to the license + profile. + required: + - licenseProfileUuid + - projectKey + IssueReleaseUpdateCommentRestRequest: + type: object + properties: + issueReleaseChangeKey: + type: string + description: Issue release change key + comment: + type: string + description: Comment text + required: + - comment + - issueReleaseChangeKey + FeatureEnablementRequest: + type: object + properties: + enablement: + type: boolean + description: Whether SCA is enabled or not + FeatureEnablementResource: + type: object + properties: + enablement: + type: boolean + JiraWorkTypesSelectionResource: + type: object + properties: + sonarProjectId: + type: string + description: The Sonar project ID + writeOnly: true + selectedWorkTypes: + type: array + description: An array with the selected work type ids + items: + type: string + writeOnly: true + PatchJiraProjectBindingRequestResource: + type: object + properties: + sonarProjectId: + type: string + description: Sonar project identifier + minLength: 1 + writeOnly: true + jiraProjectKey: + type: string + description: Jira project key + minLength: 1 + writeOnly: true + required: + - jiraProjectKey + - sonarProjectId + PatchJiraOrganizationBindingRequestResource: + type: object + properties: + sonarOrganizationUuid: + type: string + format: uuid + description: Sonar organization UUID + writeOnly: true + jiraCloudId: type: string - description: >- - For OAuth authentication: host of the Identity Provider issuing - access tokens - oauthClientId: + description: Jira cloud ID to bind with the organization + minLength: 1 + writeOnly: true + jiraInstanceUrl: type: string - description: >- - For OAuth authentication: Client ID provided by Microsoft Exchange - when registering the application - oauthClientSecret: + description: Jira instance URL + minLength: 1 + writeOnly: true + required: + - jiraCloudId + - jiraInstanceUrl + - sonarOrganizationUuid + PatchJiraOrganizationBindingEditResource: + type: object + properties: + sonarOrganizationUuid: type: string - description: >- - For OAuth authentication: Client password provided by Microsoft - Exchange when registering the application - oauthTenant: + format: uuid + description: Sonar organization UUID + writeOnly: true + isTokenShared: + type: boolean + description: TODO + writeOnly: true + required: + - isTokenShared + - sonarOrganizationUuid + RuleTypeMapping: + type: object + properties: + type: type: string - description: 'For OAuth authentication: Microsoft tenant' - FeatureEnablementRequest: + description: Rule type + enum: + - CODE_SMELL + - BUG + - VULNERABILITY + - SECURITY_HOTSPOT + severities: + type: array + description: List of severities + items: + type: string + enum: + - BLOCKER + - CRITICAL + - MAJOR + - MINOR + - INFO + required: + - severities + - type + SandboxSettingsResource: type: object properties: - enablement: + enabled: type: boolean - description: Whether SCA is enabled or not - FeatureEnablementResource: + description: Whether sandbox is enabled globally + defaultValue: + type: boolean + description: Default value for projects + allowOverride: + type: boolean + description: Allow projects to override settings + softwareQualities: + type: array + description: Software quality mappings (MQR mode) + items: + $ref: '#/components/schemas/SoftwareQualityMapping' + types: + type: array + description: Rule type mappings (Standard Experience mode) + items: + $ref: '#/components/schemas/RuleTypeMapping' + SoftwareQualityMapping: type: object properties: - enablement: + softwareQuality: + type: string + description: Software quality + enum: + - MAINTAINABILITY + - RELIABILITY + - SECURITY + impactSeverities: + type: array + description: List of impact severities + items: + type: string + enum: + - INFO + - LOW + - MEDIUM + - HIGH + - BLOCKER + required: + - impactSeverities + - softwareQuality + SandboxSettingsProjectResource: + type: object + properties: + enabled: + type: boolean + description: Whether sandbox is enabled for this project + softwareQualities: + type: array + description: Software quality mappings (MQR mode) + items: + $ref: '#/components/schemas/SoftwareQualityMapping' + types: + type: array + description: Rule type mappings (Standard Experience mode) + items: + $ref: '#/components/schemas/RuleTypeMapping' + overridden: type: boolean + description: Whether project settings override instance settings + IntegrationConfigurationPatchRequest: + type: object + properties: + clientId: + type: string + clientSecret: + type: string + signingSecret: + type: string DevOpsPermissionMappingUpdateRequest: type: object properties: @@ -5863,6 +8768,8 @@ components: description: Set whether to synchronize groups allowedGroups: $ref: '#/components/schemas/UpdateFieldListString' + items: + type: string provisioningType: type: string description: Type of synchronization @@ -5910,6 +8817,8 @@ components: https://github.com) allowedOrganizations: $ref: '#/components/schemas/UpdateFieldListString' + items: + type: string provisioningType: type: string description: Type of synchronization @@ -6012,33 +8921,144 @@ components: $ref: '#/components/schemas/EmailConfigurationResource' page: $ref: '#/components/schemas/PageRestResponse' - ReleaseSearchResource: + Category: type: object properties: + activeRules: + type: integer + format: int32 + issues: + type: integer + format: int32 key: type: string - packageUrl: - type: string - packageManager: - type: string - packageName: + GetAccessibilityReportResponse: + type: object + properties: + categories: + type: array + items: + $ref: '#/components/schemas/Category' + SelfTestHttpCallResource: + type: object + properties: + attemptedUrl: type: string - version: + attemptedMethod: type: string - licenseExpression: + responseCode: + type: integer + format: int32 + responseBody: type: string - known: + responseBodyAppearsValid: type: boolean - newInPullRequest: + responseHeaders: + type: array + items: + type: array + items: + type: string + SelfTestResponse: + type: object + properties: + featureEnabled: type: boolean - directSummary: + selfTestPassed: type: boolean - scopeSummary: + cliVersionCheck: + $ref: '#/components/schemas/SelfTestHttpCallResource' + vulnerabilityDetailsCheck: + $ref: '#/components/schemas/SelfTestHttpCallResource' + SelfTestSpringConfigurationResponse: + type: object + properties: + springVersion: type: string - dependencyFilePaths: + RiskReportItem: + type: object + properties: + projectKey: + type: string + projectName: + type: string + branchKey: + type: string + riskTitle: + type: string + riskType: + type: string + enum: + - VULNERABILITY + - PROHIBITED_LICENSE + riskSeverity: + type: string + enum: + - INFO + - LOW + - MEDIUM + - HIGH + - BLOCKER + riskStatus: + type: string + enum: + - OPEN + - ACCEPT + - CONFIRM + - SAFE + - FIXED + statusChanges: + type: array + items: + $ref: '#/components/schemas/StatusChange' + vulnerabilityId: + type: string + cvssScore: + type: number + cweIds: type: array items: type: string + publishedOn: + type: string + createdAt: + type: string + packageUrl: + type: string + riskUrl: + type: string + dependencyChains: + type: array + items: + type: array + items: + type: string + scope: + type: string + productionScope: + type: boolean + StatusChange: + type: object + properties: + comment: + type: string + newStatus: + type: string + createdAt: + type: string + BranchResource: + type: object + properties: + uuid: + type: string + key: + type: string + pullRequest: + type: boolean + projectKey: + type: string + projectName: + type: string ReleasesSearchRestResponse: type: object properties: @@ -6050,6 +9070,13 @@ components: type: array items: $ref: '#/components/schemas/ScaReleaseByPackageManagerCountDto' + branches: + type: array + items: + $ref: '#/components/schemas/BranchResource' + countWithoutFilters: + type: integer + format: int32 page: $ref: '#/components/schemas/PageRestResponse' ScaReleaseByPackageManagerCountDto: @@ -6081,7 +9108,7 @@ components: type: array items: type: string - newInPullRequest: + newlyIntroduced: type: boolean IssueResource: type: object @@ -6090,10 +9117,23 @@ components: type: string severity: type: string + showIncreasedSeverityWarning: + type: boolean type: type: string + enum: + - VULNERABILITY + - PROHIBITED_LICENSE + quality: + type: string + enum: + - MAINTAINABILITY + - RELIABILITY + - SECURITY createdAt: type: string + assignee: + $ref: '#/components/schemas/UserResource' vulnerabilityId: type: string cweIds: @@ -6109,6 +9149,8 @@ components: properties: key: type: string + branchUuid: + type: string packageUrl: type: string packageManager: @@ -6121,7 +9163,9 @@ components: type: string known: type: boolean - newInPullRequest: + knownPackage: + type: boolean + newlyIntroduced: type: boolean directSummary: type: boolean @@ -6137,187 +9181,316 @@ components: type: array items: $ref: '#/components/schemas/IssueResource' - DependencyRiskResource: + branch: + $ref: '#/components/schemas/BranchResource' + LicenseProfileCollectionActions: + type: object + properties: + create: + type: boolean + LicenseProfileIndexRestResponse: + type: object + properties: + licenseProfiles: + type: array + items: + $ref: '#/components/schemas/LicenseProfileResource' + actions: + $ref: '#/components/schemas/LicenseProfileCollectionActions' + LicenseProfileDetailsResource: + type: object + properties: + profile: + $ref: '#/components/schemas/LicenseProfileResource' + categories: + type: array + items: + $ref: '#/components/schemas/LicenseProfileCategoryResource' + licenses: + type: array + items: + $ref: '#/components/schemas/LicensePolicyLicenseResource' + AssignableProjectResource: + type: object + properties: + projectKey: + type: string + projectName: + type: string + assignedToLicenseProfile: + type: boolean + AssignableProjectsIndexRestResponse: + type: object + properties: + assignableProjects: + type: array + items: + $ref: '#/components/schemas/AssignableProjectResource' + page: + $ref: '#/components/schemas/PageRestResponse' + IssueReleaseResource: type: object properties: key: type: string severity: type: string + originalSeverity: + type: string + manualSeverity: + type: string + showIncreasedSeverityWarning: + type: boolean release: $ref: '#/components/schemas/ReleaseSearchResource' type: type: string + enum: + - VULNERABILITY + - PROHIBITED_LICENSE + quality: + type: string + enum: + - MAINTAINABILITY + - RELIABILITY + - SECURITY + status: + type: string createdAt: type: string + assignee: + $ref: '#/components/schemas/UserResource' + commentCount: + type: integer + format: int32 vulnerabilityId: type: string cweIds: type: array items: type: string - cvssScore: - type: string - spdxLicenseId: - type: string - DependencyRisksSearchRestResponse: + cvssScore: + type: string + withdrawn: + type: boolean + spdxLicenseId: + type: string + transitions: + type: array + items: + type: string + enum: + - CONFIRM + - REOPEN + - SAFE + - FIXED + - ACCEPT + actions: + type: array + items: + type: string + enum: + - COMMENT + - ASSIGN + - SET_SEVERITY + uniqueItems: true + IssuesReleasesSearchRestResponse: type: object properties: issuesReleases: type: array items: - $ref: '#/components/schemas/DependencyRiskResource' + $ref: '#/components/schemas/IssueReleaseResource' + branches: + type: array + items: + $ref: '#/components/schemas/IssueReleaseBranchResource' + countWithoutFilters: + type: integer + format: int32 page: $ref: '#/components/schemas/PageRestResponse' - AffectedPackageResource: + IssueReleaseChangeDiffResource: type: object properties: - purl: + fieldName: type: string - recommendation: + oldValue: type: string - recommendationDetails: - $ref: '#/components/schemas/VulnerabilityRecommendationDetailsResource' - versionOptions: - type: array - items: - $ref: '#/components/schemas/VersionOptionResource' - affectedVersions: - type: array - items: - type: string - unaffectedVersions: + newValue: type: string - DependencyRiskDetailsResource: + IssueReleaseChangeResource: type: object properties: key: type: string - severity: - type: string - release: - $ref: '#/components/schemas/ReleaseSearchResource' - type: - type: string createdAt: type: string - vulnerability: - $ref: '#/components/schemas/VulnerabilityResource' - spdxLicenseId: + user: + $ref: '#/components/schemas/UserResource' + markdownComment: type: string - VersionOptionResource: - type: object - properties: - version: + htmlComment: type: string - description: The version being presented as an option - vulnerabilityIds: + changeData: + type: array + items: + $ref: '#/components/schemas/IssueReleaseChangeDiffResource' + actions: type: array - description: Vulnerability IDs affecting this version items: type: string - prerelease: - type: boolean - description: Is this version a pre-release version - fixLevel: - type: string - description: Describes which vulnerabilities are fixed - enum: - - COMPLETE - - PARTIAL - - NONE - - UNKNOWN - descriptionCode: - type: string - description: How the frontend should label this version - enum: - - VERSION_IN_USE - - NEAREST_PARTIAL - - NEAREST_COMPLETE - - LATEST_PARTIAL - - LATEST_COMPLETE - - LATEST_STABLE - - LATEST_PRERELEASE - - UNKNOWN - VulnerabilityRecommendationDetailsResource: + enum: + - EDIT_COMMENT + - DELETE_COMMENT + uniqueItems: true + IssuesReleasesChangesRestResponse: type: object properties: - impactScore: - type: integer - format: int32 - impactDescription: - type: string - realIssue: - type: boolean - falsePositiveReason: - type: string - includesDev: - type: boolean - specificMethodsAffected: - type: boolean - specificMethodsDescription: - type: string - otherConditions: - type: boolean - otherConditionsDescription: - type: string - workaroundAvailable: + changelog: + type: array + items: + $ref: '#/components/schemas/IssueReleaseChangeResource' + ScaFeatureEnabledResource: + type: object + properties: + enabled: type: boolean - workaroundDescription: - type: string - visibility: - type: string - VulnerabilityReportResource: + ScaCliInfoRestResponse: type: object properties: id: type: string - url: + filename: type: string - type: + sha256: type: string - cvssScore: + os: type: string - cvssSeverity: + arch: type: string - VulnerabilityResource: + AnalysisErrorResource: type: object properties: - vulnerabilityId: + code: type: string - reports: - type: array - items: - $ref: '#/components/schemas/VulnerabilityReportResource' - description: + enum: + - UNKNOWN + - NO_DEPENDENCIES_FOUND + - DEPENDENCY_FILES_PARSE_ERROR + - UNSUPPORTED_PLATFORM + - INEXACT_VERSIONS + - MISSING_LOCKFILE + path: type: string - epssPercentile: + message: type: string - epssProbability: + AnalysisResource: + type: object + properties: + status: type: string - knownExploited: - type: boolean - cweIds: + enum: + - FAILED + - OUTDATED + - COMPLETED + failedReason: + type: string + errors: type: array items: - type: string - affectedPackages: + $ref: '#/components/schemas/AnalysisErrorResource' + parsedFiles: type: array items: - $ref: '#/components/schemas/AffectedPackageResource' - ScaCliInfoRestResponse: + type: string + JiraWorkTypeFieldResultResource: + type: object + properties: + key: + type: string + description: The field key + readOnly: true + name: + type: string + description: The field name + readOnly: true + required: + type: boolean + description: Whether the field is required + readOnly: true + hasDefaultValue: + type: boolean + description: Whether the field has a default value + readOnly: true + JiraWorkTypeResultResource: type: object properties: id: type: string - filename: + description: the Jira work type id + readOnly: true + name: type: string - sha256: + description: the Jira work type name + readOnly: true + description: type: string - os: + description: the Jira work type description + readOnly: true + subtask: + type: boolean + description: 'true, if the Jira work type is a subtask' + readOnly: true + hierarchyLevel: + type: integer + format: int32 + description: the Jira work type hierarchy + readOnly: true + selected: + type: boolean + description: 'true, if the Jira work type is selected' + readOnly: true + fields: + type: array + description: Array of field metadata for the specified work type. (Optional) + items: + $ref: '#/components/schemas/JiraWorkTypeFieldResultResource' + readOnly: true + JiraProjectResultResource: + type: object + properties: + name: type: string - arch: + description: the name of the project + readOnly: true + key: type: string + description: the key of the project + readOnly: true + LinkedIssuesCountResource: + type: object + properties: + count: + type: integer + format: int32 + description: Count of linked Jira issues + readOnly: true + IntegrationConfigurationSearchResponse: + type: object + properties: + integrationConfigurations: + type: array + items: + $ref: '#/components/schemas/IntegrationConfigurationResponse' + SupportedRulesDto: + type: object + properties: + rules: + type: array + items: + type: string + uniqueItems: true LlmModelDto: type: object properties: @@ -6351,23 +9524,6 @@ components: - SUCCESS - TIMEOUT - UNAUTHORIZED - isEnabled: - type: boolean - subscriptionType: - type: string - enum: - - EARLY_ACCESS - - PAID - - NOT_PAID - SubscriptionTypeResponse: - type: object - properties: - subscriptionType: - type: string - enum: - - EARLY_ACCESS - - PAID - - NOT_PAID FixSuggestionIssueResponse: type: object properties: @@ -6405,6 +9561,87 @@ components: type: string endpoint: type: string + PurchasableFeatureRestResponse: + type: object + properties: + featureKey: + type: string + parent: + type: string + isEnabled: + type: boolean + isAvailable: + type: boolean + url: + type: string + LicenseFeatureRestResponse: + type: object + properties: + name: + type: string + parent: + type: string + startDate: + type: string + endDate: + type: string + LicenseRestResponse: + type: object + properties: + expirationDate: + type: string + lastRefreshDate: + type: string + edition: + type: string + features: + type: array + items: + $ref: '#/components/schemas/LicenseFeatureRestResponse' + maxLoc: + type: integer + format: int64 + loc: + type: integer + format: int64 + serverId: + type: string + type: + type: string + contactEmail: + type: string + remainingLocThreshold: + type: integer + format: int64 + canActivateGracePeriod: + type: boolean + gracePeriodEndDate: + type: string + gracePeriodExpired: + type: boolean + extraDays: + type: integer + format: int32 + startDate: + type: string + activatedOnline: + type: boolean + licenseKey: + type: string + validEdition: + type: boolean + validServerId: + type: boolean + officialDistribution: + type: boolean + supported: + type: boolean + legacy: + type: boolean + expired: + type: boolean + disabled: + type: boolean ProjectBinding: type: object properties: @@ -6503,6 +9740,38 @@ components: $ref: '#/components/schemas/GroupMembershipRestResponse' page: $ref: '#/components/schemas/PageRestResponse' + _a: + type: object + properties: + graphs: + type: array + items: + $ref: '#/components/schemas/_h' + _h: + type: object + properties: + id: + type: string + branchId: + type: string + type: + type: string + enum: + - file_graph + - namespace_graph + ecosystem: + type: string + enum: + - java + - js + - ts + - py + - cs + - xoo + perspectiveKey: + type: string + graphVersion: + type: string JreInfoRestResponse: type: object properties: diff --git a/src/schema/sonarqube-v1.yaml b/src/schema/sonarqube-v1.yaml index 141b249..aca12a3 100644 --- a/src/schema/sonarqube-v1.yaml +++ b/src/schema/sonarqube-v1.yaml @@ -14,7 +14,7 @@ paths: /issues/search: get: tags: - - issue + - searchIssues summary: Search Issues security: - basicAuth: [] @@ -992,7 +992,9 @@ paths: type: string explode: true required: false - description: User login (admin credentials required to list tokens of another user) + description: + User login (admin credentials required to list tokens of another + user) allowReserved: false responses: '200': @@ -1058,7 +1060,9 @@ paths: type: string explode: true required: false - description: User login (admin credentials required to generate token for another user) + description: + User login (admin credentials required to generate token for another + user) allowReserved: false - in: query name: type @@ -1081,7 +1085,9 @@ paths: type: string explode: true required: false - description: Project key (required for PROJECT_ANALYSIS_TOKEN and PROJECT_BADGE_TOKEN types) + description: + Project key (required for PROJECT_ANALYSIS_TOKEN and + PROJECT_BADGE_TOKEN types) allowReserved: false - in: query name: expirationDate @@ -1091,7 +1097,8 @@ paths: format: date explode: true required: false - description: Token expiration date in ISO 8601 date format (YYYY-MM-DD) + description: + Token expiration date in ISO 8601 date format (YYYY-MM-DD) allowReserved: false responses: '200': @@ -1159,7 +1166,9 @@ paths: type: string explode: true required: false - description: User login (admin credentials required to revoke token of another user) + description: + User login (admin credentials required to revoke token of another + user) allowReserved: false responses: '204': diff --git a/src/schema/sonarqube-v2.json b/src/schema/sonarqube-v2.json index 1f180f0..8248e9e 100644 --- a/src/schema/sonarqube-v2.json +++ b/src/schema/sonarqube-v2.json @@ -2,18 +2,19 @@ "openapi": "3.1.0", "info": { "title": "SonarQube Web API v2", - "description": "The SonarQube API v2 is a REST API which enables you to interact with SonarQube programmatically. Endpoint listed here should work as expected.\nHowever, you should not consider the API stable for now as it is still under development. New releases of SonarQube can bring changes to existing endpoint definitions.\n" + "description": "The SonarQube API v2 is a REST API which enables you to interact with SonarQube programmatically.\nWhile not all endpoints of the former Web API are available yet, the ones available are stable and can be used in production environments.\n", + "version": "2025.6.0.116828" }, "servers": [ { - "url": "http://sonarqube.internal.philips/api/v2", + "url": "http://next.sonarqube.com/sonarqube/api/v2", "description": "Generated server url" } ], "paths": { "/users-management/users": { "get": { - "tags": ["user-controller"], + "tags": ["Users Management"], "summary": "Users search", "description": " Get a list of users. By default, only active users are returned.\n The following fields are only returned when user has Administer System permission or for logged-in in user :\n 'email',\n 'externalIdentity',\n 'externalProvider',\n 'groups',\n 'lastConnectionDate',\n 'sonarLintLastConnectionDate',\n 'tokensCount'.\n Field 'sonarqubeLastConnectionDate' is only updated every hour, so it may not be accurate, for instance when a user authenticates many times in less than one hour.\n The results are sorted alphabetically by login.\n", "operationId": "search", @@ -114,8 +115,10 @@ "required": false, "schema": { "type": "string", - "description": "Filter users belonging to group. Only available for system administrators. Using != operator will exclude users from this group." - } + "description": "Filter users belonging to group. Only available for system administrators. Using != operator will exclude users from this group.", + "internal": "true" + }, + "x-internal": "true" }, { "name": "pageSize", @@ -141,6 +144,7 @@ "format": "int32", "default": 1, "description": "1-based page index", + "exclusiveMinimum": 0, "minimum": 1 } } @@ -159,7 +163,7 @@ } }, "post": { - "tags": ["user-controller"], + "tags": ["Users Management"], "summary": "User creation", "description": " Create a user.\n If a deactivated user account exists with the given login, it will be reactivated.\n Requires Administer System permission.\n", "operationId": "create", @@ -187,7 +191,7 @@ }, "/system/email-configurations": { "get": { - "tags": ["email-configuration-controller"], + "tags": ["System"], "summary": "Search email configurations", "description": " Get the list of email configurations.\n Note that a single configuration is supported at this time.\n Requires 'Administer System' permission.\n", "operationId": "searchEmailConfigurations", @@ -206,7 +210,7 @@ "x-sonar-internal": "true" }, "post": { - "tags": ["email-configuration-controller"], + "tags": ["System"], "summary": "Create an email configuration", "description": " Create a new email configuration.\n Note that only a single configuration can exist at a time.\n Requires 'Administer System' permission.\n", "operationId": "createEmailConfiguration", @@ -235,79 +239,92 @@ "x-sonar-internal": "true" } }, - "/fix-suggestions/feature-enablements/awareness-banner-interactions": { - "post": { - "tags": ["feature-enablement-controller"], - "summary": "Starts a GitLab synchronization run.", - "operationId": "createAwarenessBannerClicked", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AwarenessBannerClickedRequest" - } + "/sca/license-profiles": { + "get": { + "tags": ["License Profiles"], + "summary": "List license profiles", + "description": " List the license profiles that have been configured for use when evaluating license issues.\n", + "operationId": "index", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "If provided, filter to the license profile that is used to analyze the project (if one exists).\n", + "required": false, + "schema": { + "type": "string", + "description": "If provided, filter to the license profile that is used to analyze the project (if one exists).\n" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AwarenessBannerClickedResponse" + "$ref": "#/components/schemas/LicenseProfileIndexRestResponse" } } } } }, "x-sonar-internal": "true" - } - }, - "/fix-suggestions/ai-suggestions": { + }, "post": { - "tags": ["fix-suggestion-controller"], - "summary": "Suggest a fix for the given issueId", - "description": "Requires Code Viewer permission.", + "tags": ["License Profiles"], + "summary": "Create new license profile", + "description": " Create a new license profile for projects to use when evaluating license issues.\n", "operationId": "create_1", + "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FixSuggestionPostRequest" + "$ref": "#/components/schemas/LicenseProfilesCreateRestRequest" } } }, "required": true }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FixSuggestionResponse" + "$ref": "#/components/schemas/LicenseProfileResource" } } } } - } + }, + "x-sonar-internal": "true" } }, - "/dop-translation/gitlab-synchronization-runs": { + "/sca/issues-releases/update-assignee": { "post": { - "tags": ["gitlab-synchronization-run-controller"], - "summary": "Starts a GitLab synchronization run.", - "description": " Adds a new GitLab synchronization run in the background tasks. Requires sys-admins permissions.\n", - "operationId": "create_2", + "tags": ["Issues-Releases"], + "summary": "Update the assignee of an (issue,release) pair", + "description": "Update the assignee of an (issue,release) pair (dependency risk).\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "updateAssignee", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAssigneeRestRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitlabSynchronizationRunResource" + "$ref": "#/components/schemas/IssueReleaseDetailsResource" } } } @@ -316,36 +333,48 @@ "x-sonar-internal": "true" } }, - "/dop-translation/gitlab-permission-mappings": { - "get": { - "tags": ["gitlab-permission-mappings-controller"], - "summary": "Fetch permissions mapping", - "description": "Get the list of all the existing roles with their permission mappings. Requires 'Administer System' permission.", - "operationId": "fetchAll", + "/sca/issues-releases/set-severity": { + "post": { + "tags": ["Issues-Releases"], + "summary": "Manually change the severity of an issue-release pair", + "description": "Change the severity of a (issue,release) pair (dependency risk).\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "setSeverity", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueReleaseSetSeverityRestRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionMappingsSearchRestResponse" + "$ref": "#/components/schemas/IssueReleaseDetailsResource" } } } } }, "x-sonar-internal": "true" - }, + } + }, + "/sca/issues-releases/clear-severity-warning": { "post": { - "tags": ["gitlab-permission-mappings-controller"], - "summary": "Create a permission mapping for a custom role", - "description": "Requires 'Administer System' permission.", - "operationId": "createMapping", + "tags": ["Issues-Releases"], + "summary": "Dismiss the increased severity warning for an issue-release pair after reviewing the warning", + "description": "Dismiss the increased severity warning for an (issue,release) pair (dependency risk) after reviewing the warning.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "clearSeverityWarning", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionMappingsPostRequest" + "$ref": "#/components/schemas/IssueReleaseClearSeverityWarningRestRequest" } } }, @@ -357,7 +386,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionMappingsResource" + "$ref": "#/components/schemas/IssueReleaseDetailsResource" } } } @@ -366,69 +395,113 @@ "x-sonar-internal": "true" } }, - "/dop-translation/gitlab-configurations": { - "get": { - "tags": ["gitlab-configuration-controller"], - "summary": "Search GitLab configs", - "description": " Get the list of GitLab configurations.\n Note that a single configuration is supported at this time.\n Requires 'Administer System' permission.\n", - "operationId": "searchGitlabConfiguration", + "/sca/issues-releases/change-status": { + "post": { + "tags": ["Issues-Releases"], + "summary": "Transition an issue-release pair to a new status", + "description": "Transition a single (issue,release) pair (dependency risk) to a new status with a comment about why the status is changing.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "transitionIssueRelease", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueReleaseStatusTransitionRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitlabConfigurationSearchRestResponse" + "$ref": "#/components/schemas/IssueReleaseDetailsResource" } } } } }, "x-sonar-internal": "true" - }, + } + }, + "/sca/issues-releases/add-comment": { "post": { - "tags": ["gitlab-configuration-controller"], - "summary": "Create Gitlab configuration", - "description": " Create a new Gitlab configuration.\n Note that only a single configuration can exist at a time.\n Requires 'Administer System' permission.\n", - "operationId": "create_3", + "tags": ["Issues-Releases"], + "summary": "Add a comment to an issue-release pair", + "description": "Add a comment to a (issue,release) pair (dependency risk).\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "addComment", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitlabConfigurationCreateRestRequest" + "$ref": "#/components/schemas/IssueReleaseAddCommentRestRequest" } } }, "required": true }, + "responses": { "201": { "description": "Created" } }, + "x-sonar-internal": "true" + } + }, + "/marketplace/azure/billing": { + "post": { + "tags": ["Marketplace Azure"], + "summary": "Bills user's Azure account with the cost of SonarQube Server license", + "description": "Used by admin to bill user's Azure account with the cost of SonarQube Server license.", + "operationId": "billAzureAccount", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitlabConfigurationResource" + "$ref": "#/components/schemas/AzureBillingRestResponse" } } } } - }, - "x-sonar-internal": "true" + } } }, - "/dop-translation/github-permission-mappings": { + "/jira/work-items": { "get": { - "tags": ["github-permission-mappings-controller"], - "summary": "Fetch permissions mapping", - "description": "Get the list of all the existing roles with their permission mappings. Requires 'Administer System' permission.", - "operationId": "fetchAll_1", + "tags": ["Jira"], + "summary": "Fetch Jira work items", + "description": "Fetch the Jira work items for a specific Sonar project and resource.\nAccepts only authenticated requests.\n", + "operationId": "鲥", + "parameters": [ + { + "name": "sonarProjectId", + "in": "query", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "resourceId", + "in": "query", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "resourceType", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": ["SONAR_ISSUE", "DEPENDENCY_RISK"] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionMappingsSearchRestResponse" + "$ref": "#/components/schemas/JiraWorkItemResource" } } } @@ -437,48 +510,87 @@ "x-sonar-internal": "true" }, "post": { - "tags": ["github-permission-mappings-controller"], - "summary": "Create a permission mapping for a custom role", - "description": "Requires 'Administer System' permission.", - "operationId": "createMapping_1", + "tags": ["Jira"], + "summary": "Create Jira work item", + "description": "Create a Jira work item for a specific resource.\nAccepts only authenticated requests with issue administration permission.\n", + "operationId": "鲥_1", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionMappingsPostRequest" + "$ref": "#/components/schemas/PostJiraWorkItemRequestResource" } } }, "required": true }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionMappingsResource" + "$ref": "#/components/schemas/JiraWorkItemResource" } } } } }, "x-sonar-internal": "true" + }, + "delete": { + "tags": ["Jira"], + "summary": "Delete Jira work items", + "description": "Delete the Jira work items associated with a specific resource.\n", + "operationId": "絛", + "parameters": [ + { + "name": "sonarProjectId", + "in": "query", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "resourceId", + "in": "query", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "resourceType", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": ["SONAR_ISSUE", "DEPENDENCY_RISK"] + } + } + ], + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" } }, - "/dop-translation/github-configurations": { + "/jira/project-bindings": { "get": { - "tags": ["github-configuration-controller"], - "summary": "Search GitHub configs", - "description": " Get the list of GitHub configurations.\n Note that a single configuration is supported at this time.\n Requires 'Administer System' permission.\n", - "operationId": "searchGithubConfiguration", + "tags": ["Jira"], + "summary": "Fetch Jira project bindings", + "description": "Fetch the Jira project binding for a specific Sonar project.\nAccepts only authenticated requests.\n", + "operationId": "鲥_2", + "parameters": [ + { + "name": "sonarProjectId", + "in": "query", + "required": true, + "schema": { "type": "string" } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GithubConfigurationSearchRestResponse" + "$ref": "#/components/schemas/JiraProjectBindingResource" } } } @@ -487,169 +599,194 @@ "x-sonar-internal": "true" }, "post": { - "tags": ["github-configuration-controller"], - "summary": "Create GitHub configuration", - "description": " Create a new GitHub configuration.\n Note that only a single configuration can exist at a time.\n Requires 'Administer System' permission.\n", - "operationId": "createGithubConfiguration", + "tags": ["Jira"], + "summary": "Create or update Jira project binding", + "description": "Create or update a Jira project binding for a specific Sonar project.\nAccepts only authenticated requests.\n", + "operationId": "鲥_3", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GithubConfigurationCreateRestRequest" + "$ref": "#/components/schemas/PostJiraProjectBindingRequestResource" } } }, "required": true }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GithubConfigurationResource" + "$ref": "#/components/schemas/JiraProjectBindingResource" } } } } }, "x-sonar-internal": "true" - } - }, - "/dop-translation/bound-projects": { - "post": { - "tags": ["bound-projects-controller"], - "summary": "Create a SonarQube project with the information from the provided DevOps platform project.", - "description": "Create a SonarQube project with the information from the provided DevOps platform project.\nAutoconfigure Pull-Request decoration mechanism.\nRequires the 'Create Projects' permission and setting a Personal Access Token with api/alm_integrations/set_pat for a user who will be using this endpoint\n", - "operationId": "createBoundProject", + }, + "delete": { + "tags": ["Jira"], + "summary": "Delete Jira project binding", + "description": "Delete the Jira project binding for a specific Sonar project.\nAccepts only authenticated requests.\n", + "operationId": "絛_1", + "parameters": [ + { + "name": "sonarProjectId", + "in": "query", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Jira"], + "summary": "Update Jira project binding", + "description": "Update an existing Jira project binding for a specific Sonar project.\nAccepts only authenticated requests.\n", + "operationId": "鲥_4", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BoundProjectCreateRestRequest" + "$ref": "#/components/schemas/PatchJiraProjectBindingRequestResource" } } }, "required": true }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BoundProjectCreateRestResponse" + "$ref": "#/components/schemas/JiraProjectBindingResource" } } } } - } + }, + "x-sonar-internal": "true" } }, - "/clean-code-policy/rules": { + "/jira/organization-bindings": { + "get": { + "tags": ["Jira"], + "summary": "Fetch the Jira instance binding", + "description": "Fetch the Jira instance binding.\nRequires global administrator permission.\n", + "operationId": "絛_2", + "parameters": [ + { + "name": "sonarOrganizationUuid", + "in": "query", + "required": true, + "schema": { "type": "string", "format": "uuid" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JiraOrganizationBindingResource" + } + } + } + } + }, + "x-sonar-internal": "true" + }, "post": { - "tags": ["rule-controller"], - "summary": "Custom rule creation", - "description": " Create a custom rule.\n Requires the 'Administer Quality Profiles' permission.\n", - "operationId": "create_4", + "tags": ["Jira"], + "summary": "Create a new Jira instance binding", + "description": "Receives the 3LO state and authorization code parameters and attempts to create an instance binding.\nIf successful, returns the binding. Otherwise, returns a list of available resources.\nRequires global administrator permission.\n", + "operationId": "鲥_5", "requestBody": { "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/RuleCreateRestRequest" } + "schema": { + "$ref": "#/components/schemas/PostJiraOrganizationBindingRequestResource" + } } }, "required": true }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/RuleRestResponse" } + "schema": { + "$ref": "#/components/schemas/PostJiraOrganizationBindingResponseResource" + } } } } - } - } - }, - "/authorizations/groups": { - "get": { - "tags": ["group-controller"], - "summary": "Group search", - "description": " Get the list of groups.\n The results are sorted alphabetically by group name.\n", - "operationId": "search_1", + }, + "x-sonar-internal": "true" + }, + "delete": { + "tags": ["Jira"], + "summary": "Delete the Jira instance binding", + "description": "Deletes the Jira instance binding from the database.\nRequires global administrator permission.\n", + "operationId": "鲥_6", "parameters": [ { - "name": "managed", - "in": "query", - "description": "Return managed or non-managed groups. Only available for managed instances, throws for non-managed instances", - "required": false, - "schema": { - "type": "boolean", - "description": "Return managed or non-managed groups. Only available for managed instances, throws for non-managed instances" - } - }, - { - "name": "q", - "in": "query", - "description": "Filter on name.\nThis parameter performs a partial match (contains), it is case insensitive.", - "required": false, - "schema": { - "type": "string", - "description": "Filter on name.\nThis parameter performs a partial match (contains), it is case insensitive." - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Number of results per page. A value of 0 will only return the pagination information.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 50, - "description": "Number of results per page. A value of 0 will only return the pagination information.", - "maximum": 500, - "minimum": 0 - } - }, - { - "name": "pageIndex", + "name": "sonarOrganizationUuid", "in": "query", - "description": "1-based page index", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 1, - "description": "1-based page index", - "minimum": 1 - } + "required": true, + "schema": { "type": "string", "format": "uuid" } } ], + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Jira"], + "summary": "Binds the specified pending instance binding with the specified jira cloud ID", + "description": "Binds the specified pending instance binding with the specified jira cloud ID\n", + "operationId": "鲥_7", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchJiraOrganizationBindingRequestResource" + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupsSearchRestResponse" + "$ref": "#/components/schemas/JiraOrganizationBindingResource" } } } } - } - }, + }, + "x-sonar-internal": "true" + } + }, + "/integrations/user-bindings": { "post": { - "tags": ["group-controller"], - "summary": "Create a new group", - "description": "Create a new group.", - "operationId": "create_5", + "tags": ["Slack User Bindings"], + "summary": "Create Slack user binding", + "description": "Creates a new user binding between a SonarQube user and their Slack account.\nThis endpoint is used during the Slack OAuth flow when users connect their accounts\nvia the /sonarqube-server connect slash command.\n", + "operationId": "createUserBinding", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupCreateRestRequest" + "$ref": "#/components/schemas/UserBindingCreationRequest" } } }, @@ -657,69 +794,72 @@ }, "responses": { "201": { - "description": "Created", + "description": "User binding created successfully", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/GroupRestResponse" } + "schema": { "$ref": "#/components/schemas/UserBindingResponse" } } } + }, + "400": { "description": "Invalid request data" }, + "401": { "description": "Authentication required" }, + "403": { "description": "Insufficient permissions" }, + "409": { "description": "User binding already exists" }, + "500": { "description": "Internal server error" } + }, + "x-sonar-internal": "true" + } + }, + "/integrations/slack/slash-commands": { + "post": { + "tags": ["slack-slash-command-controller"], + "summary": "Handle Slack Slash Commands", + "description": "Handles incoming Slack slash command requests and command processing.\nThe request body is form-encoded and contains command details. Signature validation is performed via\nSlackSlashCommandSignatureValidationAdvice before reaching this controller.\n", + "operationId": "handleSlashCommand", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { "type": "string" } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } }, + "x-sonar-internal": "true" + } + }, + "/integrations/slack/events": { + "post": { + "tags": ["slack-event-controller"], + "summary": "Handle Slack Events API", + "description": "Handles incoming Slack Events API requests including URL verification and workspace lifecycle events.\nThe request body is JSON and contains event details. Signature validation is performed via\nSlackEventsSignatureValidationAdvice before reaching this controller.\n", + "operationId": "handleEvent", + "requestBody": { + "content": { "application/json": { "schema": { "type": "string" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { "text/plain": { "schema": { "type": "string" } } } } - } + }, + "x-sonar-internal": "true" } }, - "/authorizations/group-memberships": { + "/integrations/integration-configurations": { "get": { - "tags": ["group-membership-controller"], - "summary": "Search across group memberships", - "description": " Get the list of groups and members matching the query.\n", - "operationId": "search_2", + "tags": ["integration-configurations-controller"], + "summary": "Get integration configurations.", + "description": "Requires global administrator permission.", + "operationId": "get", "parameters": [ { - "name": "userId", - "in": "query", - "description": "ID of the user for which to search groups. If not set, all groups are returned.", - "required": false, - "schema": { - "type": "string", - "description": "ID of the user for which to search groups. If not set, all groups are returned." - } - }, - { - "name": "groupId", - "in": "query", - "description": "ID of the group for which to search members. If not set, all groups are returned.", - "required": false, - "schema": { - "type": "string", - "description": "ID of the group for which to search members. If not set, all groups are returned." - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Number of results per page. A value of 0 will only return the pagination information.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 50, - "description": "Number of results per page. A value of 0 will only return the pagination information.", - "maximum": 500, - "minimum": 0 - } - }, - { - "name": "pageIndex", + "name": "integrationType", "in": "query", - "description": "1-based page index", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 1, - "description": "1-based page index", - "minimum": 1 - } + "description": "Integration type", + "required": true, + "schema": { "type": "string", "enum": ["SLACK"] } } ], "responses": { @@ -728,23 +868,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupsMembershipSearchRestResponse" + "$ref": "#/components/schemas/IntegrationConfigurationSearchResponse" } } } } - } + }, + "x-sonar-internal": "true" }, "post": { - "tags": ["group-membership-controller"], - "summary": "Add a group membership", - "description": "Add a user to a group.", - "operationId": "create_6", + "tags": ["integration-configurations-controller"], + "summary": "Create a configuration for an integration.", + "description": "Requires global administrator permission.", + "operationId": "create_2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupMembershipCreateRestRequest" + "$ref": "#/components/schemas/IntegrationConfigurationPostRequest" } } }, @@ -756,82 +897,57 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupMembershipRestResponse" + "$ref": "#/components/schemas/IntegrationConfigurationResponse" } } } } - } + }, + "x-sonar-internal": "true" } }, - "/users-management/users/{id}": { - "get": { - "tags": ["user-controller"], - "summary": "Fetch a single user", - "description": "Fetch a single user.\nThe following fields are only returned when user has Administer System permission or for logged-in in user :\n 'email'\n 'externalIdentity'\n 'externalProvider'\n 'groups'\n 'lastConnectionDate'\n 'sonarLintLastConnectionDate'\n 'tokensCount'\n Field 'sonarqubeLastConnectionDate' is only updated every hour, so it may not be accurate, for instance when a user authenticates many times in less than one hour.\n", - "operationId": "fetchUser", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the user to fetch.", - "required": true, - "schema": { "type": "string" } - } - ], + "/fix-suggestions/feature-enablements/awareness-banner-interactions": { + "post": { + "tags": ["Fix Suggestions"], + "summary": "Starts a GitLab synchronization run.", + "operationId": "createAwarenessBannerClicked", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AwarenessBannerClickedRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserRestResponseForAdmins" + "$ref": "#/components/schemas/AwarenessBannerClickedResponse" } } } } - } - }, - "delete": { - "tags": ["user-controller"], - "summary": "Deactivate a user", - "description": "Deactivates a user. Requires Administer System permission.", - "operationId": "deactivate", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The ID of the user to delete.", - "required": true, - "schema": { "type": "string" } - }, - { - "name": "anonymize", - "in": "query", - "description": "Anonymize user in addition to deactivating it.", - "required": false, - "schema": { "type": "boolean", "default": false } - } - ], - "responses": { "204": { "description": "No Content" } } - }, - "patch": { - "tags": ["user-controller"], - "summary": "Update a user", - "description": "Update users attributes.\n", - "operationId": "updateUser", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], + }, + "x-sonar-internal": "true" + } + }, + "/fix-suggestions/ai-suggestions": { + "post": { + "tags": ["Fix Suggestions"], + "summary": "Suggest a fix for the given issueId", + "description": "Requires Code Viewer permission.", + "operationId": "create_3", "requestBody": { "content": { - "application/merge-patch+json": { - "schema": { "$ref": "#/components/schemas/UserUpdateRestRequest" } + "application/json": { + "schema": { + "$ref": "#/components/schemas/FixSuggestionPostRequest" + } } }, "required": true @@ -842,7 +958,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserRestResponseForAdmins" + "$ref": "#/components/schemas/FixSuggestionResponse" } } } @@ -850,82 +966,122 @@ } } }, - "/system/email-configurations/{id}": { - "get": { - "tags": ["email-configuration-controller"], - "summary": "Fetch an email configuration", - "description": "Fetch a Email configuration. Requires 'Administer System' permission.\n", - "operationId": "getEmailConfiguration", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the configuration to fetch.", - "required": true, - "schema": { "type": "string" } - } - ], + "/entitlements/online-activation": { + "post": { + "tags": ["Entitlements"], + "summary": "Sets the license", + "description": " Only third party license keys are accepted.\n Requires 'Administer System' permission.\n", + "operationId": "setLicense", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/LicenseRestRequest" } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } }, + "x-sonar-internal": "true" + } + }, + "/entitlements/offline-deactivation": { + "post": { + "tags": ["Entitlements"], + "summary": "Deactivates offline license", + "description": " This method is for users who activated the license using offline method. It should be used to\n fully deactivate the license (i.e. in cases of migrating the installation to a new server).\n", + "operationId": "deactivateLicense", "responses": { "200": { "description": "OK", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/EmailConfigurationResource" - } + "schema": { "type": "string", "format": "binary" } } } } }, "x-sonar-internal": "true" - }, - "delete": { - "tags": ["email-configuration-controller"], - "summary": "Delete an email configuration", - "description": "Delete an email configuration.\nRequires 'Administer System' permission.\n", - "operationId": "deleteEmailConfiguration", + } + }, + "/entitlements/offline-activation": { + "get": { + "tags": ["Entitlements"], + "summary": "Retrieve a valid .req file for offline activation", + "description": " Retrieves a .req file for offline activation of a license.\n Requires 'Administer System' permission.\n", + "operationId": "retrieveRequestFile", "parameters": [ { - "name": "id", - "in": "path", - "description": "The id of the configuration to delete.", + "name": "License-Key", + "in": "header", + "description": "The unique license key associated with the license, in the format 'ABCD-EFGH-IJKL-MNOP'. Required in the 'License-Key' HTTP header for offline activation.", "required": true, "schema": { "type": "string" } } ], - "responses": { "204": { "description": "No Content" } }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "type": "string", "format": "binary" } + } + } + } + }, "x-sonar-internal": "true" }, - "patch": { - "tags": ["email-configuration-controller"], - "summary": "Update an email configuration", - "description": "Update an email configuration. Requires 'Administer System' permission.\n", - "operationId": "updateEmailConfiguration", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], + "post": { + "tags": ["Entitlements"], + "summary": "Uploads a license", + "description": " The content of the request body should be the text of the license file, along with a valid license key.\n Requires 'Administer System' permission.\n", + "operationId": "uploadLicense", "requestBody": { "content": { - "application/merge-patch+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/EmailConfigurationUpdateRestRequest" + "$ref": "#/components/schemas/LicenseUploadActivationRequest" } } }, "required": true }, + "responses": { "200": { "description": "OK" } }, + "x-sonar-internal": "true" + } + }, + "/entitlements/legacy-activation": { + "post": { + "tags": ["Entitlements"], + "summary": "Sets the license", + "description": " Only license keys received from Sonar are accepted.\n Requires 'Administer System' permission.\n", + "operationId": "setLegacyLicense", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LegacyLicenseRestRequest" + } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } }, + "x-sonar-internal": "true" + } + }, + "/dop-translation/gitlab-synchronization-runs": { + "post": { + "tags": ["Dop Translation"], + "summary": "Starts a GitLab synchronization run.", + "description": " Adds a new GitLab synchronization run in the background tasks. Requires sys-admins permissions.\n", + "operationId": "create_4", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EmailConfigurationResource" + "$ref": "#/components/schemas/GitlabSynchronizationRunResource" } } } @@ -934,18 +1090,19 @@ "x-sonar-internal": "true" } }, - "/sca/feature-enablements": { + "/dop-translation/gitlab-permission-mappings": { "get": { - "tags": ["k"], - "summary": "Get the status of SCA enablement", - "operationId": "getFeatureEnablement", + "tags": ["Dop Translation"], + "summary": "Fetch permissions mapping", + "description": "Get the list of all the existing roles with their permission mappings. Requires 'Administer System' permission.", + "operationId": "fetchAll", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeatureEnablementResource" + "$ref": "#/components/schemas/PermissionMappingsSearchRestResponse" } } } @@ -953,15 +1110,16 @@ }, "x-sonar-internal": "true" }, - "patch": { - "tags": ["k"], - "summary": "Update SCA enablement settings", - "operationId": "updateFeatureEnablement", + "post": { + "tags": ["Dop Translation"], + "summary": "Create a permission mapping for a custom role", + "description": "Requires 'Administer System' permission.", + "operationId": "createMapping", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeatureEnablementRequest" + "$ref": "#/components/schemas/PermissionMappingsPostRequest" } } }, @@ -973,7 +1131,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeatureEnablementResource" + "$ref": "#/components/schemas/PermissionMappingsResource" } } } @@ -982,78 +1140,86 @@ "x-sonar-internal": "true" } }, - "/fix-suggestions/feature-enablements": { + "/dop-translation/gitlab-configurations": { "get": { - "tags": ["feature-enablement-controller"], - "summary": "Fetch the Ai CodeFix feature enablement configurations", - "operationId": "getFeatureEnablement_1", + "tags": ["Dop Translation"], + "summary": "Search GitLab configs", + "description": " Get the list of GitLab configurations.\n Note that a single configuration is supported at this time.\n Requires 'Administer System' permission.\n", + "operationId": "searchGitlabConfiguration", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeatureEnablementResponse" + "$ref": "#/components/schemas/GitlabConfigurationSearchRestResponse" } } } } - } + }, + "x-sonar-internal": "true" }, - "patch": { - "tags": ["feature-enablement-controller"], - "summary": "Enable/Disable the AI CodeFix feature at the instance or project level", - "operationId": "updateFeatureEnablement_1", + "post": { + "tags": ["Dop Translation"], + "summary": "Create Gitlab configuration", + "description": " Create a new Gitlab configuration.\n Note that only a single configuration can exist at a time.\n Requires 'Administer System' permission.\n", + "operationId": "create_5", "requestBody": { "content": { - "application/merge-patch+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/FeatureEnablementRequest" + "$ref": "#/components/schemas/GitlabConfigurationCreateRestRequest" } } }, "required": true }, - "responses": { "204": { "description": "No Content" } } + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitlabConfigurationResource" + } + } + } + } + }, + "x-sonar-internal": "true" } }, - "/dop-translation/gitlab-permission-mappings/{role}": { - "delete": { - "tags": ["gitlab-permission-mappings-controller"], - "summary": "Delete a single permission mappings", - "description": "Requires 'Administer System' permission.", - "operationId": "deleteMapping", - "parameters": [ - { - "name": "role", - "in": "path", - "description": "The name of the role to delete", - "required": true, - "schema": { "type": "string" } + "/dop-translation/github-permission-mappings": { + "get": { + "tags": ["Dop Translation"], + "summary": "Fetch permissions mapping", + "description": "Get the list of all the existing roles with their permission mappings. Requires 'Administer System' permission.", + "operationId": "fetchAll_1", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionMappingsSearchRestResponse" + } + } + } } - ], - "responses": { "204": { "description": "No Content" } }, + }, "x-sonar-internal": "true" }, - "patch": { - "tags": ["gitlab-permission-mappings-controller"], - "summary": "Update a single permission mapping", + "post": { + "tags": ["Dop Translation"], + "summary": "Create a permission mapping for a custom role", "description": "Requires 'Administer System' permission.", - "operationId": "updateMapping", - "parameters": [ - { - "name": "role", - "in": "path", - "description": "The name of the role to update", - "required": true, - "schema": { "type": "string" } - } - ], + "operationId": "createMapping_1", "requestBody": { "content": { - "application/merge-patch+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/DevOpsPermissionMappingUpdateRequest" + "$ref": "#/components/schemas/PermissionMappingsPostRequest" } } }, @@ -1074,28 +1240,19 @@ "x-sonar-internal": "true" } }, - "/dop-translation/gitlab-configurations/{id}": { + "/dop-translation/github-configurations": { "get": { - "tags": ["gitlab-configuration-controller"], - "summary": "Fetch a GitLab configuration", - "description": "Fetch a GitLab configuration. Requires 'Administer System' permission.\n", - "operationId": "getGitlabConfiguration", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the configuration to fetch.", - "required": true, - "schema": { "type": "string" } - } - ], + "tags": ["Dop Translation"], + "summary": "Search GitHub configs", + "description": " Get the list of GitHub configurations.\n Note that a single configuration is supported at this time.\n Requires 'Administer System' permission.\n", + "operationId": "searchGithubConfiguration", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitlabConfigurationResource" + "$ref": "#/components/schemas/GithubConfigurationSearchRestResponse" } } } @@ -1103,41 +1260,16 @@ }, "x-sonar-internal": "true" }, - "delete": { - "tags": ["gitlab-configuration-controller"], - "summary": "Delete a GitLab configuration", - "description": "Delete a GitLab configuration.\nRequires 'Administer System' permission.\n", - "operationId": "deleteGitlabConfiguration", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the configuration to delete.", - "required": true, - "schema": { "type": "string" } - } - ], - "responses": { "204": { "description": "No Content" } }, - "x-sonar-internal": "true" - }, - "patch": { - "tags": ["gitlab-configuration-controller"], - "summary": "Update a Gitlab configuration", - "description": "Update a Gitlab configuration. Requires 'Administer System' permission.\n", - "operationId": "updateGitlabConfiguration", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], + "post": { + "tags": ["Dop Translation"], + "summary": "Create GitHub configuration", + "description": " Create a new GitHub configuration.\n Note that only a single configuration can exist at a time.\n Requires 'Administer System' permission.\n", + "operationId": "createGithubConfiguration", "requestBody": { "content": { - "application/merge-patch+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/GitlabConfigurationUpdateRestRequest" + "$ref": "#/components/schemas/GithubConfigurationCreateRestRequest" } } }, @@ -1149,7 +1281,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitlabConfigurationResource" + "$ref": "#/components/schemas/GithubConfigurationResource" } } } @@ -1158,128 +1290,46 @@ "x-sonar-internal": "true" } }, - "/dop-translation/github-permission-mappings/{role}": { - "delete": { - "tags": ["github-permission-mappings-controller"], - "summary": "Delete a single permission mappings", - "description": "Requires 'Administer System' permission.", - "operationId": "deleteMapping_1", - "parameters": [ - { - "name": "role", - "in": "path", - "description": "The name of the role to delete", - "required": true, - "schema": { "type": "string" } - } - ], - "responses": { "204": { "description": "No Content" } }, - "x-sonar-internal": "true" - }, - "patch": { - "tags": ["github-permission-mappings-controller"], - "summary": "Update a single permission mapping", - "description": "Requires 'Administer System' permission.", - "operationId": "updateMapping_1", - "parameters": [ - { - "name": "role", - "in": "path", - "description": "The name of the role to update", - "required": true, - "schema": { "type": "string" } - } - ], + "/dop-translation/bound-projects": { + "post": { + "tags": ["Dop Translation"], + "summary": "Create a SonarQube project with the information from the provided DevOps platform project.", + "description": "Create a SonarQube project with the information from the provided DevOps platform project.\nAutoconfigure Pull-Request decoration mechanism.\nRequires the 'Create Projects' permission and setting a Personal Access Token with api/alm_integrations/set_pat for a user who will be using this endpoint\n", + "operationId": "createBoundProject", "requestBody": { "content": { - "application/merge-patch+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/DevOpsPermissionMappingUpdateRequest" + "$ref": "#/components/schemas/BoundProjectCreateRestRequest" } } }, "required": true }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionMappingsResource" + "$ref": "#/components/schemas/BoundProjectCreateRestResponse" } } } } - }, - "x-sonar-internal": "true" + } } }, - "/dop-translation/github-configurations/{id}": { - "get": { - "tags": ["github-configuration-controller"], - "summary": "Fetch a GitHub configuration", - "description": "Fetch a GitHub configuration. Requires 'Administer System' permission.\n", - "operationId": "getGithubConfiguration", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the configuration to fetch.", - "required": true, - "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GithubConfigurationResource" - } - } - } - } - }, - "x-sonar-internal": "true" - }, - "delete": { - "tags": ["github-configuration-controller"], - "summary": "Delete a GitHub configuration", - "description": "Delete a GitHub configuration.\nRequires 'Administer System' permission.\n", - "operationId": "deleteGithubConfiguration", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the configuration to delete.", - "required": true, - "schema": { "type": "string" } - } - ], - "responses": { "204": { "description": "No Content" } }, - "x-sonar-internal": "true" - }, - "patch": { - "tags": ["github-configuration-controller"], - "summary": "Update a GitHub configuration", - "description": "Update a GitHub configuration. Requires 'Administer System' permission.\n", - "operationId": "updateGithubConfiguration", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], + "/clean-code-policy/rules": { + "post": { + "tags": ["Clean Code Policy"], + "summary": "Custom rule creation", + "description": " Create a custom rule.\n Requires the 'Administer Quality Profiles' permission.\n", + "operationId": "create_6", "requestBody": { "content": { - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/GithubConfigurationUpdateRestRequest" - } + "application/json": { + "schema": { "$ref": "#/components/schemas/RuleCreateRestRequest" } } }, "required": true @@ -1289,73 +1339,80 @@ "description": "OK", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/GithubConfigurationResource" - } + "schema": { "$ref": "#/components/schemas/RuleRestResponse" } } } } }, - "x-sonar-internal": "true" + "x-internal": "true" } }, - "/clean-code-policy/mode": { + "/authorizations/groups": { "get": { - "tags": ["mode-controller"], - "summary": "Retrieve current instance Mode", - "description": "Fetch the current instance mode. Can be Multi-Quality Rules (MQR) Mode or Standard Experience.\n", - "operationId": "getMode", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/ModeResource" } - } + "tags": ["Authorizations"], + "summary": "Group search", + "description": " Get the list of groups.\n The results are sorted alphabetically by group name.\n", + "operationId": "search_1", + "parameters": [ + { + "name": "managed", + "in": "query", + "description": "Return managed or non-managed groups. Only available for managed instances, throws for non-managed instances", + "required": false, + "schema": { + "type": "boolean", + "description": "Return managed or non-managed groups. Only available for managed instances, throws for non-managed instances" } - } - }, - "x-sonar-internal": "true" - }, - "patch": { - "tags": ["mode-controller"], - "summary": "Update current instance Mode", - "description": "Update the current instance mode. Can be Multi-Quality Rules (MQR) Mode or Standard Experience.\nRequires 'Administer System' permission.\n", - "operationId": "patchMode", - "requestBody": { - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/ModeResource" } + }, + { + "name": "q", + "in": "query", + "description": "Filter on name.\nThis parameter performs a partial match (contains), it is case insensitive.", + "required": false, + "schema": { + "type": "string", + "description": "Filter on name.\nThis parameter performs a partial match (contains), it is case insensitive." } }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/ModeResource" } - } + { + "name": "userId", + "in": "query", + "description": "Filter groups containing the user. Only available for system administrators. Using != operator will search for groups without the user.", + "required": false, + "schema": { + "type": "string", + "description": "Filter groups containing the user. Only available for system administrators. Using != operator will search for groups without the user.", + "internal": "true" + }, + "x-internal": "true" + }, + { + "name": "pageSize", + "in": "query", + "description": "Number of results per page. A value of 0 will only return the pagination information.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 50, + "description": "Number of results per page. A value of 0 will only return the pagination information.", + "maximum": 500, + "minimum": 0 } - } - }, - "x-sonar-internal": "true" - } - }, - "/authorizations/groups/{id}": { - "get": { - "tags": ["group-controller"], - "summary": "Fetch a single group", - "description": "Fetch a single group.", - "operationId": "fetchGroup", - "parameters": [ + }, { - "name": "id", - "in": "path", - "description": "The id of the group to fetch.", - "required": true, - "schema": { "type": "string" } + "name": "pageIndex", + "in": "query", + "description": "1-based page index", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1, + "description": "1-based page index", + "exclusiveMinimum": 0, + "minimum": 1 + } } ], "responses": { @@ -1363,54 +1420,32 @@ "description": "OK", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/GroupRestResponse" } + "schema": { + "$ref": "#/components/schemas/GroupsSearchRestResponse" + } } } } } }, - "delete": { - "tags": ["group-controller"], - "summary": "Deletes a group", - "description": "Deletes a group.", - "operationId": "deleteGroup", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The ID of the group to delete.", - "required": true, - "schema": { "type": "string" } - } - ], - "responses": { "204": { "description": "No Content" } } - }, - "patch": { - "tags": ["group-controller"], - "summary": "Update a group", - "description": "Update a group name or description.\n", - "operationId": "updateGroup", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], + "post": { + "tags": ["Authorizations"], + "summary": "Create a new group", + "description": "Create a new group.", + "operationId": "create_7", "requestBody": { "content": { - "application/merge-patch+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/GroupUpdateRestRequest" + "$ref": "#/components/schemas/GroupCreateRestRequest" } } }, "required": true }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupRestResponse" } @@ -1420,216 +1455,31 @@ } } }, - "/system/migrations-status": { - "get": { - "tags": ["database-migrations-controller"], - "summary": "Gets the status of ongoing database migrations, if any", - "description": "Return the detailed status of ongoing database migrations including starting date. If no migration is ongoing or needed it is still possible to call this endpoint and receive appropriate information.", - "operationId": "getStatus", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DatabaseMigrationsResponse" - } - } - } - } - } - } - }, - "/system/liveness": { - "get": { - "tags": ["liveness-controller"], - "summary": "Provide liveness of SonarQube, meant to be used as a liveness probe on Kubernetes", - "description": " Require 'Administer System' permission or authentication with passcode.\n\n When SonarQube is fully started, liveness check for database connectivity, Compute Engine status, and, except for DataCenter Edition, if ElasticSearch is Green or Yellow.\n\n When SonarQube is on Safe Mode (for example when a database migration is running), liveness check only for database connectivity\n", - "operationId": "livenessCheck", - "parameters": [ - { - "name": "X-Sonar-Passcode", - "in": "header", - "description": "Passcode can be provided, see SonarQube documentation", - "required": false, - "schema": { "type": "string" } - } - ], - "responses": { - "204": { "description": "This SonarQube node is alive" }, - "default": { - "description": "This SonarQube node is not alive and should be rescheduled" - } - } - } - }, - "/system/health": { - "get": { - "tags": ["health-controller"], - "operationId": "getHealth", - "parameters": [ - { - "name": "X-Sonar-Passcode", - "in": "header", - "required": false, - "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/Health" } - } - } - } - } - } - }, - "/sca/sbom-reports": { - "get": { - "tags": ["k"], - "summary": "Get a software bill of materials (SBOM) report", - "description": "Return a report based on the dependencies in this project's branch, using\nthe type parameter and Accept header to select the report to generate.\n\nRight now, the available reports have specialized MIME types that\ngo along with those formats:\n\n* CycloneDX: https://cyclonedx.org/specification/overview/\n * JSON & XML\n* SPDX 2.3: https://spdx.github.io/spdx-spec/v2.3/\n * JSON & XML\n\nTheoretically you could send just the MIME type for the format you wanted\nas the Accept header and get that report. However, there may be other\nformats that don't have a specific MIME type attached -- think two\ndifferent flavors of a CSV report, for example. In that case, we still\nneed a specific report type parameter to help differentiate more.\n\nThis is an internal API and is subject to change without notice.\n", - "operationId": "generateReport", - "parameters": [ - { - "name": "projectKey", - "in": "query", - "description": "Key of the project to build report for", - "required": true, - "schema": { - "type": "string", - "description": "Key of the project to build report for" - } - }, - { - "name": "branchKey", - "in": "query", - "description": "Key of the branch to build report for", - "required": false, - "schema": { - "type": "string", - "description": "Key of the branch to build report for" - } - }, - { - "name": "type", - "in": "query", - "description": "Type of report to generate.\nThe `Accept` header sent by the client determines the format of the report.\nCurrently supported: cyclonedx (application/vnd.cyclonedx+json), cyclonedx (application/vnd.cyclonedx+xml),\nspdx (application/vnd.spdx+json), spdx (application/vnd.spdx+xml)\n", - "required": true, - "schema": { - "type": "string", - "description": "Type of report to generate.\nThe `Accept` header sent by the client determines the format of the report.\nCurrently supported: cyclonedx (application/vnd.cyclonedx+json), cyclonedx (application/vnd.cyclonedx+xml),\nspdx (application/vnd.spdx+json), spdx (application/vnd.spdx+xml)\n", - "enum": ["cyclonedx", "spdx_23"] - } - } - ], - "responses": { - "200": { - "description": "The desired report in the desired output format", - "content": { - "application/vnd.cyclonedx+json": { - "schema": { "type": "string" } - }, - "application/vnd.cyclonedx+xml": { - "schema": { "type": "string" } - }, - "application/spdx+json": { "schema": { "type": "string" } }, - "application/spdx+xml": { "schema": { "type": "string" } } - } - } - }, - "x-sonar-internal": "true" - } - }, - "/sca/releases": { + "/authorizations/group-memberships": { "get": { - "tags": ["k"], - "summary": "Search for releases", - "description": "Search for package releases that appear in the analyzed project,\nas determined by software composition analysis.\n\nThis endpoint returns one result for each release,\nrather than one result for each time a release is pulled in.\nEach result may appear in multiple files or scopes that\nall use the same version of the affected package.\n\nThe search results do not include full details on the dependencies\nthat pull in each release, only a summary. To get the full dependency\ndetails, use the /releases/{key} endpoint for a single release.\n\nIn the terminology of this endpoint, a \"release\" is a version of\na package like \"lodash 1.2.3\", and a \"dependency\" is a specific file\nand scope that pulls in the release such as \"subproject/pom.xml test\".\nEach returned release may have multiple dependencies.\n\nThis is an internal API and is subject to change without notice.\n", - "operationId": "search_3", + "tags": ["Authorizations"], + "summary": "Search across group memberships", + "description": " Get the list of groups and members matching the query.\n", + "operationId": "search_2", "parameters": [ { - "name": "projectKey", - "in": "query", - "description": "Key of the project to fetch all dependencies from", - "required": true, - "schema": { - "type": "string", - "description": "Key of the project to fetch all dependencies from" - } - }, - { - "name": "branchKey", - "in": "query", - "description": "Key of the Branch to fetch all dependencies from. If not provided, the default branch will be used unless a Pull Request Key is provided.", - "required": false, - "schema": { - "type": "string", - "description": "Key of the Branch to fetch all dependencies from. If not provided, the default branch will be used unless a Pull Request Key is provided." - } - }, - { - "name": "pullRequestKey", + "name": "userId", "in": "query", - "description": "Key of the Pull Request to fetch all dependencies from.", + "description": "ID of the user for which to search groups. If not set, all groups are returned.", "required": false, "schema": { "type": "string", - "description": "Key of the Pull Request to fetch all dependencies from." - } - }, - { - "name": "direct", - "in": "query", - "description": "Filter on the direct attribute. TRUE stands for direct dependencies, FALSE for transitive dependencies.", - "required": false, - "schema": { - "type": "boolean", - "description": "Filter on the direct attribute. TRUE stands for direct dependencies, FALSE for transitive dependencies." - } - }, - { - "name": "newInPullRequest", - "in": "query", - "description": "Filter on the newInPullRequest attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target.", - "required": false, - "schema": { - "type": "boolean", - "description": "Filter on the newInPullRequest attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target." - } - }, - { - "name": "productionScope", - "in": "query", - "description": "Filter on the productionScope attribute. TRUE stands for only production dependencies, FALSE for only not in production. If a release is both, it matches both.", - "required": false, - "schema": { - "type": "boolean", - "description": "Filter on the productionScope attribute. TRUE stands for only production dependencies, FALSE for only not in production. If a release is both, it matches both." - } - }, - { - "name": "packageManagers", - "in": "query", - "required": false, - "schema": { - "type": "array", - "description": "Filter on the package manager", - "items": { "type": "string" }, - "uniqueItems": true + "description": "ID of the user for which to search groups. If not set, all groups are returned." } }, { - "name": "q", + "name": "groupId", "in": "query", - "description": "Filter on the package name. This parameter performs a partial match (contains and case insensitive) on the package name.", + "description": "ID of the group for which to search members. If not set, all groups are returned.", "required": false, "schema": { "type": "string", - "description": "Filter on the package name. This parameter performs a partial match (contains and case insensitive) on the package name." + "description": "ID of the group for which to search members. If not set, all groups are returned." } }, { @@ -1656,6 +1506,7 @@ "format": "int32", "default": 1, "description": "1-based page index", + "exclusiveMinimum": 0, "minimum": 1 } } @@ -1666,37 +1517,84 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReleasesSearchRestResponse" + "$ref": "#/components/schemas/GroupsMembershipSearchRestResponse" } } } } + } + }, + "post": { + "tags": ["Authorizations"], + "summary": "Add a group membership", + "description": "Add a user to a group.", + "operationId": "create_8", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupMembershipCreateRestRequest" + } + } + }, + "required": true }, - "x-sonar-internal": "true" + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupMembershipRestResponse" + } + } + } + } + } } }, - "/sca/releases/{key}": { + "/atlassian/application-configuration": { "get": { - "tags": ["k"], - "summary": "Get a single release", - "description": "Fetch a single release by its key.\n\nThis single-release endpoint lists full details for all dependencies\nthat mention the release.\n\nIn the terminology of this endpoint, a \"release\" is a version of\na package like \"lodash 1.2.3\", and a \"dependency\" is a specific file\nand scope that pulls in the release such as \"subproject/pom.xml test\".\nEach returned release may have multiple dependencies.\n\nThis is an internal API and is subject to change without notice.\n", - "operationId": "fetchRelease", - "parameters": [ - { - "name": "key", - "in": "path", - "description": "The key of the release to fetch.", - "required": true, - "schema": { "type": "string" } + "tags": ["Atlassian"], + "summary": "Fetch the Atlassian Authentication details if they exist", + "description": "Fetch the Atlassian Authentication details if they exist.\nSpecifically, only the client ID is returned for security purposes.\n", + "operationId": "鲥_8", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AtlassianAuthenticationDetailsResultResource" + } + } + } } - ], + }, + "x-sonar-internal": "true" + }, + "post": { + "tags": ["Atlassian"], + "summary": "Create/Update the Atlassian Authentication details", + "description": "Create/Update the Atlassian Authentication details.\n", + "operationId": "鲥_9", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AtlassianAuthenticationDetailsResource" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReleaseDetailResource" + "$ref": "#/components/schemas/AtlassianAuthenticationDetailsResultResource" } } } @@ -1705,171 +1603,19 @@ "x-sonar-internal": "true" } }, - "/sca/issues-releases": { + "/users-management/users/{id}": { "get": { - "tags": ["k"], - "summary": "Search for issue-release pairs", - "description": "Search for software composition analysis issues (dependency risks)\nof a project, paired with releases that appear in the analyzed\nproject.\n\nThis endpoint returns one result for each (issue,release) pair,\nrather than one result for each distinct issue. So for example\nif a library uses two different versions of a package and\nboth versions are affected by the same vulnerability, you will\nget two results not one.\n\nHowever each result may appear in multiple files or scopes that\nall use the same version of the affected package.\n\nIn the terminology of this endpoint, a \"release\" is a version of\na package like \"lodash 1.2.3\", an \"issue\" is a problem such as\n\"CVE-1234\", and a \"dependency\" is a specific file and scope that\npulls in the release such as \"subproject/pom.xml test\".\n\nThe dependencyRisks attribute in the result is deprecated; please\nuse issuesReleases instead.\n\nThis is an internal API and is subject to change without notice.\n", - "operationId": "search_4", + "tags": ["Users Management"], + "summary": "Fetch a single user", + "description": "Fetch a single user.\nThe following fields are only returned when user has Administer System permission or for logged-in in user :\n 'email'\n 'externalIdentity'\n 'externalProvider'\n 'groups'\n 'lastConnectionDate'\n 'sonarLintLastConnectionDate'\n 'tokensCount'\n Field 'sonarqubeLastConnectionDate' is only updated every hour, so it may not be accurate, for instance when a user authenticates many times in less than one hour.\n", + "operationId": "fetchUser", "parameters": [ { - "name": "projectKey", - "in": "query", - "description": "Key of the project to fetch all dependency risks from", + "name": "id", + "in": "path", + "description": "The id of the user to fetch.", "required": true, - "schema": { - "type": "string", - "description": "Key of the project to fetch all dependency risks from" - } - }, - { - "name": "branchKey", - "in": "query", - "description": "Key of the branch to fetch all dependency risks from. If not provided, the default branch will be used unless a Pull Request Key is provided.", - "required": false, - "schema": { - "type": "string", - "description": "Key of the branch to fetch all dependency risks from. If not provided, the default branch will be used unless a Pull Request Key is provided." - } - }, - { - "name": "pullRequestKey", - "in": "query", - "description": "Key of the Pull Request to fetch all dependency risks from.", - "required": false, - "schema": { - "type": "string", - "description": "Key of the Pull Request to fetch all dependency risks from." - } - }, - { - "name": "packageManagers", - "in": "query", - "required": false, - "schema": { - "type": "array", - "description": "Filter on the package manager", - "items": { "type": "string" }, - "uniqueItems": true - } - }, - { - "name": "types", - "in": "query", - "required": false, - "schema": { - "type": "array", - "description": "Filter on the issue type", - "items": { "type": "string" }, - "uniqueItems": true - } - }, - { - "name": "severities", - "in": "query", - "required": false, - "schema": { - "type": "array", - "description": "Filter on the severity", - "items": { "type": "string" }, - "uniqueItems": true - } - }, - { - "name": "packageName", - "in": "query", - "description": "Filter on the package name This parameter performs a partial match (contains and case insensitive) on the package name.", - "required": false, - "schema": { - "type": "string", - "description": "Filter on the package name This parameter performs a partial match (contains and case insensitive) on the package name." - } - }, - { - "name": "vulnerabilityId", - "in": "query", - "description": "Filter on the vulnerability IDThis parameter performs a partial match (contains and case insensitive) on the vulnerability ID.", - "required": false, - "schema": { - "type": "string", - "description": "Filter on the vulnerability IDThis parameter performs a partial match (contains and case insensitive) on the vulnerability ID." - } - }, - { - "name": "newInPullRequest", - "in": "query", - "description": "Filter on the newInPullRequest attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target.", - "required": false, - "schema": { - "type": "boolean", - "description": "Filter on the newInPullRequest attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target." - } - }, - { - "name": "direct", - "in": "query", - "description": "Filter on the direct attribute. TRUE stands for only direct dependencies, FALSE for only transitive. If a release is both, it matches both.", - "required": false, - "schema": { - "type": "boolean", - "description": "Filter on the direct attribute. TRUE stands for only direct dependencies, FALSE for only transitive. If a release is both, it matches both." - } - }, - { - "name": "productionScope", - "in": "query", - "description": "Filter on the productionScope attribute. TRUE stands for only production dependencies, FALSE for only not in production. If a release is both, it matches both.", - "required": false, - "schema": { - "type": "boolean", - "description": "Filter on the productionScope attribute. TRUE stands for only production dependencies, FALSE for only not in production. If a release is both, it matches both." - } - }, - { - "name": "sort", - "in": "query", - "description": "Sort order", - "required": false, - "schema": { - "type": "string", - "default": "+identity", - "description": "Sort order", - "enum": [ - "+identity", - "-identity", - "+severity", - "-severity", - "+cvssScore", - "-cvssScore" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Number of results per page. A value of 0 will only return the pagination information.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 50, - "description": "Number of results per page. A value of 0 will only return the pagination information.", - "maximum": 500, - "minimum": 0 - } - }, - { - "name": "pageIndex", - "in": "query", - "description": "1-based page index", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 1, - "description": "1-based page index", - "minimum": 1 - } + "schema": { "type": "string" } } ], "responses": { @@ -1878,77 +1624,84 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DependencyRisksSearchRestResponse" + "$ref": "#/components/schemas/UserRestResponseForAdmins" } } } } - }, - "x-sonar-internal": "true" - } - }, - "/sca/issues-releases/{key}": { - "get": { - "tags": ["k"], - "summary": "Get a single issue-release pair", - "description": "Fetch a single (issue,release) pair (dependency risk), using the key from the search endpoint.\n\nThis is an internal API and is subject to change without notice.\n", - "operationId": "fetchDependencyRisk", + } + }, + "delete": { + "tags": ["Users Management"], + "summary": "Deactivate a user", + "description": "Deactivates a user. Requires Administer System permission.", + "operationId": "deactivate", "parameters": [ { - "name": "key", + "name": "id", + "in": "path", + "description": "The ID of the user to delete.", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "anonymize", + "in": "query", + "description": "Anonymize user in addition to deactivating it.", + "required": false, + "schema": { "type": "boolean", "default": false } + } + ], + "responses": { "204": { "description": "No Content" } } + }, + "patch": { + "tags": ["Users Management"], + "summary": "Update a user", + "description": "Update users attributes.\n", + "operationId": "updateUser", + "parameters": [ + { + "name": "id", "in": "path", - "description": "The key of the issue,release pair to fetch.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/merge-patch+json": { + "schema": { "$ref": "#/components/schemas/UserUpdateRestRequest" } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DependencyRiskDetailsResource" + "$ref": "#/components/schemas/UserRestResponseForAdmins" } } } } - }, - "x-sonar-internal": "true" + } } }, - "/sca/clis": { + "/system/email-configurations/{id}": { "get": { - "tags": ["k"], - "summary": "Get available CLI downloads", - "description": "Gets the available SCA CLI downloads. The response includes metadata about each option\nsuch as the filename and operating system.\n\nThis is an internal API and is subject to change without notice.\n", - "operationId": "getScaClisMetadata", + "tags": ["System"], + "summary": "Fetch an email configuration", + "description": "Fetch a Email configuration. Requires 'Administer System' permission.\n", + "operationId": "getEmailConfiguration", "parameters": [ { - "name": "os", - "in": "query", - "description": "Filter by operating system", - "required": false, - "schema": { - "type": "string", - "description": "Filter by operating system", - "enum": ["windows", "linux", "macos"], - "example": "windows" - }, - "example": "windows" - }, - { - "name": "arch", - "in": "query", - "description": "Filter by CPU architecture", - "required": false, - "schema": { - "type": "string", - "description": "Filter by CPU architecture", - "enum": ["x64", "aarch64"], - "example": "x64" - }, - "example": "x64" + "name": "id", + "in": "path", + "description": "The id of the configuration to fetch.", + "required": true, + "schema": { "type": "string" } } ], "responses": { @@ -1957,51 +1710,61 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScaCliInfoRestResponse" - } + "$ref": "#/components/schemas/EmailConfigurationResource" } } } } }, "x-sonar-internal": "true" - } - }, - "/sca/clis/{id}": { - "get": { - "tags": ["k"], - "summary": "Get metadata for a specific CLI download", - "description": "Gets the metadata for a specific SCA CLI download. The response includes the\nfilename, SHA-256 checksum, operating system, and CPU architecture.\n\nThis is an internal API and is subject to change without notice.\n", - "operationId": "downloadScaCli", + }, + "delete": { + "tags": ["System"], + "summary": "Delete an email configuration", + "description": "Delete an email configuration.\nRequires 'Administer System' permission.\n", + "operationId": "deleteEmailConfiguration", "parameters": [ { "name": "id", "in": "path", - "description": "The ID of the SCA CLI download", + "description": "The id of the configuration to delete.", "required": true, "schema": { "type": "string" } } ], - "responses": { + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["System"], + "summary": "Update an email configuration", + "description": "Update an email configuration. Requires 'Administer System' permission.\n", + "operationId": "updateEmailConfiguration", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/EmailConfigurationUpdateRestRequest" + } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK", "content": { - "application/octet-stream": { - "schema": { - "oneOf": [ - { "$ref": "#/components/schemas/ScaCliInfoRestResponse" }, - { "type": "string", "format": "binary" } - ] - } - }, "application/json": { "schema": { - "oneOf": [ - { "$ref": "#/components/schemas/ScaCliInfoRestResponse" }, - { "type": "string", "format": "binary" } - ] + "$ref": "#/components/schemas/EmailConfigurationResource" } } } @@ -2010,154 +1773,188 @@ "x-sonar-internal": "true" } }, - "/fix-suggestions/supported-llm-providers": { + "/sca/license-profiles/{license-profile-key}": { "get": { - "tags": ["supported-llm-provider-controller"], - "summary": "Get the supported LLM providers", - "description": "Returns the LLM providers that could be used for requesting an AI fix suggestion", - "operationId": "getLlmProviders", + "tags": ["License Profiles"], + "summary": "Get the license policy for a given profile", + "description": "Get the license policy for a given profile.\n", + "operationId": "get_1", + "parameters": [ + { + "name": "license-profile-key", + "in": "path", + "description": "The license profile key.", + "required": true, + "schema": { "type": "string" } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LlmProviderResponseDto" - } + "$ref": "#/components/schemas/LicenseProfileDetailsResource" } } } } - } - } - }, - "/fix-suggestions/service-info": { - "get": { - "tags": ["service-info-controller"], - "summary": "Request status and subscription information of AI CodeFix service", - "operationId": "get", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/ServiceInfo" } + }, + "x-sonar-internal": "true" + }, + "delete": { + "tags": ["License Profiles"], + "summary": "Delete the license profile", + "description": "Delete the license profile.", + "operationId": "delete", + "parameters": [ + { + "name": "license-profile-key", + "in": "path", + "description": "The id of the license profile", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["License Profiles"], + "summary": "Update the license profile", + "description": " Update the license profile for projects to use when evaluating license issues.\n", + "operationId": "update", + "parameters": [ + { + "name": "license-profile-key", + "in": "path", + "description": "The id of the license profile", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicenseProfilesUpdateRestRequest" } } - } - } - } - }, - "/fix-suggestions/service-info/subscription-type": { - "get": { - "tags": ["service-info-controller"], - "summary": "Request subscription information of AI CodeFix service", - "operationId": "getSubscriptionType", + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriptionTypeResponse" + "$ref": "#/components/schemas/LicenseProfileResource" } } } } - } + }, + "x-sonar-internal": "true" } }, - "/fix-suggestions/issues/{issueId}": { - "get": { - "tags": ["fix-suggestion-issue-controller"], - "summary": "Fetch AI suggestion availability for the given issueId", - "description": "Requires Code Viewer permission.", - "operationId": "get_1", + "/sca/license-profiles/{license-profile-key}/licenses/{license-policy-id}": { + "patch": { + "tags": ["License Profiles"], + "summary": "Update the policy for a single license", + "description": " Update the policy for a single license in the license profile.\n", + "operationId": "patchLicense", "parameters": [ { - "name": "issueId", + "name": "license-profile-key", "in": "path", + "description": "The license profile key.", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "license-policy-id", + "in": "path", + "description": "The license ID.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicensePolicyLicenseUpdateRestRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FixSuggestionIssueResponse" + "$ref": "#/components/schemas/LicensePolicyLicenseResource" } } } } - } + }, + "x-sonar-internal": "true" } }, - "/dop-translation/project-bindings": { - "get": { - "tags": ["project-bindings-controller"], - "summary": "Search across project bindings", - "operationId": "getProjectBindingByProjectId", + "/sca/license-profiles/{license-profile-key}/categories/{category-key}": { + "patch": { + "tags": ["License Profiles"], + "summary": "Update the policy for a license category", + "description": " Update the policy for an entire category in the license profile.\n", + "operationId": "patchCategory", "parameters": [ { - "name": "repository", - "in": "query", - "description": "Filter on the repository name.\nThis parameter performs an exact, case insensitive, match.\n", - "required": false, - "schema": { - "type": "string", - "description": "Filter on the repository name.\nThis parameter performs an exact, case insensitive, match.\n" - } + "name": "license-profile-key", + "in": "path", + "description": "The license profile key.", + "required": true, + "schema": { "type": "string" } }, { - "name": "dopSettingId", - "in": "query", - "description": "Filter on the DevOps Platform setting id.", - "required": false, + "name": "category-key", + "in": "path", + "description": "The category key.", + "required": true, "schema": { "type": "string", - "description": "Filter on the DevOps Platform setting id." - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Number of results per page. A value of 0 will only return the pagination information.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 50, - "description": "Number of results per page. A value of 0 will only return the pagination information.", - "maximum": 500, - "minimum": 0 - } - }, - { - "name": "pageIndex", - "in": "query", - "description": "1-based page index", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 1, - "description": "1-based page index", - "minimum": 1 + "enum": [ + "UNKNOWN", + "COPYLEFT_WEAK", + "COPYLEFT_STRONG", + "COPYLEFT_NETWORK", + "COPYLEFT_MAXIMAL", + "PERMISSIVE_STANDARD", + "PERMISSIVE_AMATEUR" + ] } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicenseProfileCategoryUpdateRestRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectBindingsSearchRestResponse" + "$ref": "#/components/schemas/LicenseProfileCategoryResource" } } } @@ -2166,26 +1963,30 @@ "x-sonar-internal": "true" } }, - "/dop-translation/project-bindings/{id}": { - "get": { - "tags": ["project-bindings-controller"], - "summary": "Fetch a single Project Binding", - "operationId": "getProjectBinding", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the project-bindings to fetch.", - "required": true, - "schema": { "type": "string" } - } - ], + "/sca/license-profiles/assigned-projects": { + "patch": { + "tags": ["License Profiles"], + "summary": "Assign project to license profile", + "description": " Configure which license profile should be used when analyzing a project for license issues.\n", + "operationId": "update_1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignedProjectsUpdateRestRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK", + "description": "The provided project has been assigned to the license profile.", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/ProjectBinding" } + "schema": { + "$ref": "#/components/schemas/LicenseProfileResource" + } } } } @@ -2193,99 +1994,168 @@ "x-sonar-internal": "true" } }, - "/dop-translation/dop-settings": { + "/sca/issues-releases/{key}/changelog": { "get": { - "tags": ["dop-settings-controller"], - "summary": "List all DevOps Platform Integration settings", - "description": "Requires the 'Create Projects' permission ", - "operationId": "fetchAllDopSettings", + "tags": ["Issues-Releases"], + "summary": "Get the changelog for a single issue-release pair", + "description": "Get the changelog for a single (issue,release) pair (dependency risk), using the key from the search endpoint.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "getChangelog", + "parameters": [ + { + "name": "key", + "in": "path", + "description": "The key of the (issue,release) pair.", + "required": true, + "schema": { "type": "string" } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DopSettingsRestResponse" + "$ref": "#/components/schemas/IssuesReleasesChangesRestResponse" } } } } - } - } - }, - "/architecture/file-graph": { - "get": { - "tags": ["k"], - "summary": "Find the file graph for this project branch and source.", - "operationId": "踼", + }, + "x-sonar-internal": "true" + }, + "delete": { + "tags": ["Issues-Releases"], + "summary": "Delete a comment from an issue-release pair", + "description": "Delete a comment from a (issue,release) pair (dependency risk).\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "deleteComment", "parameters": [ { - "name": "projectKey", - "in": "query", - "description": "The key of the project.", - "required": true, - "schema": { "type": "string" } - }, - { - "name": "branchKey", - "in": "query", - "description": "The key of the branch.", + "name": "key", + "in": "path", + "description": "The key of the (issue,release) pair.", "required": true, "schema": { "type": "string" } }, { - "name": "source", + "name": "issueReleaseChangeKey", "in": "query", - "description": "The source that produced this graph. eg. java, python, js, etc.", + "description": "Issue release change key", "required": true, - "schema": { "type": "string" } + "schema": { + "type": "string", + "description": "Issue release change key" + } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { "schema": { "type": "string" } } - } + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Issues-Releases"], + "summary": "Update a comment on an issue-release pair", + "description": "Update a comment on a (issue,release) pair (dependency risk).\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "updateComment", + "parameters": [ + { + "name": "key", + "in": "path", + "description": "The key of the (issue,release) pair.", + "required": true, + "schema": { "type": "string" } } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueReleaseUpdateCommentRestRequest" + } + } + }, + "required": true }, + "responses": { "200": { "description": "OK" } }, "x-sonar-internal": "true" } }, - "/analysis/version": { + "/sca/feature-enablements": { "get": { - "tags": ["version-controller"], - "summary": "Server version", - "description": "Get the version of the Scanner Engine", - "operationId": "getVersion", + "tags": ["Feature Enablement"], + "summary": "Get the status of SCA feature opt-in (should only be used for the configuration UX in frontend)", + "operationId": "getFeatureEnablement", "responses": { "200": { "description": "OK", - "content": { "text/plain": { "schema": { "type": "string" } } } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeatureEnablementResource" + } + } + } } - } + }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Feature Enablement"], + "summary": "Update SCA feature opt-in (should only be used for the configuration UX in frontend)", + "operationId": "updateFeatureEnablement", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeatureEnablementRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeatureEnablementResource" + } + } + } + } + }, + "x-sonar-internal": "true" } }, - "/analysis/jres": { + "/jira/work-types": { "get": { - "tags": ["jres-controller"], - "summary": "All JREs metadata", - "description": "Get metadata of all available JREs", - "operationId": "getJresMetadata", + "tags": ["Jira"], + "summary": "Returns a list of all the available Jira work types for a specific Jira project", + "description": "Returns a list of all the available Jira work types for a specific Jira project.\nAlso checks which work types are selected for a given sonar project. Conditionally, also includes field metadata.\n", + "operationId": "鲥_10", "parameters": [ { - "name": "os", + "name": "jiraProjectKey", "in": "query", - "description": "Filter the JRE by operating system. Accepted values are 'windows', 'linux', 'macos', 'alpine' (case-insensitive), with some aliases", - "required": false, + "required": true, "schema": { "type": "string" } }, { - "name": "arch", + "name": "sonarOrganizationUuid", + "in": "query", + "required": true, + "schema": { "type": "string", "format": "uuid" } + }, + { + "name": "sonarProjectId", "in": "query", - "description": "Filter the JRE by CPU architecture. Accepted values are 'x64' and 'aarch64' (case-insensitive), with some aliases.", "required": false, "schema": { "type": "string" } + }, + { + "name": "includeFields", + "in": "query", + "required": false, + "schema": { "type": "boolean" } } ], "responses": { @@ -2296,26 +2166,125 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/JreInfoRestResponse" + "$ref": "#/components/schemas/JiraWorkTypeResultResource" } } } } } - } + }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Jira"], + "summary": "Saves the selected Jira work types for a project", + "description": "Receives a Jira project key and a list of work type and stores the work types.\n", + "operationId": "鲥_11", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JiraWorkTypesSelectionResource" + } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } }, + "x-sonar-internal": "true" } }, - "/analysis/jres/{id}": { + "/jira/organization-binding-edit": { + "patch": { + "tags": ["Jira"], + "summary": "TODO", + "description": "TODO\n", + "operationId": "鲥_12", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchJiraOrganizationBindingEditResource" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JiraOrganizationBindingResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/issues/sandbox-settings": { "get": { - "tags": ["jres-controller"], - "summary": "JRE download/metadata", - "description": "This endpoint return the JRE metadata by default. To download the JRE binary asset, set the Accept header of the request to 'application/octet-stream'.", - "operationId": "downloadJre", + "tags": ["Issues"], + "summary": "Fetch instance sandbox settings", + "description": "Fetch the current instance-level sandbox settings.\nReturns configuration including enabled status, default value, allowOverride setting, and software qualities or rule types based on current mode.\nRequires 'Administer System' permission.\n", + "operationId": "getSandboxSettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxSettingsResource" + } + } + } + } + }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Issues"], + "summary": "Update instance sandbox settings", + "description": "Update the instance-level sandbox settings.\nCannot enable sandbox without providing software qualities or rule types unless they already exist.\nWhen disabling allowOverride, all project-level software quality overrides are deleted.\nRequires 'Administer System' permission.\n", + "operationId": "patchSandboxSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxSettingsResource" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxSettingsResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/issues/sandbox-settings/{projectKey}": { + "get": { + "tags": ["Issues"], + "summary": "Fetch project sandbox settings", + "description": "Fetch the sandbox settings for a specific project.\nReturns effective configuration including enabled status, software qualities overrides, and whether settings are inherited from instance or overridden at project level.\nRequires 'Administer Project' permission.\n", + "operationId": "getProjectSandboxSettings", "parameters": [ { - "name": "id", + "name": "projectKey", "in": "path", - "description": "The ID of the JRE", "required": true, "schema": { "type": "string" } } @@ -2324,297 +2293,3030 @@ "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "oneOf": [ - { "$ref": "#/components/schemas/JreInfoRestResponse" }, - { "type": "string", "format": "binary" } - ] + "$ref": "#/components/schemas/SandboxSettingsProjectResource" } - }, + } + } + } + }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Issues"], + "summary": "Update project sandbox settings", + "description": "Update the sandbox settings for a specific project.\nThe enabled setting can be changed independently of software quality overrides.\nWhen allowOverride is disabled at instance level, software quality changes are not allowed but enabled changes are still permitted.\nSetting overridden=false removes project-level software quality overrides to inherit from instance settings.\nRequires 'Administer Project' permission and instance sandbox must be enabled.\n", + "operationId": "patchProjectSandboxSettings", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxSettingsProjectResource" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { - "oneOf": [ - { "$ref": "#/components/schemas/JreInfoRestResponse" }, - { "type": "string", "format": "binary" } - ] + "$ref": "#/components/schemas/SandboxSettingsProjectResource" } } } } - } + }, + "x-sonar-internal": "true" } }, - "/analysis/engine": { - "get": { - "tags": ["scanner-engine-controller"], - "summary": "Scanner engine download/metadata", - "description": "This endpoint return the Scanner Engine metadata by default. To download the Scanner Engine, set the Accept header of the request to 'application/octet-stream'.", - "operationId": "downloadScannerEngine", + "/integrations/integration-configurations/{id}": { + "delete": { + "tags": ["integration-configurations-controller"], + "summary": "Delete an integration configuration and all its related data.", + "description": "Requires global administrator permission.\nThis will permanently delete the integration configuration, all associated workspaces, user bindings, and subscriptions.\n", + "operationId": "delete_1", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the integration configuration", + "required": true, + "schema": { "type": "string", "format": "uuid" } + } + ], + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["integration-configurations-controller"], + "summary": "Update an integration configuration.", + "description": "Requires global administrator permission.", + "operationId": "update_2", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the integration configuration", + "required": true, + "schema": { "type": "string", "format": "uuid" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationConfigurationPatchRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "oneOf": [ - { "$ref": "#/components/schemas/EngineInfoRestResponse" }, - { "type": "string", "format": "binary" } - ] + "$ref": "#/components/schemas/IntegrationConfigurationResponse" } - }, + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/fix-suggestions/feature-enablements": { + "get": { + "tags": ["Fix Suggestions"], + "summary": "Fetch the Ai CodeFix feature enablement configurations", + "operationId": "getFeatureEnablement_1", + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { - "oneOf": [ - { "$ref": "#/components/schemas/EngineInfoRestResponse" }, - { "type": "string", "format": "binary" } - ] + "$ref": "#/components/schemas/FeatureEnablementResponse" } } } } + }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Fix Suggestions"], + "summary": "Enable/Disable the AI CodeFix feature at the instance or project level", + "operationId": "updateFeatureEnablement_1", + "requestBody": { + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/FeatureEnablementRequest" + } + } + }, + "required": true + }, + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + } + }, + "/entitlements/license": { + "get": { + "tags": ["Entitlements"], + "summary": "Returns information about the license", + "description": " Returns information about the current license.\n Requires 'Administer System' permission.\n", + "operationId": "getLicense", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/LicenseRestResponse" } + } + } + } + }, + "x-sonar-internal": "true" + }, + "delete": { + "tags": ["Entitlements"], + "summary": "Deletes the existing license", + "description": " Deletes the license. Both license keys received from Sonar and from 3rd party system can be removed.\n Requires 'Administer System' permission.\n", + "operationId": "deleteLicense", + "responses": { "200": { "description": "OK" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Entitlements"], + "summary": "Refreshes the existing license", + "description": " Fetches the latest information about the license and updates it on the SonarQube Server instance.\n Requires 'Administer System' permission.\n", + "operationId": "refreshLicense", + "responses": { "200": { "description": "OK" } }, + "x-sonar-internal": "true" + } + }, + "/dop-translation/gitlab-permission-mappings/{role}": { + "delete": { + "tags": ["Dop Translation"], + "summary": "Delete a single permission mappings", + "description": "Requires 'Administer System' permission.", + "operationId": "deleteMapping", + "parameters": [ + { + "name": "role", + "in": "path", + "description": "The name of the role to delete", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Dop Translation"], + "summary": "Update a single permission mapping", + "description": "Requires 'Administer System' permission.", + "operationId": "updateMapping", + "parameters": [ + { + "name": "role", + "in": "path", + "description": "The name of the role to update", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/DevOpsPermissionMappingUpdateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionMappingsResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/dop-translation/gitlab-configurations/{id}": { + "get": { + "tags": ["Dop Translation"], + "summary": "Fetch a GitLab configuration", + "description": "Fetch a GitLab configuration. Requires 'Administer System' permission.\n", + "operationId": "getGitlabConfiguration", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the configuration to fetch.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitlabConfigurationResource" + } + } + } + } + }, + "x-sonar-internal": "true" + }, + "delete": { + "tags": ["Dop Translation"], + "summary": "Delete a GitLab configuration", + "description": "Delete a GitLab configuration.\nRequires 'Administer System' permission.\n", + "operationId": "deleteGitlabConfiguration", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the configuration to delete.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Dop Translation"], + "summary": "Update a Gitlab configuration", + "description": "Update a Gitlab configuration. Requires 'Administer System' permission.\n", + "operationId": "updateGitlabConfiguration", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/GitlabConfigurationUpdateRestRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitlabConfigurationResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/dop-translation/github-permission-mappings/{role}": { + "delete": { + "tags": ["Dop Translation"], + "summary": "Delete a single permission mappings", + "description": "Requires 'Administer System' permission.", + "operationId": "deleteMapping_1", + "parameters": [ + { + "name": "role", + "in": "path", + "description": "The name of the role to delete", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Dop Translation"], + "summary": "Update a single permission mapping", + "description": "Requires 'Administer System' permission.", + "operationId": "updateMapping_1", + "parameters": [ + { + "name": "role", + "in": "path", + "description": "The name of the role to update", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/DevOpsPermissionMappingUpdateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionMappingsResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/dop-translation/github-configurations/{id}": { + "get": { + "tags": ["Dop Translation"], + "summary": "Fetch a GitHub configuration", + "description": "Fetch a GitHub configuration. Requires 'Administer System' permission.\n", + "operationId": "getGithubConfiguration", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the configuration to fetch.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GithubConfigurationResource" + } + } + } + } + }, + "x-sonar-internal": "true" + }, + "delete": { + "tags": ["Dop Translation"], + "summary": "Delete a GitHub configuration", + "description": "Delete a GitHub configuration.\nRequires 'Administer System' permission.\n", + "operationId": "deleteGithubConfiguration", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the configuration to delete.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Dop Translation"], + "summary": "Update a GitHub configuration", + "description": "Update a GitHub configuration. Requires 'Administer System' permission.\n", + "operationId": "updateGithubConfiguration", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/GithubConfigurationUpdateRestRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GithubConfigurationResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/clean-code-policy/mode": { + "get": { + "tags": ["Clean Code Policy"], + "summary": "Retrieve current instance Mode", + "description": "Fetch the current instance mode. Can be Multi-Quality Rules (MQR) Mode or Standard Experience.\n", + "operationId": "getMode", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ModeResource" } + } + } + } + }, + "x-sonar-internal": "true" + }, + "patch": { + "tags": ["Clean Code Policy"], + "summary": "Update current instance Mode", + "description": "Update the current instance mode. Can be Multi-Quality Rules (MQR) Mode or Standard Experience.\nRequires 'Administer System' permission.\n", + "operationId": "patchMode", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ModeResource" } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ModeResource" } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/authorizations/groups/{id}": { + "get": { + "tags": ["Authorizations"], + "summary": "Fetch a single group", + "description": "Fetch a single group.", + "operationId": "fetchGroup", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the group to fetch.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GroupRestResponse" } + } + } + } + } + }, + "delete": { + "tags": ["Authorizations"], + "summary": "Deletes a group", + "description": "Deletes a group.", + "operationId": "deleteGroup", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The ID of the group to delete.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "No Content" } } + }, + "patch": { + "tags": ["Authorizations"], + "summary": "Update a group", + "description": "Update a group name or description.\n", + "operationId": "updateGroup", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/GroupUpdateRestRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GroupRestResponse" } + } + } + } + } + } + }, + "/system/migrations-status": { + "get": { + "tags": ["System"], + "summary": "Gets the status of ongoing database migrations, if any", + "description": "Return the detailed status of ongoing database migrations including starting date. If no migration is ongoing or needed it is still possible to call this endpoint and receive appropriate information.", + "operationId": "getStatus", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatabaseMigrationsResponse" + } + } + } + } + } + } + }, + "/system/liveness": { + "get": { + "tags": ["System"], + "summary": "Provide liveness of SonarQube, meant to be used as a liveness probe on Kubernetes", + "description": " Require 'Administer System' permission or authentication with passcode.\n\n When SonarQube is fully started, liveness check for database connectivity, Compute Engine status, and, except for DataCenter Edition, if ElasticSearch is Green or Yellow.\n\n When SonarQube is on Safe Mode (for example when a database migration is running), liveness check only for database connectivity\n", + "operationId": "livenessCheck", + "parameters": [ + { + "name": "X-Sonar-Passcode", + "in": "header", + "description": "Passcode can be provided, see SonarQube documentation", + "required": false, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "This SonarQube node is alive" }, + "default": { + "description": "This SonarQube node is not alive and should be rescheduled" + } + } + } + }, + "/system/health": { + "get": { + "tags": ["System"], + "operationId": "getHealth", + "parameters": [ + { + "name": "X-Sonar-Passcode", + "in": "header", + "required": false, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/Health" } + } + } + } + } + } + }, + "/software-quality-reports/accessibility-reports": { + "get": { + "tags": ["software-quality-reports-controller"], + "summary": "Get accessibility report", + "description": "Get the accessibility report for a project branch.", + "operationId": "鲥_13", + "parameters": [ + { + "name": "branchKey", + "in": "query", + "required": false, + "schema": { "type": "string" } + }, + { + "name": "projectKey", + "in": "query", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "standard", + "in": "query", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "version", + "in": "query", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAccessibilityReportResponse" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/self-test": { + "get": { + "tags": ["Self Test"], + "summary": "Run a self test", + "description": "Run a self test that the dependency analysis (SCA) feature is enabled and\nable to reach the cloud services it relies on.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "performSelfTest", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SelfTestResponse" } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/self-test/spring-configuration": { + "get": { + "tags": ["Self Test"], + "summary": "Run a self test that Spring is configured as expected", + "description": "Run a self test that Spring is set up and working as we expect.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "performSpringConfigurationSelfTest", + "parameters": [ + { + "name": "selfTestName", + "in": "query", + "required": true, + "schema": { "type": "string", "minLength": 1 } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SelfTestSpringConfigurationResponse" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/sbom-reports": { + "get": { + "tags": ["SBOM Reports"], + "summary": "Get a software bill of materials (SBOM) report", + "description": "Return a report based on the dependencies in this component's branch, using\nthe type parameter and Accept header to select the report to generate.\n\nRight now, the available reports have specialized MIME types that\ngo along with those formats:\n\n* CycloneDX: https://cyclonedx.org/specification/overview/\n * JSON & XML\n* SPDX 2.3: https://spdx.github.io/spdx-spec/v2.3/\n * JSON & XML\n* SPDX 3.0: https://spdx.github.io/spdx-spec/v3.0.1/\n * JSON\n", + "operationId": "generateReport", + "parameters": [ + { + "name": "component", + "in": "query", + "description": "Key of the component (project, application, portfolio) to build report for", + "required": true, + "schema": { + "type": "string", + "description": "Key of the component (project, application, portfolio) to build report for" + } + }, + { + "name": "branch", + "in": "query", + "description": "Key of the branch to build report for", + "required": false, + "schema": { + "type": "string", + "description": "Key of the branch to build report for" + } + }, + { + "name": "type", + "in": "query", + "description": "Type of report to generate.\nThe `Accept` header sent by the client determines the format of the report.\nCurrently supported: cyclonedx (application/vnd.cyclonedx+json), cyclonedx (application/vnd.cyclonedx+xml),\nspdx_23 (application/spdx+json), spdx_23 (application/spdx+xml),\nspdx_30 (application/spdx+json)\n", + "required": true, + "schema": { + "type": "string", + "description": "Type of report to generate.\nThe `Accept` header sent by the client determines the format of the report.\nCurrently supported: cyclonedx (application/vnd.cyclonedx+json), cyclonedx (application/vnd.cyclonedx+xml),\nspdx_23 (application/spdx+json), spdx_23 (application/spdx+xml),\nspdx_30 (application/spdx+json)\n", + "enum": ["cyclonedx", "spdx_23", "spdx_30"] + } + } + ], + "responses": { + "200": { + "description": "The desired report in the desired output format", + "content": { + "application/vnd.cyclonedx+json": { + "schema": { "type": "string" } + }, + "application/vnd.cyclonedx+xml": { + "schema": { "type": "string" } + }, + "application/spdx+json": { "schema": { "type": "string" } }, + "application/spdx+xml": { "schema": { "type": "string" } } + } + } + }, + "x-sonar-public": "true" + } + }, + "/sca/risk-reports": { + "get": { + "tags": ["Risk Reports"], + "summary": "Get a report for all the current SCA dependency risks for a given component and branch", + "description": "Returns list of all risks for a given component and branch. CSV format is available by setting `Accept: text/csv` in your request headers.\n", + "operationId": "getReport", + "parameters": [ + { + "name": "component", + "in": "query", + "description": "Key of the component (project, application, portfolio) to build report for", + "required": true, + "schema": { + "type": "string", + "description": "Key of the component (project, application, portfolio) to build report for" + } + }, + { + "name": "branch", + "in": "query", + "description": "Key of the branch to build report for", + "required": false, + "schema": { + "type": "string", + "description": "Key of the branch to build report for" + } + }, + { + "name": "riskType", + "in": "query", + "description": "Type of risk to filter the report by. If not provided, all risks types are included.", + "required": false, + "schema": { + "type": "string", + "description": "Type of risk to filter the report by. If not provided, all risks types are included.", + "enum": ["VULNERABILITY", "PROHIBITED_LICENSE"] + } + } + ], + "responses": { + "200": { + "description": "The report in the desired output format", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/RiskReportItem" } + } + }, + "text/csv": { "schema": { "type": "string" } } + } + } + }, + "x-sonar-public": "true" + } + }, + "/sca/releases": { + "get": { + "tags": ["Releases"], + "summary": "Search for releases", + "description": "Search for package releases that appear in the analyzed project,\napplication, or portfolio, as determined by software composition analysis.\n\nThis endpoint returns one result for each release,\nrather than one result for each time a release is pulled in.\nEach result may appear in multiple files or scopes that\nall use the same version of the affected package.\n\nThe search results do not include full details on the dependencies\nthat pull in each release, only a summary. To get the full dependency\ndetails, use the /releases/{key} endpoint for a single release.\n\nIn the terminology of this endpoint, a \"release\" is a version of\na package like \"lodash 1.2.3\", and a \"dependency\" is a specific file\nand scope that pulls in the release such as \"subproject/pom.xml test\".\nEach returned release may have multiple dependencies.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "search_3", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "Key of the component (project, application, or portfolio) to fetch all dependencies from", + "required": true, + "schema": { + "type": "string", + "description": "Key of the component (project, application, or portfolio) to fetch all dependencies from" + } + }, + { + "name": "branchKey", + "in": "query", + "description": "Key of the branch to fetch all dependencies from. If not provided, the default branch will be used unless a pull request key is provided.", + "required": false, + "schema": { + "type": "string", + "description": "Key of the branch to fetch all dependencies from. If not provided, the default branch will be used unless a pull request key is provided." + } + }, + { + "name": "pullRequestKey", + "in": "query", + "description": "Key of the pull request to fetch all dependencies from.", + "required": false, + "schema": { + "type": "string", + "description": "Key of the pull request to fetch all dependencies from." + } + }, + { + "name": "direct", + "in": "query", + "description": "Filter on the direct attribute. TRUE stands for direct dependencies, FALSE for transitive dependencies.", + "required": false, + "schema": { + "type": "boolean", + "description": "Filter on the direct attribute. TRUE stands for direct dependencies, FALSE for transitive dependencies." + } + }, + { + "name": "newlyIntroduced", + "in": "query", + "description": "Filter on the newlyIntroduced attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target.", + "required": false, + "schema": { + "type": "boolean", + "description": "Filter on the newlyIntroduced attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target." + } + }, + { + "name": "productionScope", + "in": "query", + "description": "Filter on the productionScope attribute. TRUE stands for only production dependencies, FALSE for only not in production. If a release is both, it matches both.", + "required": false, + "schema": { + "type": "boolean", + "description": "Filter on the productionScope attribute. TRUE stands for only production dependencies, FALSE for only not in production. If a release is both, it matches both." + } + }, + { + "name": "packageManagers", + "in": "query", + "required": false, + "schema": { + "type": "array", + "description": "Filter on the package manager", + "items": { "type": "string" }, + "uniqueItems": true + } + }, + { + "name": "q", + "in": "query", + "description": "Filter on the package name. This parameter performs a partial match (contains and case insensitive) on the package name.", + "required": false, + "schema": { + "type": "string", + "description": "Filter on the package name. This parameter performs a partial match (contains and case insensitive) on the package name." + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Number of results per page. A value of 0 will only return the pagination information.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 50, + "description": "Number of results per page. A value of 0 will only return the pagination information.", + "maximum": 500, + "minimum": 0 + } + }, + { + "name": "pageIndex", + "in": "query", + "description": "1-based page index", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1, + "description": "1-based page index", + "exclusiveMinimum": 0, + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleasesSearchRestResponse" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/releases/{key}": { + "get": { + "tags": ["Releases"], + "summary": "Get a single release", + "description": "Fetch a single release by its key.\n\nThis single-release endpoint lists full details for all dependencies\nthat mention the release.\n\nIn the terminology of this endpoint, a \"release\" is a version of\na package like \"lodash 1.2.3\", and a \"dependency\" is a specific file\nand scope that pulls in the release such as \"subproject/pom.xml test\".\nEach returned release may have multiple dependencies.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "fetchRelease", + "parameters": [ + { + "name": "key", + "in": "path", + "description": "The key of the release to fetch.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleaseDetailResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/license-profiles/assignable-projects": { + "get": { + "tags": ["License Profiles"], + "summary": "License profile assignable projects", + "description": " List the projects that can be assigned to the license profile. Assigning the\n project to a license profile will cause that license profile to be used when\n analyzing the project for license issues.\n", + "operationId": "index_1", + "parameters": [ + { + "name": "licenseProfileUuid", + "in": "query", + "description": "The key of the license profile whose assignable projects should be retrieved.\n", + "required": true, + "schema": { + "type": "string", + "description": "The key of the license profile whose assignable projects should be retrieved.\n" + } + }, + { + "name": "assignedToLicenseProfile", + "in": "query", + "description": " Providing this parameter filters by whether projects are assigned to the license profile or not.\n Omitting this parameter includes all projects which can be assigned to the license profile,\n regardless of whether they are already assigned to the license profile.\n", + "required": false, + "schema": { + "type": "boolean", + "description": " Providing this parameter filters by whether projects are assigned to the license profile or not.\n Omitting this parameter includes all projects which can be assigned to the license profile,\n regardless of whether they are already assigned to the license profile.\n" + } + }, + { + "name": "q", + "in": "query", + "description": " Providing this parameter performs a partial match (contains and case insensitive) on the project name.\n", + "required": false, + "schema": { + "type": "string", + "description": " Providing this parameter performs a partial match (contains and case insensitive) on the project name.\n" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Number of results per page. A value of 0 will only return the pagination information.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 50, + "description": "Number of results per page. A value of 0 will only return the pagination information.", + "maximum": 500, + "minimum": 0 + } + }, + { + "name": "pageIndex", + "in": "query", + "description": "1-based page index", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1, + "description": "1-based page index", + "exclusiveMinimum": 0, + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignableProjectsIndexRestResponse" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/issues-releases": { + "get": { + "tags": ["Issues-Releases"], + "summary": "Search for issue-release pairs", + "description": "Search for software composition analysis issues (dependency risks)\nof a project, paired with releases that appear in the analyzed\nproject, application, or portfolio.\n\nThis endpoint returns one result for each (issue,release) pair,\nrather than one result for each distinct issue. So for example\nif a library uses two different versions of a package and\nboth versions are affected by the same vulnerability, you will\nget two results not one.\n\nHowever each result may appear in multiple files or scopes that\nall use the same version of the affected package.\n\nIn the terminology of this endpoint, a \"release\" is a version of\na package like \"lodash 1.2.3\", an \"issue\" is a problem such as\n\"CVE-1234\", and a \"dependency\" is a specific file and scope that\npulls in the release such as \"subproject/pom.xml test\".\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "search_4", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "Key of the component (project, application, portfolio) to fetch all dependency risks from.", + "required": true, + "schema": { + "type": "string", + "description": "Key of the component (project, application, portfolio) to fetch all dependency risks from." + } + }, + { + "name": "branchKey", + "in": "query", + "description": "Key of the branch to fetch all dependency risks from. If not provided, the default branch will be used unless a pull request key is provided.", + "required": false, + "schema": { + "type": "string", + "description": "Key of the branch to fetch all dependency risks from. If not provided, the default branch will be used unless a pull request key is provided." + } + }, + { + "name": "pullRequestKey", + "in": "query", + "description": "Key of the pull request to fetch all dependency risks from.", + "required": false, + "schema": { + "type": "string", + "description": "Key of the pull request to fetch all dependency risks from." + } + }, + { + "name": "sort", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "default": "+identity", + "description": "Sort order", + "enum": [ + "+identity", + "-identity", + "+severity", + "-severity", + "+cvssScore", + "-cvssScore" + ] + } + }, + { + "name": "packageManagers", + "in": "query", + "required": false, + "schema": { + "type": "array", + "description": "Filter on the package manager", + "items": { "type": "string" }, + "uniqueItems": true + } + }, + { + "name": "types", + "in": "query", + "required": false, + "schema": { + "type": "array", + "description": "Filter on the issue type", + "items": { "type": "string" }, + "uniqueItems": true + } + }, + { + "name": "qualities", + "in": "query", + "required": false, + "schema": { + "type": "array", + "description": "Filter on the quality domain", + "items": { "type": "string" }, + "uniqueItems": true + } + }, + { + "name": "severities", + "in": "query", + "required": false, + "schema": { + "type": "array", + "description": "Filter on the severity", + "items": { "type": "string" }, + "uniqueItems": true + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "schema": { + "type": "array", + "description": "Filter on the status", + "items": { "type": "string" }, + "uniqueItems": true + } + }, + { + "name": "packageName", + "in": "query", + "description": "Filter on the package name. This parameter performs a partial match (contains and case insensitive) on the package name.", + "required": false, + "schema": { + "type": "string", + "description": "Filter on the package name. This parameter performs a partial match (contains and case insensitive) on the package name." + } + }, + { + "name": "vulnerabilityId", + "in": "query", + "description": "Filter on the vulnerability ID. This parameter performs a partial match (contains and case insensitive) on the vulnerability ID.", + "required": false, + "schema": { + "type": "string", + "description": "Filter on the vulnerability ID. This parameter performs a partial match (contains and case insensitive) on the vulnerability ID." + } + }, + { + "name": "newlyIntroduced", + "in": "query", + "description": "Filter on the isNew attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target.", + "required": false, + "schema": { + "type": "boolean", + "description": "Filter on the isNew attribute. TRUE stands for only releases introduced vs. the target branch, FALSE for releases shared with target." + } + }, + { + "name": "direct", + "in": "query", + "description": "Filter on the direct attribute. TRUE stands for only direct dependencies, FALSE for only transitive. If a release is both, it matches both.", + "required": false, + "schema": { + "type": "boolean", + "description": "Filter on the direct attribute. TRUE stands for only direct dependencies, FALSE for only transitive. If a release is both, it matches both." + } + }, + { + "name": "productionScope", + "in": "query", + "description": "Filter on the productionScope attribute. TRUE stands for only production dependencies, FALSE for only not in production. If a release is both, it matches both.", + "required": false, + "schema": { + "type": "boolean", + "description": "Filter on the productionScope attribute. TRUE stands for only production dependencies, FALSE for only not in production. If a release is both, it matches both." + } + }, + { + "name": "assignees", + "in": "query", + "required": false, + "schema": { + "type": "array", + "description": "Filter on assignee logins.", + "items": { "type": "string" }, + "uniqueItems": true + } + }, + { + "name": "projects", + "in": "query", + "required": false, + "schema": { + "type": "array", + "description": "Filter on project keys.", + "items": { "type": "string" }, + "uniqueItems": true + } + }, + { + "name": "assigned", + "in": "query", + "description": "Filter on whether the issue is assigned or not.", + "required": false, + "schema": { + "type": "boolean", + "description": "Filter on whether the issue is assigned or not." + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Number of results per page. A value of 0 will only return the pagination information.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 50, + "description": "Number of results per page. A value of 0 will only return the pagination information.", + "maximum": 500, + "minimum": 0 + } + }, + { + "name": "pageIndex", + "in": "query", + "description": "1-based page index", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1, + "description": "1-based page index", + "exclusiveMinimum": 0, + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssuesReleasesSearchRestResponse" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/issues-releases/{key}": { + "get": { + "tags": ["Issues-Releases"], + "summary": "Get a single issue-release pair", + "description": "Fetch a single (issue,release) pair (dependency risk), using the key from the search endpoint.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "fetchIssueRelease", + "parameters": [ + { + "name": "key", + "in": "path", + "description": "The key of the issue,release pair to fetch.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueReleaseDetailsResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/issues-releases/all-assignees": { + "get": { + "tags": ["Issues-Releases"], + "summary": "Get the list of users assigned to at least one issue in a given branch", + "description": "Get the list of users assigned to at least one issue in a given branch.\n", + "operationId": "getAllAssignees", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "Key of the project to fetch all assignee users from.", + "required": true, + "schema": { + "type": "string", + "description": "Key of the project to fetch all assignee users from." + } + }, + { + "name": "branchKey", + "in": "query", + "description": "Key of the branch to fetch all assignee users from. If not provided, the default branch will be used unless a pull request key is provided.", + "required": false, + "schema": { + "type": "string", + "description": "Key of the branch to fetch all assignee users from. If not provided, the default branch will be used unless a pull request key is provided." + } + }, + { + "name": "pullRequestKey", + "in": "query", + "description": "Key of the pull request to fetch all assignee users from.", + "required": false, + "schema": { + "type": "string", + "description": "Key of the pull request to fetch all assignee users from." + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/UserResource" } + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/enabled": { + "get": { + "tags": ["SCA Enabled"], + "summary": "Get whether SCA is licensed and set up for a resource's organization or enterprise, prefer the /feature-enabled path in new code", + "operationId": "getFeatureEnabled", + "parameters": [], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScaFeatureEnabledResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/feature-enabled": { + "get": { + "tags": ["SCA Enabled"], + "summary": "Get whether SCA is licensed and set up for a resource's organization or enterprise, prefer the /feature-enabled path in new code", + "operationId": "getFeatureEnabled_1", + "parameters": [], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScaFeatureEnabledResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/clis": { + "get": { + "tags": ["SCA CLIs"], + "summary": "Get available CLI downloads", + "description": "Gets the available SCA CLI downloads. The response includes metadata about each option\nsuch as the filename and operating system.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "getScaClisMetadata", + "parameters": [ + { + "name": "os", + "in": "query", + "description": "Filter by operating system", + "required": false, + "schema": { + "type": "string", + "description": "Filter by operating system", + "enum": ["windows", "linux", "macos"], + "example": "windows" + }, + "example": "windows" + }, + { + "name": "arch", + "in": "query", + "description": "Filter by CPU architecture", + "required": false, + "schema": { + "type": "string", + "description": "Filter by CPU architecture", + "enum": ["x64", "aarch64"], + "example": "x64" + }, + "example": "x64" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScaCliInfoRestResponse" + } + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/clis/{id}": { + "get": { + "tags": ["SCA CLIs"], + "summary": "Get metadata for a specific CLI download", + "description": "Gets the metadata for a specific SCA CLI download. The response includes the\nfilename, SHA-256 checksum, operating system, and CPU architecture.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "downloadScaCli", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The ID of the SCA CLI download", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScaCliInfoRestResponse" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/sca/analyses": { + "get": { + "tags": ["Analyses"], + "summary": "Fetch analysis status for one branch", + "description": "Fetch analysis status information for a branch. If the branch has\nnever been analyzed, will return a status of 404.\n\nThis is an internal API and is subject to change without notice.\n", + "operationId": "fetchAnalysis", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "Key of the project to fetch analysis status from", + "required": true, + "schema": { + "type": "string", + "description": "Key of the project to fetch analysis status from" + } + }, + { + "name": "branchKey", + "in": "query", + "description": "Key of the branch to fetch analysis status from. If not provided, the default branch will be used unless a pull request key is provided.", + "required": false, + "schema": { + "type": "string", + "description": "Key of the branch to fetch analysis status from. If not provided, the default branch will be used unless a pull request key is provided." + } + }, + { + "name": "pullRequestKey", + "in": "query", + "description": "Key of the pull request to fetch analysis status from.", + "required": false, + "schema": { + "type": "string", + "description": "Key of the pull request to fetch analysis status from." + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AnalysisResource" } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/jira/user-actions": { + "get": { + "tags": ["Jira"], + "summary": "Returns a list of available user actions for a project", + "description": "Returns a list of available user actions for the authenticated user in the context of a specific project.\nIf the user is not authenticated, returns an empty list.\n", + "operationId": "鲥_14", + "parameters": [ + { + "name": "sonarProjectId", + "in": "query", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "type": "string" } } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/jira/projects": { + "get": { + "tags": ["Jira"], + "summary": "Returns a list of all the available Jira projects", + "description": "Returns a list of all the available Jira projects", + "operationId": "鲥_15", + "parameters": [ + { + "name": "sonarOrganizationUuid", + "in": "query", + "required": true, + "schema": { "type": "string", "format": "uuid" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JiraProjectResultResource" + } + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/jira/linked-issues-count/{sonarProjectId}": { + "get": { + "tags": ["Jira"], + "summary": "Count linked Jira issues", + "description": "Count the number of Jira issues linked to a specific Sonar project.\nAccepts only authenticated requests.\n", + "operationId": "鲥_16", + "parameters": [ + { + "name": "sonarProjectId", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LinkedIssuesCountResource" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/integrations/user-bindings/{id}": { + "get": { + "tags": ["Slack User Bindings"], + "summary": "Get Slack user binding", + "description": "Retrieves a Slack user binding by its ID. Users can only access their own bindings\nunless they have administrative privileges.\n", + "operationId": "getUserBinding", + "parameters": [], + "responses": { + "200": { + "description": "User binding retrieved successfully", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UserBindingResponse" } + } + } + }, + "401": { "description": "Authentication required" }, + "403": { "description": "Insufficient permissions" }, + "404": { "description": "User binding not found" }, + "500": { "description": "Internal server error" } + }, + "x-sonar-internal": "true" + } + }, + "/fix-suggestions/supported-rules": { + "get": { + "tags": ["Fix Suggestions"], + "summary": "Get the supported rules", + "description": "Returns the list of rules for which a fix suggestion can be generated", + "operationId": "supportedRules", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SupportedRulesDto" } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/fix-suggestions/supported-llm-providers": { + "get": { + "tags": ["Fix Suggestions"], + "summary": "Get the supported LLM providers", + "description": "Returns the LLM providers that could be used for requesting an AI fix suggestion", + "operationId": "getLlmProviders", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LlmProviderResponseDto" + } + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/fix-suggestions/service-info": { + "get": { + "tags": ["Fix Suggestions"], + "summary": "Request status of AI CodeFix service", + "operationId": "get_2", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ServiceInfo" } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/fix-suggestions/issues/{issueId}": { + "get": { + "tags": ["Fix Suggestions"], + "summary": "Fetch AI suggestion availability for the given issueId", + "description": "Requires Code Viewer permission.", + "operationId": "get_3", + "parameters": [ + { + "name": "issueId", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FixSuggestionIssueResponse" + } + } + } + } + } + } + }, + "/entitlements/purchasable-features": { + "get": { + "tags": ["Entitlements"], + "summary": "Returns a list of all available purchasable features for this edition", + "description": " Returns a list of all available purchasable features for this edition including the ones who are already purchased\n", + "operationId": "getPurchasableFeatures", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PurchasableFeatureRestResponse" + } + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/dop-translation/project-bindings": { + "get": { + "tags": ["Dop Translation"], + "summary": "Search across project bindings", + "operationId": "getProjectBindingByProjectId", + "parameters": [ + { + "name": "repository", + "in": "query", + "description": "Filter on the repository name.\nThis parameter performs an exact, case insensitive, match.\n", + "required": false, + "schema": { + "type": "string", + "description": "Filter on the repository name.\nThis parameter performs an exact, case insensitive, match.\n" + } + }, + { + "name": "dopSettingId", + "in": "query", + "description": "Filter on the DevOps Platform setting id.", + "required": false, + "schema": { + "type": "string", + "description": "Filter on the DevOps Platform setting id." + } + }, + { + "name": "repositoryUrl", + "in": "query", + "description": "Filter on the repository URL.\nThis parameter can be in different formats, the traditional URL or the git remote URL (https or ssh).\n", + "required": false, + "schema": { + "type": "string", + "description": "Filter on the repository URL.\nThis parameter can be in different formats, the traditional URL or the git remote URL (https or ssh).\n" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Number of results per page. A value of 0 will only return the pagination information.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 50, + "description": "Number of results per page. A value of 0 will only return the pagination information.", + "maximum": 500, + "minimum": 0 + } + }, + { + "name": "pageIndex", + "in": "query", + "description": "1-based page index", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1, + "description": "1-based page index", + "exclusiveMinimum": 0, + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectBindingsSearchRestResponse" + } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/dop-translation/project-bindings/{id}": { + "get": { + "tags": ["Dop Translation"], + "summary": "Fetch a single Project Binding", + "operationId": "getProjectBinding", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the project-bindings to fetch.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ProjectBinding" } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/dop-translation/dop-settings": { + "get": { + "tags": ["Dop Translation"], + "summary": "List all DevOps Platform Integration settings", + "description": "Requires the 'Create Projects' permission ", + "operationId": "fetchAllDopSettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DopSettingsRestResponse" + } + } + } + } + } + } + }, + "/atlassian/auth-url": { + "get": { + "tags": ["Atlassian"], + "summary": "Generate Jira authentication URL", + "description": "Generate the authentication URL for Jira OAuth flow.\nRequires authenticated user.\n", + "operationId": "鲥_17", + "parameters": [ + { + "name": "sonarOrganizationKey", + "in": "query", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "sonarOrganizationUuid", + "in": "query", + "required": true, + "schema": { "type": "string", "format": "uuid" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { "type": "string" } } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/architecture/graphs": { + "get": { + "tags": ["Architecture"], + "summary": "Search all current graphs available for a branch. This endpoint do not includes graph Data itself", + "operationId": "鲥_18", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The key of the project.", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "branchKey", + "in": "query", + "description": "The key of the branch.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/_a" } + } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/architecture/graphs/{id}": { + "get": { + "tags": ["Architecture"], + "summary": "Get graph data by id.", + "description": "Fetch the graph data produced by analysis.", + "operationId": "鲥_19", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "id of the graph data.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/graph+json": { "schema": { "type": "string" } } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/architecture/file-graph": { + "get": { + "tags": ["Architecture"], + "summary": "Find the file graph for this project branch and source.", + "operationId": "鲥_20", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The key of the project.", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "branchKey", + "in": "query", + "description": "The key of the branch.", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "source", + "in": "query", + "description": "The source that produced this graph. eg. java, python, js, etc.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { "type": "string" } } + } + } + }, + "x-sonar-internal": "true" + } + }, + "/analysis/version": { + "get": { + "tags": ["Analysis"], + "summary": "Server version", + "description": "Get the version of the Scanner Engine", + "operationId": "getVersion", + "responses": { + "200": { + "description": "OK", + "content": { "text/plain": { "schema": { "type": "string" } } } + } + } + } + }, + "/analysis/jres": { + "get": { + "tags": ["Analysis"], + "summary": "All JREs metadata", + "description": "Get metadata of all available JREs", + "operationId": "getJresMetadata", + "parameters": [ + { + "name": "os", + "in": "query", + "description": "Filter the JRE by operating system. Accepted values are 'windows', 'linux', 'macos', 'alpine' (case-insensitive), with some aliases", + "required": false, + "schema": { "type": "string" } + }, + { + "name": "arch", + "in": "query", + "description": "Filter the JRE by CPU architecture. Accepted values are 'x64' and 'aarch64' (case-insensitive), with some aliases.", + "required": false, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JreInfoRestResponse" + } + } + } + } + } + } + } + }, + "/analysis/jres/{id}": { + "get": { + "tags": ["Analysis"], + "summary": "JRE download/metadata", + "description": "This endpoint return the JRE metadata by default. To download the JRE binary asset, set the Accept header of the request to 'application/octet-stream'.", + "operationId": "downloadJre", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The ID of the JRE", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { "$ref": "#/components/schemas/JreInfoRestResponse" } + } + } + } + } + } + }, + "/analysis/engine": { + "get": { + "tags": ["Analysis"], + "summary": "Scanner engine download/metadata", + "description": "This endpoint return the Scanner Engine metadata by default. To download the Scanner Engine, set the Accept header of the request to 'application/octet-stream'.", + "operationId": "downloadScannerEngine", + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/EngineInfoRestResponse" + } + } + } + } + } + } + }, + "/analysis/active_rules": { + "get": { + "tags": ["Analysis"], + "summary": "Get all active rules for a specific project", + "description": "Used by the scanner-engine to get all active rules for a given project.", + "operationId": "getActiveRules", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "Project Key", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/ActiveRule" } + } + } + } + } + } + } + }, + "/sca/license-profiles/assigned-projects/{project-key}": { + "delete": { + "tags": ["License Profiles"], + "summary": "Remove the project's assignment to the license profile.", + "description": " Remove the project's assignment to the license profile. If there is a default license profile,\n it will be used to analyze license issues for this project.\n", + "operationId": "delete_2", + "parameters": [ + { + "name": "project-key", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "No Content" } }, + "x-sonar-internal": "true" + } + }, + "/authorizations/group-memberships/{id}": { + "delete": { + "tags": ["Authorizations"], + "summary": "Remove a group membership", + "description": "Remove a user from a group", + "operationId": "delete_3", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The ID of the group membership to delete.", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "No Content" } } + } + } + }, + "components": { + "schemas": { + "UserCreateRestRequest": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "description": "User email", + "maxLength": 100, + "minLength": 1 + }, + "local": { + "type": "boolean", + "default": true, + "description": "Specify if the user should be authenticated from SonarQube server or from an external authentication system. Password should not be set when local is set to false." + }, + "login": { + "type": "string", + "description": "User login", + "maxLength": 100, + "minLength": 2 + }, + "name": { + "type": "string", + "description": "User name", + "maxLength": 200, + "minLength": 0 + }, + "password": { + "type": "string", + "description": "User password. Only mandatory when creating local user, otherwise it should not be set", + "writeOnly": true + }, + "scmAccounts": { + "type": "array", + "description": "List of SCM accounts.", + "items": { "type": "string" } + } + }, + "required": ["login", "name"] + }, + "UserRestResponseForAdmins": { + "type": "object", + "properties": { + "id": { "type": "string", "readOnly": true }, + "login": { "type": "string" }, + "name": { "type": "string" }, + "email": { "type": "string" }, + "active": { "type": "boolean", "readOnly": true }, + "local": { "type": "boolean", "readOnly": true }, + "managed": { "type": "boolean", "readOnly": true }, + "externalLogin": { "type": "string" }, + "externalProvider": { "type": "string" }, + "externalId": { "type": "string" }, + "avatar": { "type": "string" }, + "sonarQubeLastConnectionDate": { "type": "string", "readOnly": true }, + "sonarLintLastConnectionDate": { "type": "string", "readOnly": true }, + "scmAccounts": { "type": "array", "items": { "type": "string" } } + } + }, + "EmailConfigurationCreateRestRequest": { + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "URL of your SMTP server", + "minLength": 1 + }, + "port": { + "type": "string", + "description": "Port of your SMTP server (usually 25, 587 or 465)", + "minLength": 1 + }, + "securityProtocol": { + "type": "string", + "description": "Security protocol used to connect to your SMTP server (SSLTLS is recommended)", + "enum": ["NONE", "SSLTLS", "STARTTLS"] + }, + "fromAddress": { + "type": "string", + "description": "Address emails will come from", + "minLength": 1 + }, + "fromName": { + "type": "string", + "description": "Name emails will come from (usually \"SonarQube\")", + "minLength": 1 + }, + "subjectPrefix": { + "type": "string", + "description": "Prefix added to email so they can be easily recognized (usually \"[SonarQube]\")", + "minLength": 1 + }, + "authMethod": { + "type": "string", + "description": "Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange", + "enum": ["BASIC", "OAUTH"] + }, + "username": { + "type": "string", + "description": "For Basic and OAuth authentication: username used to authenticate to the SMTP server", + "minLength": 1 + }, + "basicPassword": { + "type": "string", + "description": "For basic authentication: password used to authenticate to the SMTP server", + "writeOnly": true + }, + "oauthAuthenticationHost": { + "type": "string", + "description": "For OAuth authentication: host of the Identity Provider issuing access tokens" + }, + "oauthClientId": { + "type": "string", + "description": "For OAuth authentication: Client ID provided by Microsoft Exchange when registering the application", + "writeOnly": true + }, + "oauthClientSecret": { + "type": "string", + "description": "For OAuth authentication: Client secret provided by Microsoft Exchange when registering the application", + "writeOnly": true + }, + "oauthTenant": { + "type": "string", + "description": "For OAuth authentication: Microsoft tenant" + } + }, + "required": [ + "authMethod", + "fromAddress", + "fromName", + "host", + "port", + "securityProtocol", + "subjectPrefix", + "username" + ] + }, + "EmailConfigurationResource": { + "type": "object", + "properties": { + "id": { "type": "string", "readOnly": true }, + "host": { + "type": "string", + "description": "URL of your SMTP server" + }, + "port": { + "type": "string", + "description": "Port of your SMTP server (usually 25, 587 or 465)" + }, + "securityProtocol": { + "type": "string", + "description": "Security protocol used to connect to your SMTP server (SSLTLS is recommended)", + "enum": ["NONE", "SSLTLS", "STARTTLS"] + }, + "fromAddress": { + "type": "string", + "description": "Address emails will come from" + }, + "fromName": { + "type": "string", + "description": "Name emails will come from (usually \"SonarQube\")" + }, + "subjectPrefix": { + "type": "string", + "description": "Prefix added to email so they can be easily recognized (usually \"[SonarQube]\")" + }, + "authMethod": { + "type": "string", + "description": "Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange", + "enum": ["BASIC", "OAUTH"] + }, + "username": { + "type": "string", + "description": "For Basic and OAuth authentication: username used to authenticate to the SMTP server" + }, + "isBasicPasswordSet": { + "type": "boolean", + "description": "For Basic authentication: has the password field been set?" + }, + "oauthAuthenticationHost": { + "type": "string", + "description": "For OAuth authentication: host of the Identity Provider issuing access tokens" + }, + "isOauthClientIdSet": { + "type": "boolean", + "description": "For OAuth authentication: has the Client ID field been set?" + }, + "isOauthClientSecretSet": { + "type": "boolean", + "description": "For OAuth authentication: has the Client secret field been set?" + }, + "oauthTenant": { + "type": "string", + "description": "For OAuth authentication: Microsoft tenant" + } + } + }, + "LicenseProfilesCreateRestRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the license policy" + }, + "default": { + "type": "boolean", + "description": "Whether this license policy is the default or not" + } + }, + "required": ["name"] + }, + "LicenseProfileResource": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "name": { "type": "string" }, + "default": { "type": "boolean" }, + "actions": { + "$ref": "#/components/schemas/LicenseProfileSingleActions" + }, + "updatedAt": { "type": "string" } + } + }, + "LicenseProfileSingleActions": { + "type": "object", + "properties": { + "edit": { "type": "boolean" }, + "setAsDefault": { "type": "boolean" }, + "associateProjects": { "type": "boolean" }, + "delete": { "type": "boolean" } + } + }, + "UpdateAssigneeRestRequest": { + "type": "object", + "properties": { + "issueReleaseKey": { + "type": "string", + "description": "Issue release key" + }, + "assigneeLogin": { "type": "string", "description": "Assignee login" } + }, + "required": ["issueReleaseKey"] + }, + "AffectedPackageResource": { + "type": "object", + "properties": { + "purl": { "type": "string" }, + "recommendation": { + "type": "string", + "description": "The maintainer's overall recommendation, if available", + "enum": ["ignore", "upgrade", "upgrade_or_workaround"] + }, + "recommendationDetails": { + "$ref": "#/components/schemas/VulnerabilityRecommendationDetailsResource" + }, + "versionOptions": { + "type": "array", + "items": { "$ref": "#/components/schemas/VersionOptionResource" } + }, + "affectedVersions": { + "type": "array", + "items": { "type": "string" } + }, + "unaffectedVersions": { "type": "string" } + } + }, + "IssueReleaseBranchResource": { + "type": "object", + "properties": { + "uuid": { "type": "string" }, + "key": { "type": "string" }, + "pullRequest": { "type": "boolean" }, + "projectKey": { "type": "string" }, + "projectName": { "type": "string" }, + "legacyProjectUuid": { "type": "string" }, + "organizationUuid": { "type": "string", "format": "uuid" } + } + }, + "IssueReleaseDetailsResource": { + "type": "object", + "properties": { + "key": { "type": "string" }, + "severity": { "type": "string" }, + "originalSeverity": { "type": "string" }, + "manualSeverity": { "type": "string" }, + "showIncreasedSeverityWarning": { "type": "boolean" }, + "release": { "$ref": "#/components/schemas/ReleaseSearchResource" }, + "type": { + "type": "string", + "enum": ["VULNERABILITY", "PROHIBITED_LICENSE"] + }, + "quality": { + "type": "string", + "enum": ["MAINTAINABILITY", "RELIABILITY", "SECURITY"] + }, + "status": { "type": "string" }, + "createdAt": { "type": "string" }, + "assignee": { "$ref": "#/components/schemas/UserResource" }, + "commentCount": { "type": "integer", "format": "int32" }, + "vulnerability": { + "$ref": "#/components/schemas/VulnerabilityResource" + }, + "spdxLicenseId": { "type": "string" }, + "transitions": { + "type": "array", + "items": { + "type": "string", + "enum": ["CONFIRM", "REOPEN", "SAFE", "FIXED", "ACCEPT"] + } + }, + "actions": { + "type": "array", + "items": { + "type": "string", + "enum": ["COMMENT", "ASSIGN", "SET_SEVERITY"] + }, + "uniqueItems": true + }, + "branch": { + "$ref": "#/components/schemas/IssueReleaseBranchResource" + } + } + }, + "ReleaseSearchResource": { + "type": "object", + "properties": { + "key": { "type": "string" }, + "branchUuid": { "type": "string" }, + "packageUrl": { "type": "string" }, + "packageManager": { "type": "string" }, + "packageName": { "type": "string" }, + "version": { "type": "string" }, + "licenseExpression": { "type": "string" }, + "known": { "type": "boolean" }, + "knownPackage": { "type": "boolean" }, + "newlyIntroduced": { "type": "boolean" }, + "directSummary": { "type": "boolean" }, + "scopeSummary": { "type": "string" }, + "productionScopeSummary": { "type": "boolean" }, + "dependencyFilePaths": { + "type": "array", + "items": { "type": "string" } + } + } + }, + "UserResource": { + "type": "object", + "properties": { + "login": { "type": "string" }, + "name": { "type": "string" }, + "avatar": { "type": "string" }, + "active": { "type": "boolean" } + } + }, + "VersionOptionResource": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "The version being presented as an option" + }, + "vulnerabilityIds": { + "type": "array", + "description": "Vulnerability IDs affecting this version", + "items": { "type": "string" } + }, + "prerelease": { + "type": "boolean", + "description": "Is this version a pre-release version" + }, + "fixLevel": { + "type": "string", + "description": "Describes which vulnerabilities are fixed", + "enum": ["COMPLETE", "PARTIAL", "NONE", "UNKNOWN"] + }, + "descriptionCode": { + "type": "string", + "description": "How the frontend should label this version", + "enum": [ + "VERSION_IN_USE", + "NEAREST_PARTIAL", + "NEAREST_COMPLETE", + "LATEST_PARTIAL", + "LATEST_COMPLETE", + "LATEST_STABLE", + "LATEST_PRERELEASE", + "UNKNOWN" + ] + } + } + }, + "VulnerabilityRecommendationDetailsResource": { + "type": "object", + "properties": { + "impactScore": { "type": "integer", "format": "int32" }, + "impactDescription": { "type": "string" }, + "realIssue": { "type": "boolean" }, + "falsePositiveReason": { "type": "string" }, + "includesDev": { "type": "boolean" }, + "specificMethodsAffected": { "type": "boolean" }, + "specificMethodsDescription": { "type": "string" }, + "otherConditions": { "type": "boolean" }, + "otherConditionsDescription": { "type": "string" }, + "workaroundAvailable": { "type": "boolean" }, + "workaroundDescription": { "type": "string" }, + "visibility": { "type": "string" } + } + }, + "VulnerabilityReportResource": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "url": { "type": "string" }, + "type": { "type": "string" }, + "cvssScore": { "type": "string" }, + "cvssSeverity": { "type": "string" }, + "withdrawnAt": { "type": "string" } } - } - }, - "/analysis/active_rules": { - "get": { - "tags": ["active-rules-controller"], - "summary": "Get all active rules for a specific project", - "description": "Used by the scanner-engine to get all active rules for a given project.", - "operationId": "getActiveRules", - "parameters": [ - { - "name": "projectKey", - "in": "query", - "description": "Project Key", - "required": true, - "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/ActiveRule" } - } - } + }, + "VulnerabilityResource": { + "type": "object", + "properties": { + "vulnerabilityId": { "type": "string" }, + "reports": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VulnerabilityReportResource" } - } + }, + "description": { "type": "string" }, + "epssPercentile": { "type": "string" }, + "epssProbability": { "type": "string" }, + "knownExploited": { "type": "boolean" }, + "cweIds": { "type": "array", "items": { "type": "string" } }, + "publishedOn": { "type": "string" }, + "affectedPackages": { + "type": "array", + "items": { "$ref": "#/components/schemas/AffectedPackageResource" } + }, + "withdrawn": { "type": "boolean" } } - } - }, - "/authorizations/group-memberships/{id}": { - "delete": { - "tags": ["group-membership-controller"], - "summary": "Remove a group membership", - "description": "Remove a user from a group", - "operationId": "delete", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The ID of the group membership to delete.", - "required": true, - "schema": { "type": "string" } - } - ], - "responses": { "204": { "description": "No Content" } } - } - } - }, - "components": { - "schemas": { - "UserCreateRestRequest": { + }, + "IssueReleaseSetSeverityRestRequest": { "type": "object", "properties": { - "email": { + "issueReleaseKey": { "type": "string", - "description": "User email", - "maxLength": 100, - "minLength": 1 + "description": "Issue release key" }, - "local": { - "type": "boolean", - "default": "true", - "description": "Specify if the user should be authenticated from SonarQube server or from an external authentication system. Password should not be set when local is set to false." + "quality": { + "type": "string", + "description": "Software Quality", + "enum": ["MAINTAINABILITY", "RELIABILITY", "SECURITY"] }, - "login": { + "severity": { "type": "string", - "description": "User login", - "maxLength": 100, - "minLength": 2 + "description": "Severity", + "enum": ["INFO", "LOW", "MEDIUM", "HIGH", "BLOCKER"] + } + }, + "required": ["issueReleaseKey", "quality", "severity"] + }, + "IssueReleaseClearSeverityWarningRestRequest": { + "type": "object", + "properties": { + "issueReleaseKey": { + "type": "string", + "description": "Issue release key" + } + }, + "required": ["issueReleaseKey"] + }, + "IssueReleaseStatusTransitionRequest": { + "type": "object", + "properties": { + "issueReleaseKey": { + "type": "string", + "description": "Issue release key" }, - "name": { + "transitionKey": { "type": "string", - "description": "User name", - "maxLength": 200, - "minLength": 0 + "description": "Transition key", + "enum": ["CONFIRM", "REOPEN", "SAFE", "FIXED", "ACCEPT"] }, - "password": { + "comment": { "type": "string", "description": "Transition comment" } + }, + "required": ["issueReleaseKey", "transitionKey"] + }, + "IssueReleaseAddCommentRestRequest": { + "type": "object", + "properties": { + "issueReleaseKey": { "type": "string", - "description": "User password. Only mandatory when creating local user, otherwise it should not be set", - "writeOnly": true + "description": "Issue release key" }, - "scmAccounts": { - "type": "array", - "description": "List of SCM accounts.", - "items": { "type": "string" } - } + "comment": { "type": "string", "description": "comment" } }, - "required": ["login", "name"] + "required": ["issueReleaseKey"] }, - "UserRestResponseForAdmins": { + "AzureBillingRestResponse": { "type": "object", "properties": { - "id": { "type": "string", "readOnly": true }, - "login": { "type": "string" }, - "name": { "type": "string" }, - "email": { "type": "string" }, - "active": { "type": "boolean", "readOnly": true }, - "local": { "type": "boolean", "readOnly": true }, - "managed": { "type": "boolean", "readOnly": true }, - "externalLogin": { "type": "string" }, - "externalProvider": { "type": "string" }, - "externalId": { "type": "string" }, - "avatar": { "type": "string" }, - "sonarQubeLastConnectionDate": { "type": "string", "readOnly": true }, - "sonarLintLastConnectionDate": { "type": "string", "readOnly": true }, - "scmAccounts": { "type": "array", "items": { "type": "string" } } + "success": { "type": "boolean" }, + "message": { "type": "string" } } }, - "EmailConfigurationCreateRestRequest": { + "PostJiraWorkItemRequestResource": { "type": "object", "properties": { - "host": { + "resourceId": { "type": "string", - "description": "URL of your SMTP server" + "description": "Resource identifier", + "minLength": 1, + "writeOnly": true }, - "port": { + "resourceType": { "type": "string", - "description": "Port of your SMTP server (usually 25, 587 or 465)" + "description": "Resource type", + "enum": ["SONAR_ISSUE", "DEPENDENCY_RISK"], + "writeOnly": true }, - "securityProtocol": { + "sonarProjectId": { "type": "string", - "description": "Security protocol used to connect to your SMTP server (SSLTLS is recommended)", - "enum": ["NONE", "SSLTLS", "STARTTLS"] + "description": "Sonar project identifier", + "minLength": 1, + "writeOnly": true }, - "fromAddress": { + "workTypeId": { "type": "string", - "description": "Address emails will come from" + "description": "Work type identifier", + "minLength": 1, + "writeOnly": true }, - "fromName": { + "summary": { "type": "string", - "description": "Name emails will come from (usually \"SonarQube\")" + "description": "Work item summary", + "minLength": 1, + "writeOnly": true }, - "subjectPrefix": { + "description": { "type": "string", - "description": "Prefix added to email so they can be easily recognized (usually \"[SonarQube]\")" - }, - "authMethod": { + "description": "Work item description", + "minLength": 1, + "writeOnly": true + } + }, + "required": [ + "description", + "resourceId", + "resourceType", + "sonarProjectId", + "summary", + "workTypeId" + ] + }, + "JiraWorkItemResource": { + "type": "object", + "properties": { + "id": { "type": "string", - "description": "Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange", - "enum": ["BASIC", "OAUTH"] + "description": "Work item identifier", + "readOnly": true }, - "username": { + "jiraIssueId": { "type": "string", - "description": "For Basic and OAuth authentication: username used to authenticate to the SMTP server" + "description": "Jira issue identifier", + "readOnly": true }, - "basicPassword": { + "jiraIssueKey": { "type": "string", - "description": "For basic authentication: password used to authenticate to the SMTP server", - "writeOnly": true + "description": "Jira issue key", + "readOnly": true }, - "oauthAuthenticationHost": { + "jiraIssueUrl": { "type": "string", - "description": "For OAuth authentication: host of the Identity Provider issuing access tokens" + "description": "Jira issue URL", + "readOnly": true }, - "oauthClientId": { + "jiraIssueStatus": { "type": "string", - "description": "For OAuth authentication: Client ID provided by Microsoft Exchange when registering the application", + "description": "Jira issue status", + "readOnly": true + } + } + }, + "PostJiraProjectBindingRequestResource": { + "type": "object", + "properties": { + "sonarProjectId": { + "type": "string", + "description": "Sonar project identifier", + "minLength": 1, "writeOnly": true }, - "oauthClientSecret": { + "jiraOrganizationId": { "type": "string", - "description": "For OAuth authentication: Client secret provided by Microsoft Exchange when registering the application", + "description": "Jira instance binding identifier", "writeOnly": true }, - "oauthTenant": { + "jiraProjectKey": { "type": "string", - "description": "For OAuth authentication: Microsoft tenant" + "description": "Jira project key", + "minLength": 1, + "writeOnly": true } }, - "required": [ - "authMethod", - "fromAddress", - "fromName", - "host", - "port", - "securityProtocol", - "subjectPrefix", - "username" - ] + "required": ["jiraOrganizationId", "jiraProjectKey", "sonarProjectId"] }, - "EmailConfigurationResource": { + "JiraProjectBindingResource": { "type": "object", "properties": { - "id": { "type": "string", "readOnly": true }, - "host": { + "id": { "type": "string", - "description": "URL of your SMTP server" + "format": "uuid", + "description": "Jira project binding identifier", + "readOnly": true }, - "port": { + "sonarProjectId": { "type": "string", - "description": "Port of your SMTP server (usually 25, 587 or 465)" + "description": "Sonar project identifier", + "readOnly": true }, - "securityProtocol": { + "jiraOrganizationId": { "type": "string", - "description": "Security protocol used to connect to your SMTP server (SSLTLS is recommended)", - "enum": ["NONE", "SSLTLS", "STARTTLS"] + "description": "Jira instance binding identifier", + "readOnly": true }, - "fromAddress": { + "jiraProjectKey": { "type": "string", - "description": "Address emails will come from" - }, - "fromName": { + "description": "Jira project key", + "readOnly": true + } + } + }, + "PostJiraOrganizationBindingRequestResource": { + "type": "object", + "properties": { + "state": { "type": "string", - "description": "Name emails will come from (usually \"SonarQube\")" + "description": "Base64-encoded OAuth state parameter", + "minLength": 1, + "writeOnly": true }, - "subjectPrefix": { + "authorizationCode": { "type": "string", - "description": "Prefix added to email so they can be easily recognized (usually \"[SonarQube]\")" - }, - "authMethod": { + "description": "OAuth authorization code (no whitespace)", + "minLength": 1, + "writeOnly": true + } + }, + "required": ["authorizationCode", "state"] + }, + "JiraOrganizationBindingResource": { + "type": "object", + "properties": { + "id": { "type": "string", - "description": "Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange", - "enum": ["BASIC", "OAUTH"] + "description": "Jira instance binding identifier", + "readOnly": true }, - "username": { + "sonarOrganizationUuid": { "type": "string", - "description": "For Basic and OAuth authentication: username used to authenticate to the SMTP server" + "format": "uuid", + "description": "Sonar organization UUID", + "readOnly": true }, - "isBasicPasswordSet": { - "type": "boolean", - "description": "For Basic authentication: has the password field been set?" + "jiraInstanceUrl": { + "type": "string", + "description": "Jira instance URL", + "readOnly": true }, - "oauthAuthenticationHost": { + "createdBy": { "type": "string", - "description": "For OAuth authentication: host of the Identity Provider issuing access tokens" + "description": "User who created or reauthorized the jira connection", + "readOnly": true }, - "isOauthClientIdSet": { - "type": "boolean", - "description": "For OAuth authentication: has the Client ID field been set?" + "createdAt": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp", + "readOnly": true }, - "isOauthClientSecretSet": { + "isTokenShared": { "type": "boolean", - "description": "For OAuth authentication: has the Client secret field been set?" + "description": "TODO", + "readOnly": true + } + } + }, + "OAuthResource": { + "type": "object", + "properties": { + "cloudId": { + "type": "string", + "description": "The resource's cloud ID", + "readOnly": true }, - "oauthTenant": { + "url": { "type": "string", - "description": "For OAuth authentication: Microsoft tenant" + "description": "The resource's URL", + "readOnly": true + } + } + }, + "PostJiraOrganizationBindingResponseResource": { + "type": "object", + "properties": { + "binding": { + "$ref": "#/components/schemas/JiraOrganizationBindingResource", + "description": "The successfully created binding (present if binding was created)", + "readOnly": true + }, + "resources": { + "type": "array", + "description": "Array of available resources to bind the instance to", + "items": { "$ref": "#/components/schemas/OAuthResource" }, + "readOnly": true } + }, + "required": ["resources"] + }, + "UserBindingCreationRequest": { + "type": "object", + "description": "User binding creation request", + "properties": { + "bindingData": { + "$ref": "#/components/schemas/UserBindingCreationRequestBindingData" + }, + "userId": { "type": "string", "minLength": 1 } + }, + "required": ["bindingData", "userId"] + }, + "UserBindingCreationRequestBindingData": { + "type": "object", + "properties": { "code": { "type": "string", "minLength": 1 } }, + "required": ["code"] + }, + "UserBindingResponse": { + "type": "object", + "properties": { + "id": { "type": "string", "format": "uuid" }, + "user_id": { "type": "string" }, + "slack_user_id": { "type": "string" }, + "slack_workspace_id": { "type": "string" }, + "slack_workspace_name": { "type": "string" }, + "created_at": { "type": "integer", "format": "int64" } + } + }, + "IntegrationConfigurationPostRequest": { + "type": "object", + "properties": { + "integrationType": { "type": "string", "enum": ["SLACK"] }, + "clientId": { "type": "string", "minLength": 1 }, + "clientSecret": { "type": "string", "minLength": 1 }, + "signingSecret": { "type": "string", "minLength": 1 } + }, + "required": [ + "clientId", + "clientSecret", + "integrationType", + "signingSecret" + ] + }, + "IntegrationConfigurationResponse": { + "type": "object", + "properties": { + "id": { "type": "string", "format": "uuid" }, + "integrationType": { "type": "string", "enum": ["SLACK"] }, + "clientId": { "type": "string" }, + "appId": { "type": "string" } } }, "AwarenessBannerClickedRequest": { @@ -2630,9 +5332,24 @@ "FixSuggestionPostRequest": { "type": "object", "properties": { - "issueId": { "type": "string", "description": "Issue key" } + "projectKey": { "type": "string" }, + "issueId": { "type": "string", "description": "Issue key" }, + "issue": { + "$ref": "#/components/schemas/Issue", + "description": "Issue" + } + } + }, + "Issue": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "startLine": { "type": "integer", "format": "int32" }, + "endLine": { "type": "integer", "format": "int32" }, + "ruleKey": { "type": "string" }, + "sourceCode": { "type": "string" } }, - "required": ["issueId"] + "required": ["endLine", "message", "ruleKey", "sourceCode", "startLine"] }, "ChangeDto": { "type": "object", @@ -2654,6 +5371,31 @@ } } }, + "LicenseRestRequest": { + "type": "object", + "properties": { + "licenseKey": { "type": "string", "description": "New license key" } + } + }, + "LicenseUploadActivationRequest": { + "type": "object", + "properties": { + "license": { + "type": "string", + "description": "Contents of a valid .lic file" + }, + "licenseKey": { + "type": "string", + "description": "License key for the license" + } + } + }, + "LegacyLicenseRestRequest": { + "type": "object", + "properties": { + "licenseKey": { "type": "string", "description": "New license key" } + } + }, "GitlabSynchronizationRunResource": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true } } @@ -2712,15 +5454,18 @@ }, "applicationId": { "type": "string", - "description": "Gitlab Application id" + "description": "Gitlab Application id", + "minLength": 1 }, "url": { "type": "string", - "description": "Url of Gitlab instance for authentication (for instance https://gitlab.com)" + "description": "Url of Gitlab instance for authentication (for instance https://gitlab.com)", + "minLength": 1 }, "secret": { "type": "string", "description": "Secret of the application", + "minLength": 1, "writeOnly": true }, "synchronizeGroups": { @@ -2799,20 +5544,24 @@ "clientId": { "type": "string", "description": "Client ID provided by GitHub when registering the application.", + "minLength": 1, "writeOnly": true }, "clientSecret": { "type": "string", "description": "Client password provided by GitHub when registering the application.", + "minLength": 1, "writeOnly": true }, "applicationId": { "type": "string", - "description": "The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps." + "description": "The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps.", + "minLength": 1 }, "privateKey": { "type": "string", "description": "Your GitHub App's private key. You can generate a .pem file from your GitHub App's page under Private keys.\nCopy and paste the whole contents of the file here.\n", + "minLength": 1, "writeOnly": true }, "synchronizeGroups": { @@ -2821,11 +5570,13 @@ }, "apiUrl": { "type": "string", - "description": "The API url for a GitHub instance. https://api.github.com/ for Github.com, https://github.company.com/api/v3/ when using Github Enterprise" + "description": "The API url for a GitHub instance. https://api.github.com/ for Github.com, https://github.company.com/api/v3/ when using Github Enterprise", + "minLength": 1 }, "webUrl": { "type": "string", - "description": "The WEB url for a GitHub instance. https://github.com/ for Github.com, https://github.company.com/ when using GitHub Enterprise.\n" + "description": "The WEB url for a GitHub instance. https://github.com/ for Github.com, https://github.company.com/ when using GitHub Enterprise.\n", + "minLength": 1 }, "allowedOrganizations": { "type": "array", @@ -2904,19 +5655,23 @@ "properties": { "projectKey": { "type": "string", - "description": "Key of the project to create" + "description": "Key of the project to create", + "minLength": 1 }, "projectName": { "type": "string", - "description": "Name of the project to create" + "description": "Name of the project to create", + "minLength": 1 }, "devOpsPlatformSettingId": { "type": "string", - "description": "Identifier of DevOps platform configuration to use. Use /dop-translation/dop-settings to retrieve the settings and their ID" + "description": "Identifier of DevOps platform configuration to use. Use /dop-translation/dop-settings to retrieve the settings and their ID", + "minLength": 1 }, "repositoryIdentifier": { "type": "string", - "description": "Identifier of the DevOps platform repository to import:\n- repository slug for GitHub and Bitbucket (Cloud and Server)\n- repository id for GitLab\n- repository name for Azure DevOps\n" + "description": "Identifier of the DevOps platform repository to import:\n- repository slug for GitHub and Bitbucket (Cloud and Server)\n- repository id for GitLab\n- repository name for Azure DevOps\n", + "minLength": 1 }, "projectIdentifier": { "type": "string", @@ -3201,17 +5956,35 @@ "userId": { "type": "string", "readOnly": true } } }, - "UpdateFieldListString": { + "AtlassianAuthenticationDetailsResource": { "type": "object", "properties": { - "value": { "type": "array", "items": { "type": "string" } }, - "defined": { "type": "boolean" } + "clientId": { + "type": "string", + "description": "Atlassian 3LO App Client ID", + "writeOnly": true + }, + "secret": { + "type": "string", + "description": "Atlassian 3LO App Secret", + "writeOnly": true + } + } + }, + "AtlassianAuthenticationDetailsResultResource": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "Atlassian 3LO App Client ID", + "readOnly": true + } } }, - "UpdateFieldString": { + "UpdateFieldListString": { "type": "object", "properties": { - "value": { "type": "string" }, + "value": { "type": "array", "items": { "type": "string" } }, "defined": { "type": "boolean" } } }, @@ -3219,8 +5992,10 @@ "type": "object", "properties": { "login": { - "$ref": "#/components/schemas/UpdateFieldString", - "description": "User login" + "type": "string", + "description": "User login", + "maxLength": 100, + "minLength": 2 }, "name": { "type": "string", @@ -3230,12 +6005,14 @@ }, "email": { "type": "string", + "format": "email", "description": "Email", "maxLength": 100, "minLength": 1 }, "scmAccounts": { - "$ref": "#/components/schemas/UpdateFieldListString" + "$ref": "#/components/schemas/UpdateFieldListString", + "items": { "type": "string" } }, "externalProvider": { "type": "string", @@ -3285,47 +6062,326 @@ }, "authMethod": { "type": "string", - "description": "Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange", - "enum": ["BASIC", "OAUTH"] + "description": "Authentication method used to connect to the SMTP server. OAuth is only supported for Microsoft Exchange", + "enum": ["BASIC", "OAUTH"] + }, + "username": { + "type": "string", + "description": "For Basic and OAuth authentication: username used to authenticate to the SMTP server" + }, + "basicPassword": { + "type": "string", + "description": "For basic authentication: password used to authenticate to the SMTP server" + }, + "oauthAuthenticationHost": { + "type": "string", + "description": "For OAuth authentication: host of the Identity Provider issuing access tokens" + }, + "oauthClientId": { + "type": "string", + "description": "For OAuth authentication: Client ID provided by Microsoft Exchange when registering the application" + }, + "oauthClientSecret": { + "type": "string", + "description": "For OAuth authentication: Client password provided by Microsoft Exchange when registering the application" + }, + "oauthTenant": { + "type": "string", + "description": "For OAuth authentication: Microsoft tenant" + } + } + }, + "LicenseProfilesUpdateRestRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the license policy" + }, + "default": { + "type": "boolean", + "description": "Whether this license policy is the default or not" + } + } + }, + "LicensePolicyLicenseUpdateRestRequest": { + "type": "object", + "properties": { + "policy": { + "type": "string", + "description": "The new status of this license.", + "enum": ["DENY", "ALLOW"] + } + }, + "required": ["policy"] + }, + "LicensePolicyLicenseResource": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "spdxLicenseId": { "type": "string" }, + "name": { "type": "string" }, + "category": { + "type": "string", + "enum": [ + "UNKNOWN", + "COPYLEFT_WEAK", + "COPYLEFT_STRONG", + "COPYLEFT_NETWORK", + "COPYLEFT_MAXIMAL", + "PERMISSIVE_STANDARD", + "PERMISSIVE_AMATEUR" + ] + }, + "policy": { + "type": "string", + "description": "The policy status of this license.", + "enum": ["DENY", "ALLOW"] + } + } + }, + "LicenseProfileCategoryUpdateRestRequest": { + "type": "object", + "properties": { + "policy": { + "type": "string", + "description": "The new status of this category.", + "enum": ["DENY", "ALLOW"] + } + }, + "required": ["policy"] + }, + "LicenseProfileCategoryResource": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "key": { + "type": "string", + "enum": [ + "UNKNOWN", + "COPYLEFT_WEAK", + "COPYLEFT_STRONG", + "COPYLEFT_NETWORK", + "COPYLEFT_MAXIMAL", + "PERMISSIVE_STANDARD", + "PERMISSIVE_AMATEUR" + ] + }, + "policy": { + "type": "string", + "description": "The policy status of this category.", + "enum": ["DENY", "ALLOW"] + } + } + }, + "AssignedProjectsUpdateRestRequest": { + "type": "object", + "properties": { + "licenseProfileUuid": { + "type": "string", + "description": "The id of the license profile that should be used when analyzing the project for license issues." + }, + "projectKey": { + "type": "string", + "description": "The key of the project that should be assigned to the license profile." + } + }, + "required": ["licenseProfileUuid", "projectKey"] + }, + "IssueReleaseUpdateCommentRestRequest": { + "type": "object", + "properties": { + "issueReleaseChangeKey": { + "type": "string", + "description": "Issue release change key" + }, + "comment": { "type": "string", "description": "Comment text" } + }, + "required": ["comment", "issueReleaseChangeKey"] + }, + "FeatureEnablementRequest": { + "type": "object", + "properties": { + "enablement": { + "type": "boolean", + "description": "Whether SCA is enabled or not" + } + } + }, + "FeatureEnablementResource": { + "type": "object", + "properties": { "enablement": { "type": "boolean" } } + }, + "JiraWorkTypesSelectionResource": { + "type": "object", + "properties": { + "sonarProjectId": { + "type": "string", + "description": "The Sonar project ID", + "writeOnly": true + }, + "selectedWorkTypes": { + "type": "array", + "description": "An array with the selected work type ids", + "items": { "type": "string" }, + "writeOnly": true + } + } + }, + "PatchJiraProjectBindingRequestResource": { + "type": "object", + "properties": { + "sonarProjectId": { + "type": "string", + "description": "Sonar project identifier", + "minLength": 1, + "writeOnly": true + }, + "jiraProjectKey": { + "type": "string", + "description": "Jira project key", + "minLength": 1, + "writeOnly": true + } + }, + "required": ["jiraProjectKey", "sonarProjectId"] + }, + "PatchJiraOrganizationBindingRequestResource": { + "type": "object", + "properties": { + "sonarOrganizationUuid": { + "type": "string", + "format": "uuid", + "description": "Sonar organization UUID", + "writeOnly": true + }, + "jiraCloudId": { + "type": "string", + "description": "Jira cloud ID to bind with the organization", + "minLength": 1, + "writeOnly": true + }, + "jiraInstanceUrl": { + "type": "string", + "description": "Jira instance URL", + "minLength": 1, + "writeOnly": true + } + }, + "required": ["jiraCloudId", "jiraInstanceUrl", "sonarOrganizationUuid"] + }, + "PatchJiraOrganizationBindingEditResource": { + "type": "object", + "properties": { + "sonarOrganizationUuid": { + "type": "string", + "format": "uuid", + "description": "Sonar organization UUID", + "writeOnly": true + }, + "isTokenShared": { + "type": "boolean", + "description": "TODO", + "writeOnly": true + } + }, + "required": ["isTokenShared", "sonarOrganizationUuid"] + }, + "RuleTypeMapping": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Rule type", + "enum": ["CODE_SMELL", "BUG", "VULNERABILITY", "SECURITY_HOTSPOT"] }, - "username": { - "type": "string", - "description": "For Basic and OAuth authentication: username used to authenticate to the SMTP server" + "severities": { + "type": "array", + "description": "List of severities", + "items": { + "type": "string", + "enum": ["BLOCKER", "CRITICAL", "MAJOR", "MINOR", "INFO"] + } + } + }, + "required": ["severities", "type"] + }, + "SandboxSettingsResource": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether sandbox is enabled globally" }, - "basicPassword": { - "type": "string", - "description": "For basic authentication: password used to authenticate to the SMTP server" + "defaultValue": { + "type": "boolean", + "description": "Default value for projects" }, - "oauthAuthenticationHost": { - "type": "string", - "description": "For OAuth authentication: host of the Identity Provider issuing access tokens" + "allowOverride": { + "type": "boolean", + "description": "Allow projects to override settings" }, - "oauthClientId": { - "type": "string", - "description": "For OAuth authentication: Client ID provided by Microsoft Exchange when registering the application" + "softwareQualities": { + "type": "array", + "description": "Software quality mappings (MQR mode)", + "items": { "$ref": "#/components/schemas/SoftwareQualityMapping" } }, - "oauthClientSecret": { + "types": { + "type": "array", + "description": "Rule type mappings (Standard Experience mode)", + "items": { "$ref": "#/components/schemas/RuleTypeMapping" } + } + } + }, + "SoftwareQualityMapping": { + "type": "object", + "properties": { + "softwareQuality": { "type": "string", - "description": "For OAuth authentication: Client password provided by Microsoft Exchange when registering the application" + "description": "Software quality", + "enum": ["MAINTAINABILITY", "RELIABILITY", "SECURITY"] }, - "oauthTenant": { - "type": "string", - "description": "For OAuth authentication: Microsoft tenant" + "impactSeverities": { + "type": "array", + "description": "List of impact severities", + "items": { + "type": "string", + "enum": ["INFO", "LOW", "MEDIUM", "HIGH", "BLOCKER"] + } } - } + }, + "required": ["impactSeverities", "softwareQuality"] }, - "FeatureEnablementRequest": { + "SandboxSettingsProjectResource": { "type": "object", "properties": { - "enablement": { + "enabled": { "type": "boolean", - "description": "Whether SCA is enabled or not" + "description": "Whether sandbox is enabled for this project" + }, + "softwareQualities": { + "type": "array", + "description": "Software quality mappings (MQR mode)", + "items": { "$ref": "#/components/schemas/SoftwareQualityMapping" } + }, + "types": { + "type": "array", + "description": "Rule type mappings (Standard Experience mode)", + "items": { "$ref": "#/components/schemas/RuleTypeMapping" } + }, + "overridden": { + "type": "boolean", + "description": "Whether project settings override instance settings" } } }, - "FeatureEnablementResource": { + "IntegrationConfigurationPatchRequest": { "type": "object", - "properties": { "enablement": { "type": "boolean" } } + "properties": { + "clientId": { "type": "string" }, + "clientSecret": { "type": "string" }, + "signingSecret": { "type": "string" } + } }, "DevOpsPermissionMappingUpdateRequest": { "type": "object", @@ -3371,7 +6427,8 @@ "description": "Set whether to synchronize groups" }, "allowedGroups": { - "$ref": "#/components/schemas/UpdateFieldListString" + "$ref": "#/components/schemas/UpdateFieldListString", + "items": { "type": "string" } }, "provisioningType": { "type": "string", @@ -3423,7 +6480,8 @@ "description": "Url of GitHub instance for authentication (for instance https://github.com)" }, "allowedOrganizations": { - "$ref": "#/components/schemas/UpdateFieldListString" + "$ref": "#/components/schemas/UpdateFieldListString", + "items": { "type": "string" } }, "provisioningType": { "type": "string", @@ -3523,251 +6581,521 @@ "page": { "$ref": "#/components/schemas/PageRestResponse" } } }, - "ReleaseSearchResource": { + "Category": { + "type": "object", + "properties": { + "activeRules": { "type": "integer", "format": "int32" }, + "issues": { "type": "integer", "format": "int32" }, + "key": { "type": "string" } + } + }, + "GetAccessibilityReportResponse": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { "$ref": "#/components/schemas/Category" } + } + } + }, + "SelfTestHttpCallResource": { + "type": "object", + "properties": { + "attemptedUrl": { "type": "string" }, + "attemptedMethod": { "type": "string" }, + "responseCode": { "type": "integer", "format": "int32" }, + "responseBody": { "type": "string" }, + "responseBodyAppearsValid": { "type": "boolean" }, + "responseHeaders": { + "type": "array", + "items": { "type": "array", "items": { "type": "string" } } + } + } + }, + "SelfTestResponse": { + "type": "object", + "properties": { + "featureEnabled": { "type": "boolean" }, + "selfTestPassed": { "type": "boolean" }, + "cliVersionCheck": { + "$ref": "#/components/schemas/SelfTestHttpCallResource" + }, + "vulnerabilityDetailsCheck": { + "$ref": "#/components/schemas/SelfTestHttpCallResource" + } + } + }, + "SelfTestSpringConfigurationResponse": { + "type": "object", + "properties": { "springVersion": { "type": "string" } } + }, + "RiskReportItem": { + "type": "object", + "properties": { + "projectKey": { "type": "string" }, + "projectName": { "type": "string" }, + "branchKey": { "type": "string" }, + "riskTitle": { "type": "string" }, + "riskType": { + "type": "string", + "enum": ["VULNERABILITY", "PROHIBITED_LICENSE"] + }, + "riskSeverity": { + "type": "string", + "enum": ["INFO", "LOW", "MEDIUM", "HIGH", "BLOCKER"] + }, + "riskStatus": { + "type": "string", + "enum": ["OPEN", "ACCEPT", "CONFIRM", "SAFE", "FIXED"] + }, + "statusChanges": { + "type": "array", + "items": { "$ref": "#/components/schemas/StatusChange" } + }, + "vulnerabilityId": { "type": "string" }, + "cvssScore": { "type": "number" }, + "cweIds": { "type": "array", "items": { "type": "string" } }, + "publishedOn": { "type": "string" }, + "createdAt": { "type": "string" }, + "packageUrl": { "type": "string" }, + "riskUrl": { "type": "string" }, + "dependencyChains": { + "type": "array", + "items": { "type": "array", "items": { "type": "string" } } + }, + "scope": { "type": "string" }, + "productionScope": { "type": "boolean" } + } + }, + "StatusChange": { + "type": "object", + "properties": { + "comment": { "type": "string" }, + "newStatus": { "type": "string" }, + "createdAt": { "type": "string" } + } + }, + "BranchResource": { + "type": "object", + "properties": { + "uuid": { "type": "string" }, + "key": { "type": "string" }, + "pullRequest": { "type": "boolean" }, + "projectKey": { "type": "string" }, + "projectName": { "type": "string" } + } + }, + "ReleasesSearchRestResponse": { + "type": "object", + "properties": { + "releases": { + "type": "array", + "items": { "$ref": "#/components/schemas/ReleaseSearchResource" } + }, + "packageManagerCounts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScaReleaseByPackageManagerCountDto" + } + }, + "branches": { + "type": "array", + "items": { "$ref": "#/components/schemas/BranchResource" } + }, + "countWithoutFilters": { "type": "integer", "format": "int32" }, + "page": { "$ref": "#/components/schemas/PageRestResponse" } + } + }, + "ScaReleaseByPackageManagerCountDto": { + "type": "object", + "properties": { + "packageManager": { "type": "string" }, + "releaseCount": { "type": "integer", "format": "int32" } + } + }, + "DependencyResource": { + "type": "object", + "properties": { + "key": { "type": "string" }, + "direct": { "type": "boolean" }, + "scope": { "type": "string" }, + "productionScope": { "type": "boolean" }, + "userDependencyFilePath": { "type": "string" }, + "lockfileDependencyFilePath": { "type": "string" }, + "chains": { + "type": "array", + "items": { "type": "array", "items": { "type": "string" } } + }, + "newlyIntroduced": { "type": "boolean" } + } + }, + "IssueResource": { + "type": "object", + "properties": { + "key": { "type": "string" }, + "severity": { "type": "string" }, + "showIncreasedSeverityWarning": { "type": "boolean" }, + "type": { + "type": "string", + "enum": ["VULNERABILITY", "PROHIBITED_LICENSE"] + }, + "quality": { + "type": "string", + "enum": ["MAINTAINABILITY", "RELIABILITY", "SECURITY"] + }, + "createdAt": { "type": "string" }, + "assignee": { "$ref": "#/components/schemas/UserResource" }, + "vulnerabilityId": { "type": "string" }, + "cweIds": { "type": "array", "items": { "type": "string" } }, + "cvssScore": { "type": "string" }, + "spdxLicenseId": { "type": "string" } + } + }, + "ReleaseDetailResource": { "type": "object", "properties": { "key": { "type": "string" }, + "branchUuid": { "type": "string" }, "packageUrl": { "type": "string" }, "packageManager": { "type": "string" }, "packageName": { "type": "string" }, "version": { "type": "string" }, "licenseExpression": { "type": "string" }, "known": { "type": "boolean" }, - "newInPullRequest": { "type": "boolean" }, + "knownPackage": { "type": "boolean" }, + "newlyIntroduced": { "type": "boolean" }, "directSummary": { "type": "boolean" }, "scopeSummary": { "type": "string" }, - "dependencyFilePaths": { + "productionScopeSummary": { "type": "boolean" }, + "dependencies": { "type": "array", - "items": { "type": "string" } + "items": { "$ref": "#/components/schemas/DependencyResource" } + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/IssueResource" } + }, + "branch": { "$ref": "#/components/schemas/BranchResource" } + } + }, + "LicenseProfileCollectionActions": { + "type": "object", + "properties": { "create": { "type": "boolean" } } + }, + "LicenseProfileIndexRestResponse": { + "type": "object", + "properties": { + "licenseProfiles": { + "type": "array", + "items": { "$ref": "#/components/schemas/LicenseProfileResource" } + }, + "actions": { + "$ref": "#/components/schemas/LicenseProfileCollectionActions" + } + } + }, + "LicenseProfileDetailsResource": { + "type": "object", + "properties": { + "profile": { "$ref": "#/components/schemas/LicenseProfileResource" }, + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LicenseProfileCategoryResource" + } + }, + "licenses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LicensePolicyLicenseResource" + } + } + } + }, + "AssignableProjectResource": { + "type": "object", + "properties": { + "projectKey": { "type": "string" }, + "projectName": { "type": "string" }, + "assignedToLicenseProfile": { "type": "boolean" } + } + }, + "AssignableProjectsIndexRestResponse": { + "type": "object", + "properties": { + "assignableProjects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AssignableProjectResource" + } + }, + "page": { "$ref": "#/components/schemas/PageRestResponse" } + } + }, + "IssueReleaseResource": { + "type": "object", + "properties": { + "key": { "type": "string" }, + "severity": { "type": "string" }, + "originalSeverity": { "type": "string" }, + "manualSeverity": { "type": "string" }, + "showIncreasedSeverityWarning": { "type": "boolean" }, + "release": { "$ref": "#/components/schemas/ReleaseSearchResource" }, + "type": { + "type": "string", + "enum": ["VULNERABILITY", "PROHIBITED_LICENSE"] + }, + "quality": { + "type": "string", + "enum": ["MAINTAINABILITY", "RELIABILITY", "SECURITY"] + }, + "status": { "type": "string" }, + "createdAt": { "type": "string" }, + "assignee": { "$ref": "#/components/schemas/UserResource" }, + "commentCount": { "type": "integer", "format": "int32" }, + "vulnerabilityId": { "type": "string" }, + "cweIds": { "type": "array", "items": { "type": "string" } }, + "cvssScore": { "type": "string" }, + "withdrawn": { "type": "boolean" }, + "spdxLicenseId": { "type": "string" }, + "transitions": { + "type": "array", + "items": { + "type": "string", + "enum": ["CONFIRM", "REOPEN", "SAFE", "FIXED", "ACCEPT"] + } + }, + "actions": { + "type": "array", + "items": { + "type": "string", + "enum": ["COMMENT", "ASSIGN", "SET_SEVERITY"] + }, + "uniqueItems": true } } }, - "ReleasesSearchRestResponse": { + "IssuesReleasesSearchRestResponse": { "type": "object", "properties": { - "releases": { + "issuesReleases": { "type": "array", - "items": { "$ref": "#/components/schemas/ReleaseSearchResource" } + "items": { "$ref": "#/components/schemas/IssueReleaseResource" } }, - "packageManagerCounts": { + "branches": { "type": "array", "items": { - "$ref": "#/components/schemas/ScaReleaseByPackageManagerCountDto" + "$ref": "#/components/schemas/IssueReleaseBranchResource" } }, + "countWithoutFilters": { "type": "integer", "format": "int32" }, "page": { "$ref": "#/components/schemas/PageRestResponse" } } }, - "ScaReleaseByPackageManagerCountDto": { + "IssueReleaseChangeDiffResource": { "type": "object", "properties": { - "packageManager": { "type": "string" }, - "releaseCount": { "type": "integer", "format": "int32" } + "fieldName": { "type": "string" }, + "oldValue": { "type": "string" }, + "newValue": { "type": "string" } } }, - "DependencyResource": { + "IssueReleaseChangeResource": { "type": "object", "properties": { "key": { "type": "string" }, - "direct": { "type": "boolean" }, - "scope": { "type": "string" }, - "productionScope": { "type": "boolean" }, - "userDependencyFilePath": { "type": "string" }, - "lockfileDependencyFilePath": { "type": "string" }, - "chains": { + "createdAt": { "type": "string" }, + "user": { "$ref": "#/components/schemas/UserResource" }, + "markdownComment": { "type": "string" }, + "htmlComment": { "type": "string" }, + "changeData": { "type": "array", - "items": { "type": "array", "items": { "type": "string" } } + "items": { + "$ref": "#/components/schemas/IssueReleaseChangeDiffResource" + } }, - "newInPullRequest": { "type": "boolean" } - } - }, - "IssueResource": { - "type": "object", - "properties": { - "key": { "type": "string" }, - "severity": { "type": "string" }, - "type": { "type": "string" }, - "createdAt": { "type": "string" }, - "vulnerabilityId": { "type": "string" }, - "cweIds": { "type": "array", "items": { "type": "string" } }, - "cvssScore": { "type": "string" }, - "spdxLicenseId": { "type": "string" } + "actions": { + "type": "array", + "items": { + "type": "string", + "enum": ["EDIT_COMMENT", "DELETE_COMMENT"] + }, + "uniqueItems": true + } } }, - "ReleaseDetailResource": { + "IssuesReleasesChangesRestResponse": { "type": "object", "properties": { - "key": { "type": "string" }, - "packageUrl": { "type": "string" }, - "packageManager": { "type": "string" }, - "packageName": { "type": "string" }, - "version": { "type": "string" }, - "licenseExpression": { "type": "string" }, - "known": { "type": "boolean" }, - "newInPullRequest": { "type": "boolean" }, - "directSummary": { "type": "boolean" }, - "scopeSummary": { "type": "string" }, - "productionScopeSummary": { "type": "boolean" }, - "dependencies": { - "type": "array", - "items": { "$ref": "#/components/schemas/DependencyResource" } - }, - "issues": { + "changelog": { "type": "array", - "items": { "$ref": "#/components/schemas/IssueResource" } + "items": { + "$ref": "#/components/schemas/IssueReleaseChangeResource" + } } } }, - "DependencyRiskResource": { + "ScaFeatureEnabledResource": { + "type": "object", + "properties": { "enabled": { "type": "boolean" } } + }, + "ScaCliInfoRestResponse": { "type": "object", "properties": { - "key": { "type": "string" }, - "severity": { "type": "string" }, - "release": { "$ref": "#/components/schemas/ReleaseSearchResource" }, - "type": { "type": "string" }, - "createdAt": { "type": "string" }, - "vulnerabilityId": { "type": "string" }, - "cweIds": { "type": "array", "items": { "type": "string" } }, - "cvssScore": { "type": "string" }, - "spdxLicenseId": { "type": "string" } + "id": { "type": "string" }, + "filename": { "type": "string" }, + "sha256": { "type": "string" }, + "os": { "type": "string" }, + "arch": { "type": "string" } } }, - "DependencyRisksSearchRestResponse": { + "AnalysisErrorResource": { "type": "object", "properties": { - "issuesReleases": { - "type": "array", - "items": { "$ref": "#/components/schemas/DependencyRiskResource" } + "code": { + "type": "string", + "enum": [ + "UNKNOWN", + "NO_DEPENDENCIES_FOUND", + "DEPENDENCY_FILES_PARSE_ERROR", + "UNSUPPORTED_PLATFORM", + "INEXACT_VERSIONS", + "MISSING_LOCKFILE" + ] }, - "page": { "$ref": "#/components/schemas/PageRestResponse" } + "path": { "type": "string" }, + "message": { "type": "string" } } }, - "AffectedPackageResource": { + "AnalysisResource": { "type": "object", "properties": { - "purl": { "type": "string" }, - "recommendation": { "type": "string" }, - "recommendationDetails": { - "$ref": "#/components/schemas/VulnerabilityRecommendationDetailsResource" - }, - "versionOptions": { - "type": "array", - "items": { "$ref": "#/components/schemas/VersionOptionResource" } + "status": { + "type": "string", + "enum": ["FAILED", "OUTDATED", "COMPLETED"] }, - "affectedVersions": { + "failedReason": { "type": "string" }, + "errors": { "type": "array", - "items": { "type": "string" } + "items": { "$ref": "#/components/schemas/AnalysisErrorResource" } }, - "unaffectedVersions": { "type": "string" } + "parsedFiles": { "type": "array", "items": { "type": "string" } } } }, - "DependencyRiskDetailsResource": { + "JiraWorkTypeFieldResultResource": { "type": "object", "properties": { - "key": { "type": "string" }, - "severity": { "type": "string" }, - "release": { "$ref": "#/components/schemas/ReleaseSearchResource" }, - "type": { "type": "string" }, - "createdAt": { "type": "string" }, - "vulnerability": { - "$ref": "#/components/schemas/VulnerabilityResource" + "key": { + "type": "string", + "description": "The field key", + "readOnly": true }, - "spdxLicenseId": { "type": "string" } + "name": { + "type": "string", + "description": "The field name", + "readOnly": true + }, + "required": { + "type": "boolean", + "description": "Whether the field is required", + "readOnly": true + }, + "hasDefaultValue": { + "type": "boolean", + "description": "Whether the field has a default value", + "readOnly": true + } } }, - "VersionOptionResource": { + "JiraWorkTypeResultResource": { "type": "object", "properties": { - "version": { + "id": { "type": "string", - "description": "The version being presented as an option" + "description": "the Jira work type id", + "readOnly": true }, - "vulnerabilityIds": { - "type": "array", - "description": "Vulnerability IDs affecting this version", - "items": { "type": "string" } + "name": { + "type": "string", + "description": "the Jira work type name", + "readOnly": true }, - "prerelease": { + "description": { + "type": "string", + "description": "the Jira work type description", + "readOnly": true + }, + "subtask": { "type": "boolean", - "description": "Is this version a pre-release version" + "description": "true, if the Jira work type is a subtask", + "readOnly": true }, - "fixLevel": { - "type": "string", - "description": "Describes which vulnerabilities are fixed", - "enum": ["COMPLETE", "PARTIAL", "NONE", "UNKNOWN"] + "hierarchyLevel": { + "type": "integer", + "format": "int32", + "description": "the Jira work type hierarchy", + "readOnly": true }, - "descriptionCode": { - "type": "string", - "description": "How the frontend should label this version", - "enum": [ - "VERSION_IN_USE", - "NEAREST_PARTIAL", - "NEAREST_COMPLETE", - "LATEST_PARTIAL", - "LATEST_COMPLETE", - "LATEST_STABLE", - "LATEST_PRERELEASE", - "UNKNOWN" - ] + "selected": { + "type": "boolean", + "description": "true, if the Jira work type is selected", + "readOnly": true + }, + "fields": { + "type": "array", + "description": "Array of field metadata for the specified work type. (Optional)", + "items": { + "$ref": "#/components/schemas/JiraWorkTypeFieldResultResource" + }, + "readOnly": true } } }, - "VulnerabilityRecommendationDetailsResource": { + "JiraProjectResultResource": { "type": "object", "properties": { - "impactScore": { "type": "integer", "format": "int32" }, - "impactDescription": { "type": "string" }, - "realIssue": { "type": "boolean" }, - "falsePositiveReason": { "type": "string" }, - "includesDev": { "type": "boolean" }, - "specificMethodsAffected": { "type": "boolean" }, - "specificMethodsDescription": { "type": "string" }, - "otherConditions": { "type": "boolean" }, - "otherConditionsDescription": { "type": "string" }, - "workaroundAvailable": { "type": "boolean" }, - "workaroundDescription": { "type": "string" }, - "visibility": { "type": "string" } + "name": { + "type": "string", + "description": "the name of the project", + "readOnly": true + }, + "key": { + "type": "string", + "description": "the key of the project", + "readOnly": true + } } }, - "VulnerabilityReportResource": { + "LinkedIssuesCountResource": { "type": "object", "properties": { - "id": { "type": "string" }, - "url": { "type": "string" }, - "type": { "type": "string" }, - "cvssScore": { "type": "string" }, - "cvssSeverity": { "type": "string" } + "count": { + "type": "integer", + "format": "int32", + "description": "Count of linked Jira issues", + "readOnly": true + } } }, - "VulnerabilityResource": { + "IntegrationConfigurationSearchResponse": { "type": "object", "properties": { - "vulnerabilityId": { "type": "string" }, - "reports": { + "integrationConfigurations": { "type": "array", "items": { - "$ref": "#/components/schemas/VulnerabilityReportResource" + "$ref": "#/components/schemas/IntegrationConfigurationResponse" } - }, - "description": { "type": "string" }, - "epssPercentile": { "type": "string" }, - "epssProbability": { "type": "string" }, - "knownExploited": { "type": "boolean" }, - "cweIds": { "type": "array", "items": { "type": "string" } }, - "affectedPackages": { - "type": "array", - "items": { "$ref": "#/components/schemas/AffectedPackageResource" } } } }, - "ScaCliInfoRestResponse": { + "SupportedRulesDto": { "type": "object", "properties": { - "id": { "type": "string" }, - "filename": { "type": "string" }, - "sha256": { "type": "string" }, - "os": { "type": "string" }, - "arch": { "type": "string" } + "rules": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true + } } }, "LlmModelDto": { @@ -3802,20 +7130,6 @@ "TIMEOUT", "UNAUTHORIZED" ] - }, - "isEnabled": { "type": "boolean" }, - "subscriptionType": { - "type": "string", - "enum": ["EARLY_ACCESS", "PAID", "NOT_PAID"] - } - } - }, - "SubscriptionTypeResponse": { - "type": "object", - "properties": { - "subscriptionType": { - "type": "string", - "enum": ["EARLY_ACCESS", "PAID", "NOT_PAID"] } } }, @@ -3861,6 +7175,59 @@ "endpoint": { "type": "string" } } }, + "PurchasableFeatureRestResponse": { + "type": "object", + "properties": { + "featureKey": { "type": "string" }, + "parent": { "type": "string" }, + "isEnabled": { "type": "boolean" }, + "isAvailable": { "type": "boolean" }, + "url": { "type": "string" } + } + }, + "LicenseFeatureRestResponse": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "parent": { "type": "string" }, + "startDate": { "type": "string" }, + "endDate": { "type": "string" } + } + }, + "LicenseRestResponse": { + "type": "object", + "properties": { + "expirationDate": { "type": "string" }, + "lastRefreshDate": { "type": "string" }, + "edition": { "type": "string" }, + "features": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LicenseFeatureRestResponse" + } + }, + "maxLoc": { "type": "integer", "format": "int64" }, + "loc": { "type": "integer", "format": "int64" }, + "serverId": { "type": "string" }, + "type": { "type": "string" }, + "contactEmail": { "type": "string" }, + "remainingLocThreshold": { "type": "integer", "format": "int64" }, + "canActivateGracePeriod": { "type": "boolean" }, + "gracePeriodEndDate": { "type": "string" }, + "gracePeriodExpired": { "type": "boolean" }, + "extraDays": { "type": "integer", "format": "int32" }, + "startDate": { "type": "string" }, + "activatedOnline": { "type": "boolean" }, + "licenseKey": { "type": "string" }, + "validEdition": { "type": "boolean" }, + "validServerId": { "type": "boolean" }, + "officialDistribution": { "type": "boolean" }, + "supported": { "type": "boolean" }, + "legacy": { "type": "boolean" }, + "expired": { "type": "boolean" }, + "disabled": { "type": "boolean" } + } + }, "ProjectBinding": { "type": "object", "properties": { @@ -3963,6 +7330,32 @@ "page": { "$ref": "#/components/schemas/PageRestResponse" } } }, + "_a": { + "type": "object", + "properties": { + "graphs": { + "type": "array", + "items": { "$ref": "#/components/schemas/_h" } + } + } + }, + "_h": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "branchId": { "type": "string" }, + "type": { + "type": "string", + "enum": ["file_graph", "namespace_graph"] + }, + "ecosystem": { + "type": "string", + "enum": ["java", "js", "ts", "py", "cs", "xoo"] + }, + "perspectiveKey": { "type": "string" }, + "graphVersion": { "type": "string" } + } + }, "JreInfoRestResponse": { "type": "object", "properties": { diff --git a/yarn.lock b/yarn.lock index f001d4a..d172cd8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1128,6 +1128,7 @@ __metadata: "@types/jest": "npm:^30.0.0" "@types/node": "npm:^24.10.1" eslint: "npm:^9.36.0" + husky: "npm:^9.1.7" jest: "npm:^30.2.0" msw: "npm:^2.11.2" openapi-merge-cli: "npm:^1.3.2" @@ -2796,6 +2797,15 @@ __metadata: languageName: node linkType: hard +"husky@npm:^9.1.7": + version: 9.1.7 + resolution: "husky@npm:9.1.7" + bin: + husky: bin.js + checksum: 10c0/35bb110a71086c48906aa7cd3ed4913fb913823715359d65e32e0b964cb1e255593b0ae8014a5005c66a68e6fa66c38dcfa8056dbbdfb8b0187c0ffe7ee3a58f + languageName: node + linkType: hard + "iconv-lite@npm:^0.6.2": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3"