diff --git a/spec/openapi.yaml b/spec/openapi.yaml index 071dd34..60f08f3 100644 --- a/spec/openapi.yaml +++ b/spec/openapi.yaml @@ -191,6 +191,62 @@ components: inheritedFromOrganizationName: type: string type: object + ApiAutoPolicyWaiverDTO: + properties: + autoPolicyWaiverId: + type: string + createTime: + format: date-time + type: string + creatorId: + type: string + creatorName: + type: string + ownerId: + type: string + pathForward: + type: boolean + reachable: + type: boolean + threatLevel: + format: int32 + type: integer + type: object + ApiAutoPolicyWaiverRevocationDTO: + properties: + associatedPackageUrl: + type: string + autoPolicyWaiverId: + type: string + autoPolicyWaiverRevocationId: + type: string + createTime: + format: date-time + type: string + creatorId: + type: string + creatorName: + type: string + hash: + type: string + ownerId: + type: string + scanId: + type: string + type: object + ApiAutoPolicyWaiverStatusDTO: + properties: + autoPolicyWaiverId: + type: string + autoPolicyWaiverOwnerId: + type: string + autoPolicyWaiverOwnerName: + type: string + isAutoWaiverEnabled: + type: boolean + isInherited: + type: boolean + type: object ApiComponentChangeActionDTO: properties: component: @@ -557,6 +613,11 @@ components: type: string policyViolationId: type: string + reachabilityStatus: + enum: + - REACHABLE + - NON_REACHABLE + type: string stageData: additionalProperties: $ref: '#/components/schemas/StageData' @@ -1047,6 +1108,22 @@ components: username: type: string type: object + ApiMalwareComponentEvaluationRequest: + properties: + hash: + type: string + packageUrl: + type: string + type: object + ApiMalwareComponentEvaluationRequestList: + properties: + components: + items: + $ref: '#/components/schemas/ApiMalwareComponentEvaluationRequest' + type: array + format: + type: string + type: object ApiMatchStateSummaryDTOV2: properties: knownComponentCount: @@ -1143,6 +1220,25 @@ components: ownerType: type: string type: object + ApiPageResultPrioritizedComponent: + properties: + page: + format: int32 + type: integer + pageCount: + format: int64 + type: integer + pageSize: + format: int32 + type: integer + results: + items: + $ref: '#/components/schemas/PrioritizedComponent' + type: array + total: + format: int64 + type: integer + type: object ApiPolicyDTO: properties: id: @@ -1155,6 +1251,9 @@ components: enum: - APPLICATION - ORGANIZATION + - REPOSITORY_CONTAINER + - REPOSITORY_MANAGER + - REPOSITORY type: string policyType: type: string @@ -1383,6 +1482,10 @@ components: $ref: '#/components/schemas/ApiDependencyDataDTO' displayName: type: string + filenames: + items: + type: string + type: array hash: type: string identificationSource: @@ -2455,46 +2558,6 @@ components: templateName: type: string type: object - BodyPart: - properties: - contentDisposition: - $ref: '#/components/schemas/ContentDisposition' - entity: - type: object - headers: - additionalProperties: - items: - type: string - type: array - type: object - mediaType: - properties: - parameters: - additionalProperties: - type: string - type: object - subtype: - type: string - type: - type: string - wildcardSubtype: - type: boolean - wildcardType: - type: boolean - type: object - messageBodyWorkers: - $ref: '#/components/schemas/MessageBodyWorkers' - parameterizedHeaders: - additionalProperties: - items: - $ref: '#/components/schemas/ParameterizedHeader' - type: array - type: object - parent: - $ref: '#/components/schemas/MultiPart' - providers: - type: object - type: object ComponentDisplayName: properties: name: @@ -2579,6 +2642,8 @@ components: $ref: '#/components/schemas/ValidationResult' repoPrivate: $ref: '#/components/schemas/ValidationResult' + repoPublic: + $ref: '#/components/schemas/ValidationResult' sshConfiguration: $ref: '#/components/schemas/ValidationResult' tokenPermissions: @@ -2597,29 +2662,6 @@ components: operatorName: type: string type: object - ContentDisposition: - properties: - creationDate: - format: date-time - type: string - fileName: - type: string - modificationDate: - format: date-time - type: string - parameters: - additionalProperties: - type: string - type: object - readDate: - format: date-time - type: string - size: - format: int64 - type: integer - type: - type: string - type: object CweId: properties: id: @@ -2628,53 +2670,14 @@ components: format: uri type: string type: object - FormDataBodyPart: + DevelopmentPrioritizationResults: properties: - contentDisposition: - $ref: '#/components/schemas/ContentDisposition' - entity: - type: object - formDataContentDisposition: - $ref: '#/components/schemas/FormDataContentDisposition' - headers: - additionalProperties: - items: - type: string - type: array - type: object - mediaType: - properties: - parameters: - additionalProperties: - type: string - type: object - subtype: - type: string - type: - type: string - wildcardSubtype: - type: boolean - wildcardType: - type: boolean - type: object - messageBodyWorkers: - $ref: '#/components/schemas/MessageBodyWorkers' - name: - type: string - parameterizedHeaders: - additionalProperties: - items: - $ref: '#/components/schemas/ParameterizedHeader' - type: array - type: object - parent: - $ref: '#/components/schemas/MultiPart' - providers: - type: object - simple: - type: boolean - value: - type: string + additionalPriorities: + $ref: '#/components/schemas/ApiPageResultPrioritizedComponent' + topPriorities: + items: + $ref: '#/components/schemas/PrioritizedComponent' + type: array type: object FormDataContentDisposition: properties: @@ -2701,56 +2704,6 @@ components: type: type: string type: object - FormDataMultiPart: - properties: - bodyParts: - items: - $ref: '#/components/schemas/BodyPart' - type: array - contentDisposition: - $ref: '#/components/schemas/ContentDisposition' - entity: - type: object - fields: - additionalProperties: - items: - $ref: '#/components/schemas/FormDataBodyPart' - type: array - type: object - headers: - additionalProperties: - items: - type: string - type: array - type: object - mediaType: - properties: - parameters: - additionalProperties: - type: string - type: object - subtype: - type: string - type: - type: string - wildcardSubtype: - type: boolean - wildcardType: - type: boolean - type: object - messageBodyWorkers: - $ref: '#/components/schemas/MessageBodyWorkers' - parameterizedHeaders: - additionalProperties: - items: - $ref: '#/components/schemas/ParameterizedHeader' - type: array - type: object - parent: - $ref: '#/components/schemas/MultiPart' - providers: - type: object - type: object GroupingByDTO: properties: additionalInfo: @@ -2873,60 +2826,23 @@ components: format: int32 type: integer type: object - MessageBodyWorkers: + MalwareDefenseData: + properties: + hash: + type: string + isMalicious: + type: boolean + matchState: + type: string + packageUrl: + type: string type: object - MultiPart: + MalwareDefenseResponseList: properties: - bodyParts: + componentList: items: - $ref: '#/components/schemas/BodyPart' + $ref: '#/components/schemas/MalwareDefenseData' type: array - contentDisposition: - $ref: '#/components/schemas/ContentDisposition' - entity: - type: object - headers: - additionalProperties: - items: - type: string - type: array - type: object - mediaType: - properties: - parameters: - additionalProperties: - type: string - type: object - subtype: - type: string - type: - type: string - wildcardSubtype: - type: boolean - wildcardType: - type: boolean - type: object - messageBodyWorkers: - $ref: '#/components/schemas/MessageBodyWorkers' - parameterizedHeaders: - additionalProperties: - items: - $ref: '#/components/schemas/ParameterizedHeader' - type: array - type: object - parent: - $ref: '#/components/schemas/MultiPart' - providers: - type: object - type: object - ParameterizedHeader: - properties: - parameters: - additionalProperties: - type: string - type: object - value: - type: string type: object PolicyAlert: properties: @@ -3026,6 +2942,47 @@ components: tagId: type: string type: object + PrioritizedComponent: + properties: + action: + type: string + componentHash: + type: string + componentIdentifier: + $ref: '#/components/schemas/ComponentIdentifier' + dependencyType: + type: string + displayName: + type: string + hasFailActionOnComponent: + type: boolean + highestReachableThreat: + format: int32 + type: integer + highestThreat: + format: int32 + type: integer + highestThreatPolicyConstraintName: + type: string + highestThreatPolicyName: + type: string + priority: + format: int32 + type: integer + remediationType: + enum: + - next-no-violations + - next-non-failing + - next-no-violations-with-dependencies + - next-non-failing-with-dependencies + - recommended-non-breaking + - recommended-non-breaking-with-dependencies + type: string + remediationVersion: + type: string + securityReachable: + type: boolean + type: object ReferenceLink: properties: referenceType: @@ -3060,6 +3017,12 @@ components: type: string displayName: type: string + fileCoordinateId: + type: string + filenames: + items: + type: string + type: array hash: type: string licenses: @@ -3067,6 +3030,8 @@ components: $ref: '#/components/schemas/License' type: array uniqueItems: true + matchStateId: + type: string name: type: string packageUrl: @@ -3074,6 +3039,9 @@ components: percentageAnnotated: format: double type: number + policyViolationCount: + format: int32 + type: integer version: type: string vulnerabilitySeverityCriticalCount: @@ -3475,7 +3443,7 @@ components: type: http info: title: Sonatype Lifecycle Public REST API - version: 1.182.0-01 + version: 1.184.0-01 openapi: 3.0.1 paths: /api/v2/applicationCategories/application: @@ -3746,16 +3714,24 @@ paths: - Application Categories /api/v2/applications: get: + description: 'Use this method to retrieve the application details for the applicationId(s) + provided. + + + Permissions required: View IQ Elements' operationId: getApplications parameters: - - in: query + - description: Enter the applicationId. + in: query name: publicId schema: items: type: string type: array uniqueItems: true - - in: query + - description: Set this parameter to `true` to obtain the application tags (application + categories) in the response. + in: query name: includeCategories schema: default: false @@ -3770,73 +3746,110 @@ paths: tags: - Applications post: + description: 'Use this method to create an application under an organization. + Use the Organization REST API to obtain organizationId. + + + Permissions required: Add Application (on parent organization)' operationId: addApplication requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiApplicationDTO' + description: Specify the applicationId, application name and the organizationId + under which the application should be created. `contactUserName` corresponds + to the 'contact' field in the UI and represents the user name. If LDAP is + used for authentication, you can use LDAP usernames.`tagId` is the internal + identifier for the Application Category that you want to apply to the application. + Use the Application Categories REST API for the available categories and + the corresponding tagIds. responses: - default: + '200': content: application/json: schema: $ref: '#/components/schemas/ApiApplicationDTO' - description: default response + description: The response contains application details for the application + created using this method. tags: - Applications /api/v2/applications/organization/{organizationId}: get: + description: 'Use this method to retrieve application details for all applications + under the organizationId provided. + + + Permissions required: View IQ Elements' operationId: getApplicationsByOrganizationId parameters: - - in: path + - description: Enter the organizationId. + in: path name: organizationId required: true schema: type: string responses: - default: + '200': content: application/json: schema: $ref: '#/components/schemas/ApiApplicationListDTO' - description: default response + description: The response contains the details of all applications found + under the organizationId provided. tags: - Applications /api/v2/applications/{applicationId}: delete: + description: 'Use this method to permanently delete an existing application + and all data associated with it. This action cannot be un-done. Before deleting, + confirm that the application being deleted does not impact any integrations + that could depend on it. + + + Permissions required: Edit IQ Elements' operationId: deleteApplication parameters: - - in: path + - description: Enter the applicationId to be deleted. + in: path name: applicationId required: true schema: type: string responses: - default: - content: - '*/*': {} - description: default response + '200': + description: Application deleted successfully tags: - Applications get: + description: 'Use this method to retrieve the application details, by providing + the applicationId. + + + Permissions required: View IQ Elements' operationId: getApplication parameters: - - in: path + - description: Enter the applicationId. + in: path name: applicationId required: true schema: type: string responses: - default: + '200': content: application/json: schema: $ref: '#/components/schemas/ApiApplicationDTO' - description: default response + description: The response contains the details of the application corresponding + to the applicationId. tags: - Applications put: + description: "Use this method to update the application name, application tags\ + \ or the contact user name for an existing application by providing the applicationId.\ + \ \n\nNOTE: This method cannot be used to change the organizationId of an\ + \ application.\n\nPermissions required: Edit IQ Elements" operationId: updateApplication parameters: - in: path @@ -3849,36 +3862,63 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiApplicationDTO' + description: Specify the applicationId, application name and the organizationId + under which the application exists. `contactUserName` corresponds to the + 'contact' field in the UI and represents the user name. If LDAP is used + for authentication, you can use LDAP usernames.`tagId` is the internal identifier + for the Application Category that you want to apply to the application. + . Use the Application Categories REST API for the available categories and + the corresponding tagIds. responses: - default: + '200': content: application/json: schema: $ref: '#/components/schemas/ApiApplicationDTO' - description: default response + description: The response contains the updated application name, contact + user name and application tags, for the applicationId provided tags: - Applications /api/v2/applications/{applicationId}/move/organization/{organizationId}: post: + description: 'Use this method to move an application from one organization to + another. + + + Permissions required: Edit IQ Elements' operationId: moveApplication parameters: - - in: path + - description: Enter the applicationId of the application to be moved. + in: path name: applicationId required: true schema: type: string - - in: path + - description: Enter the organizationId of the destination organization. + in: path name: organizationId required: true schema: type: string responses: - default: + '200': content: application/json: schema: $ref: '#/components/schemas/ApiMoveApplicationResponseDTOV2' - description: default response + description: Application moved successfully, with/without warnings. Warnings, + if any, will appear in the response body. + '404': + description: Moving the application failed because either an application + with the provided applicationId or the organizationId for the organization + where it is to be moved is not found. + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/ApiMoveApplicationResponseDTOV2' + description: Moving the application failed due to conflicts between the + organizations. tags: - Applications /api/v2/applications/{applicationPublicId}/reports/policyViolations/diff: @@ -4081,110 +4121,513 @@ paths: - Application Report Data /api/v2/applications/{sourceApplicationId}/clone: post: + description: 'Use this method to clone an existing application. + + + Permissions required: Add Application (on the parent organization)' operationId: cloneApplication parameters: - - in: path + - description: Enter the applicationId for the application to be cloned. + in: path name: sourceApplicationId required: true schema: type: string - - in: query + - description: Enter the application name for the new cloned application. + in: query name: clonedApplicationName schema: type: string - - in: query + - description: Enter the applicationPublicId for the cloned application. + in: query name: clonedApplicationPublicId schema: type: string responses: - default: + '200': content: application/json: schema: $ref: '#/components/schemas/ApiApplicationDTO' - description: default response + description: The response contains application details of the cloned application. tags: - Applications /api/v2/auditLogs: get: + description: 'Use this method to retrieve the audit events for the specified + time period. + + + Permissions required: Access Audit Log' operationId: getAuditLogs parameters: - - in: query + - description: Enter the start UTC date in the format (yyyy-mm-dd). + in: query name: startUtcDate schema: type: string - - in: query + - description: Enter the end UTC date in the format (yyyy-mm-dd). + in: query name: endUtcDate schema: type: string responses: - default: + '200': content: text/plain: {} - description: default response + description: The response text contains lines of audit events in chronologically + ascending order. tags: - Audit Logs + /api/v2/autoPolicyWaiverRevocations/{ownerType}/{ownerId}: + post: + description: 'Use this method to create an auto policy waiver revocation for + a specified auto policy waiver. + + + Permissions required: Waive Policy Violations' + operationId: addAutoPolicyWaiverRevocation + parameters: + - description: Enter the ownerType to specify the scope. + in: path + name: ownerType + required: true + schema: + enum: + - application + - organization + - repository_container + - repository_manager + - repository + - global + pattern: application|organization + type: string + - description: Enter the corresponding id for the ownerType specified above. + in: path + name: ownerId + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiAutoPolicyWaiverRevocationDTO' + description: The request JSON can include the fields
id
+ is the internal identifier for the SCM configuration.ownerId
+ is the identifier for the ownerType specified.repositoryUrl
+ indicates the URL of application/organization. Will indicate 'null' for
+ organizations.provider
is the name of the source
+ code host for the parent. Values can be Azure, GitHub, GitLab and Bitbucket.username
+ is returned if found for the specific provider. Currently, the values
+ are available for Bitbucket Server and Bitbucket Cloud.token
+ is obfuscated and indicates the composite configuration for the source
+ control host.baseBranch
shows the base branch name.remediationPullRequestsEnabled
+ indicates if the Automated Pull Request feature is enabled.statusChecksEnabled
+ indicates if the status checks for the source code are enabled.pullRequestCommentingEnabled
+ indicates if PR commenting is enabled for this application/organization.sourceControlEvaluationsEnabled
+ indicates if the evaluations triggered by the IQ Server are enabled, for
+ the Continuous Risk Profile feature.sshEnabled
indicates
+ if ssh settings are enabled.commitStatusEnabled
+ indicates if commit status check is enabled.Permissions + required: View IQ Elements' + operationId: getParentDataRetentionPolicies + parameters: + - description: The organizationId assigned by IQ Server. Use the organization + REST API to retrieve the parent organizationId + in: path + name: organizationId + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApiDataRetentionPoliciesDTO' + description: The response JSON contains the policy settings for both applicationReports + and successMetrics. Policy settings for application reports are shown + for each stage of development.
Permissions - required: View IQ Elements' - operationId: getParentDataRetentionPolicies + description: 'Use this method to retrieve the priorities for the specified application + Id and scan Id + + + Permissions required: View IQ Elements ' + operationId: getPrioritiesExport parameters: - - description: The organizationId assigned by IQ Server. Use the organization - REST API to retrieve the parent organizationId - in: path - name: organizationId + - in: path + name: applicationId + required: true + schema: + type: string + - in: path + name: scanId required: true schema: type: string responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ApiDataRetentionPoliciesDTO' - description: The response JSON contains the policy settings for both applicationReports - and successMetrics. Policy settings for application reports are shown - for each stage of development.
Use this endpoint + to evaluate malware for a list of components up to a maximum of 100 components + in a single request.A hash or packageUrl (or both) can be supplied for each + component that are of the same format type. + operationId: evaluateMalware + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiMalwareComponentEvaluationRequestList' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MalwareDefenseResponseList' + description: Malware evaluation results for the components + tags: + - Malware + /api/v2/malware/defense/metrics: + get: + description: The response contains malware defense API metrics.
Use this endpoint + to get the count of malicious components evaluated via malware defense API + grouped by format. + operationId: getMalwareDefenseMetrics + responses: + '200': + content: + application/json: + schema: + additionalProperties: + format: int64 + type: integer + type: object + description: Malware defense metrics grouped by format. + tags: + - Malware /api/v2/organizations: get: operationId: getOrganizations @@ -6637,6 +7264,32 @@ paths: if the violation is due to an 'InnerSource' component. tags: - Policy Violation Details + /api/v2/policyViolations/{violationId}/applicableAutoWaiver: + get: + description: 'Use this method to obtain the existing auto waiver applicable + to a policy violationviolation. + + + Permissions required: View IQ Elements' + operationId: getApplicableAutoWaiver + parameters: + - description: 'Enter the policy violationId for which you want to obtain the + applicable auto policy waiver ' + in: path + name: violationId + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApiAutoPolicyWaiverDTO' + description: 'The response contains details for applicable auto waiver for + the `violationId` specified. ' + tags: + - Policy Violation Details /api/v2/policyViolations/{violationId}/applicableWaivers: get: description: 'Use this method to obtain all existing waivers that are applicable @@ -7427,9 +8080,17 @@ paths: - Repositories /api/v2/roleMemberships/{ownerType}: get: + description: 'Use this method to retrieve all users and roles globally or for + all repositories. + + + Permissions required: Edit system configuration and users for a global context + or view IQ elements for a non-global context' operationId: getRoleMembershipsGlobalOrRepositoryContainer parameters: - - in: path + - description: Enter the value for ownerType. Using `global` will return the + users and groups who have been assigned the administrator role. + in: path name: ownerType required: true schema: @@ -7443,19 +8104,28 @@ paths: pattern: global|repository_container type: string responses: - default: + '200': content: application/json: schema: $ref: '#/components/schemas/ApiRoleMemberMappingListDTO' - description: default response + description: The response contains all role Ids and the corresponding users/user + groups assigned to them, for the ownerType specified. It also includes + members who inherit a role based on the organization hierarchy. tags: - Role Memberships /api/v2/roleMemberships/{ownerType}/role/{roleId}/{memberType}/{memberName}: delete: + description: 'Use this method to revoke roles globally or on all repositories. + + + Permissions required: Edit system configuration and users for a global context + or view IQ elements for a non-global context' operationId: revokeRoleMembershipGlobalOrRepositoryContainer parameters: - - in: path + - description: Enter the value for ownerType. Using `global` will revoke the + administrator role. + in: path name: ownerType required: true schema: @@ -7468,12 +8138,14 @@ paths: - global pattern: global|repository_container type: string - - in: path + - description: Enter the roleId for the role to be revoked. + in: path name: roleId required: true schema: type: string - - in: path + - description: Enter the value for memberType, to specify a user or a user group. + in: path name: memberType required: true schema: @@ -7482,22 +8154,30 @@ paths: - GROUP pattern: user|group type: string - - in: path + - description: Enter the value for memberName. This can be a username or group + name depending upon the value of memberType above. + in: path name: memberName required: true schema: type: string responses: - default: - content: - '*/*': {} - description: default response + '204': + description: The specified role has been revoked from the user or user group. tags: - Role Memberships put: + description: 'Use this method to grant a role to a user or user group globally + or on all repositories. + + + Permissions required: Edit system configuration and users for a global context + or edit access control for a non-global context' operationId: grantRoleMembershipGlobalOrRepositoryContainer parameters: - - in: path + - description: Enter the value for the ownerType for which you want to grant + the role. + in: path name: ownerType required: true schema: @@ -7510,12 +8190,17 @@ paths: - global pattern: global|repository_container type: string - - in: path + - description: 'Enter the roleId for the role to be granted. + + + Use the Roles REST API for roleIds and descriptions.' + in: path name: roleId required: true schema: type: string - - in: path + - description: Enter the value for memberType, to specify a user or a user group. + in: path name: memberType required: true schema: @@ -7524,23 +8209,32 @@ paths: - GROUP pattern: user|group type: string - - in: path + - description: Enter the value for memberName. This can be a username or group + name depending upon the value of memberType above. + in: path name: memberName required: true schema: type: string responses: - default: - content: - '*/*': {} - description: default response + '200': + description: The specified role has been granted to the users or user groups + on the given context. tags: - Role Memberships /api/v2/roleMemberships/{ownerType}/{internalOwnerId}: get: + description: 'Use this method to retrieve the users, user groups and the corresponding + role Ids. + + + Permissions required: Edit system configuration and users for a global context + or view IQ elements for a non-global context' operationId: getRoleMembershipsApplicationOrOrganization parameters: - - in: path + - description: Enter the ownerType for which you want to retrieve users and + their role Ids. + in: path name: ownerType required: true schema: @@ -7553,25 +8247,35 @@ paths: - global pattern: application|organization type: string - - in: path + - description: Enter the corresponding id for the ownerType specified above. + in: path name: internalOwnerId required: true schema: type: string responses: - default: + '200': content: application/json: schema: $ref: '#/components/schemas/ApiRoleMemberMappingListDTO' - description: default response + description: The response contains the assigned role Ids, users and user + groups for the application or organization requested. It also includes + members who inherit a role based on the organization hierarchy. tags: - Role Memberships /api/v2/roleMemberships/{ownerType}/{internalOwnerId}/role/{roleId}/{memberType}/{memberName}: delete: + description: 'Use this method to revoke a role from a user or user group, on + a specific application or organization. + + + Permissions required: Edit access control' operationId: revokeRoleMembershipApplicationOrOrganization parameters: - - in: path + - description: Enter the value for the ownerType for which you want to revoke + the role. Using `global` will revoke the administrator role. + in: path name: ownerType required: true schema: @@ -7584,17 +8288,21 @@ paths: - global pattern: application|organization type: string - - in: path + - description: Enter the internalId associated with the ownerType specified + above. + in: path name: internalOwnerId required: true schema: type: string - - in: path + - description: Enter the roleId for the role to be revoked. + in: path name: roleId required: true schema: type: string - - in: path + - description: Enter the value for memberType, to specify a user or a user group. + in: path name: memberType required: true schema: @@ -7603,22 +8311,29 @@ paths: - GROUP pattern: user|group type: string - - in: path + - description: Enter the value for memberName. This can be a username or group + name depending upon the value of memberType above. + in: path name: memberName required: true schema: type: string responses: - default: - content: - '*/*': {} - description: default response + '204': + description: The specified role has been revoked from the user or user group tags: - Role Memberships put: + description: 'Use this method to grant a role to a user or user group for the + specified application or organization. + + + Permissions required: Edit access control' operationId: grantRoleMembershipApplicationOrOrganization parameters: - - in: path + - description: Enter the value for the ownerType for which you want to grant + the role. + in: path name: ownerType required: true schema: @@ -7631,17 +8346,24 @@ paths: - global pattern: application|organization type: string - - in: path + - description: Enter the value for the internalId associated with the ownerType + specified above. + in: path name: internalOwnerId required: true schema: type: string - - in: path + - description: 'Enter the roleId for the role to be granted. + + + Use the Roles REST API for roleIds and descriptions.' + in: path name: roleId required: true schema: type: string - - in: path + - description: Enter the value for memberType, to specify a user or a user group. + in: path name: memberType required: true schema: @@ -7650,28 +8372,33 @@ paths: - GROUP pattern: user|group type: string - - in: path + - description: Enter the value for memberName. This can be a username or group + name depending upon the value of memberType above. + in: path name: memberName required: true schema: type: string responses: - default: - content: - '*/*': {} - description: default response + '200': + description: The specified roleId has been has been granted to the user + or user group for the requested context. tags: - Role Memberships /api/v2/roles: get: + description: 'Use this method to view the role IDs, role names and descriptions. + + + Permissions required: View All Roles' operationId: getRoles responses: - default: + '200': content: application/json: schema: $ref: '#/components/schemas/ApiRoleListDTO' - description: default response + description: The response contains the role IDs, role names and descriptions. tags: - Roles /api/v2/sbom/applications/{applicationId}: @@ -8006,6 +8733,13 @@ paths: post: description: Imports a new sbom version to an existing application operationId: importSbom + parameters: + - description: Enable importing as a binary file. default = false + in: query + name: enableBinaryImport + schema: + default: false + type: boolean requestBody: content: '*/*': @@ -8014,8 +8748,10 @@ paths: applicationId: description: The internal id of the application type: string + applicationVersion: + type: string file: - type: object + $ref: '#/components/schemas/FormDataContentDisposition' required: - applicationId type: object @@ -8306,15 +9042,26 @@ paths: - Solutions /api/v2/sourceControl/automaticRoleAssignment/{publicId}: post: + description: 'Use this method to automatically grant the ''developer'' role + to all contributors of a repository on a given application. + + + Prerequisites for automatic role assignment are:
id
is the owner internal ID.repositoryUrl
+ indicates the http(s) and ssh urls for the application specified in the
+ ownerId.username
is retrieved if available on the
+ SCM system, e.g. for Bitbucket Server and Cloud.provider
+ indicates the name of the SCM system.baseBranch
+ indicates the name of the last selected branch.enablePullRequests
+ has been deprecated in version 124.remediationPullRequestsEnabled
+ indicates if the Automated Pull Requests feature is enabled.enableStatusChecks
+ has been deprecated in version 124.statusChecksEnabled
+ is an internal field.pullRequestCommentingEnabled
+ indicates if the Pull Request Commenting feature is enabled.sourceControlEvaluationsEnabled
+ indicates if the source control evaluations are enabled for the continuous
+ risk profile feature.sourceControlScanTarget
indicates
+ the path inside the repository.sshEnabled
indicates
+ if ssh is enabled.commitStatusEnabled
indicates
+ if interaction with the commit statuses on the SCM system is enabled.id
is the internal owner ID.repositoryUrl
+ is the http(s) and ssh urls for the application specified in the ownerId.username
+ is optional, can be provided for Bitbucket Server and Cloud.token
+ is optional,if inherited. If provided, this value will override the value
+ inherited from the root organization, organization or application level.provider
+ is the name of of the SCM system. Allowed values are azure
,
+ github
, gitlab
, and bitbucket
.baseBranch
+ is required for the root organization. Organizations and applications inherit
+ from the root unless overridden.enablePullRequests
+ has been deprecated in version 124.remediationPullRequestsEnabled
+ is optional. Set it to `true` to enable the Automated Pull Requests.enableStatusChecks
+ has been deprecated in version 124.statusChecksEnabled
+ is an internal field.pullRequestCommentingEnabled
+ is optional. Set it to `true` to enable the Pull Request Commenting feature.sourceControlEvaluationsEnabled
+ is set to `true` to enable source control evaluations for the continuous
+ risk profile feature.sourceControlScanTarget
is the
+ path inside the repository.sshEnabled
is set to `true`
+ to enable ssh.commitStatusEnabled
is set to `true`
+ if interaction with the commit statuses on the SCM is enabled.id
is the internal owner ID.repositoryUrl
+ is the http(s) and ssh urls for the application specified in the ownerId.username
+ is optional, can be provided for Bitbucket Server and Cloud.token
+ is optional if inherited. If provided, this value will override the value
+ inherited from the root organization, organization or application level.provider
+ is the name of of the SCM system. Allowed values are azure
,
+ github
, gitlab
, and bitbucket
.baseBranch
+ is required for the root organization. Organizations and applications inherit
+ from the root unless overridden.enablePullRequests
+ has been deprecated in version 124.remediationPullRequestsEnabled
+ is optional. Set it to `true` to enable the Automated Pull Requests.enableStatusChecks
+ has been deprecated in version 124.statusChecksEnabled
+ is an internal field.pullRequestCommentingEnabled
+ is optional. Set it to `true` to enable the Pull Request Commenting feature.sourceControlEvaluationsEnabled
+ is set to `true` to enable source control evaluations for the continuous
+ risk profile feature.sourceControlScanTarget
is the
+ path inside the repository.sshEnabled
is set to `true`
+ to enable ssh.commitStatusEnabled
is set to `true`
+ if interaction with the commit statuses on the SCM is enabled.Note that IQ Server has a preset limit of purging 5000 reports in one execution of its report purging job. name: Data Retention Policies +- description: Use this REST API to export Sonatype Developer component priorities + data, including security reachability data. + name: Developer Priorities - description: "Use this REST API to perform an application policy evaluation. Policy\ \ evaluations are executed asynchronously.
This is a 2-step process that involves:\ \ \n1. Requesting a policy evaluation (POST) \n2. Checking the status and response\ \ of the evaluation request (GET)" name: Policy Evaluation +- description: 'Use this REST API to manage components that are developed in-house + and are not open-source. + + + Claiming the component stores the identity information for the component hash + and avoids triggering the Component-Unknown policy. + + + Components will have a match state as `Exact` and Identification Source as `Manual`, + + for subsequent scans or evaluations.' + name: Claim Components - description: 'Use this REST API to obtain the violation details, violation details across stages (cross stage), violations occurring due to transitive dependencies and all waivers applicable to a violation. @@ -8877,12 +9762,28 @@ tags: of stale waivers, view existing policy waivers on components, view quarantined components and retrieve additional metrics data. ' name: Reports -- name: Applications -- name: Audit Logs -- name: Claim -- name: Composite Source Control -- name: Composite Source Control Config Validator -- name: Config +- description: 'Use this REST API to manage authorizations for users or user groups. + + + You can view existing role assignments and grant or revoke user authorization + on organizations, applications and repositories.' + name: Role Memberships +- description: 'Roles provide sets of permissions that grant access to the functionality + in the user interface,through integrations, and when using REST APIs. + + + Permissions are granted by assigning users or groups to the system roles or at + the various levels in the organizational hierarchy: root organization, repository + managers, and applications and organizations. + + + Use this REST API to retrieve role IDs, role names and descriptions.' + name: Roles +- description: Use this REST API to: