Sonatype Legacy Violations API
Use this REST API to list, grant, and revoke legacy status for policy violations of an application.
Use this REST API to list, grant, and revoke legacy status for policy violations of an application.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/sonatype-legacy-violations-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Sonatype Lifecycle Public REST Legacy Violations API
version: 1.207.1-04
description: Use this REST API to list, grant, and revoke legacy status for policy violations of an application.
security:
- BasicAuth: []
BearerAuth: []
tags:
- name: Legacy Violations
description: Use this REST API to list, grant, and revoke legacy status for policy violations of an application.
paths:
/api/v2/legacyViolations/application/{applicationPublicId}/grant:
post:
tags:
- Legacy Violations
description: 'Use this method to grant legacy status to all eligible policy violations of an application.
Permissions required: Edit IQ Elements'
operationId: grant
parameters:
- name: applicationPublicId
in: path
description: The public id of the application.
required: true
schema:
type: string
responses:
'200':
description: Successfully granted legacy status.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiLegacyViolationChangeResponseDTO'
summary: Grant
x-summary-source: derived
/api/v2/legacyViolations/application/{applicationPublicId}:
get:
tags:
- Legacy Violations
description: 'Use this method to retrieve all legacy policy violations for an application.
Permissions required: View IQ Elements'
operationId: listLegacyViolations
parameters:
- name: applicationPublicId
in: path
description: The public id of the application.
required: true
schema:
type: string
- name: policyId
in: query
description: Optional policy id filter.
schema:
type: string
- name: componentIdentifier
in: query
description: Optional component identifier filter, expressed as a package URL (purl).
schema:
type: string
responses:
'200':
description: Successfully retrieved legacy violations.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ApiPolicyViolationDTOV2'
summary: List legacy violations
x-summary-source: derived
/api/v2/legacyViolations/application/{applicationPublicId}/revoke:
post:
tags:
- Legacy Violations
description: 'Use this method to revoke legacy status from all legacy policy violations of an application.
Permissions required: Edit IQ Elements'
operationId: revoke
parameters:
- name: applicationPublicId
in: path
description: The public id of the application.
required: true
schema:
type: string
responses:
'200':
description: Successfully revoked legacy status.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiLegacyViolationChangeResponseDTO'
summary: Revoke
x-summary-source: derived
components:
schemas:
ApiConstraintViolationReasonDTO:
type: object
properties:
reason:
type: string
reference:
$ref: '#/components/schemas/TriggerReference'
ApiConstraintViolationDTO:
type: object
properties:
constraintId:
type: string
constraintName:
type: string
reasons:
type: array
items:
$ref: '#/components/schemas/ApiConstraintViolationReasonDTO'
TriggerReference:
type: object
properties:
value:
type: string
type:
type: string
enum:
- SECURITY_VULNERABILITY_REFID
- SAST_FINDING_ID
ApiPolicyViolationDTOV2:
type: object
properties:
policyId:
type: string
policyName:
type: string
policyViolationId:
type: string
openTime:
type: string
format: date-time
waiveTime:
type: string
format: date-time
fixTime:
type: string
format: date-time
legacyViolationTime:
type: string
format: date-time
threatLevel:
type: integer
format: int32
constraintViolations:
type: array
items:
$ref: '#/components/schemas/ApiConstraintViolationDTO'
ApiLegacyViolationChangeResponseDTO:
type: object
properties:
changedPolicyViolationCount:
type: integer
description: Number of policy violations whose legacy status changed in this call.
format: int32
description: Response from a bulk legacy-violation mutation.
securitySchemes:
BasicAuth:
type: http
scheme: basic
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT