Sonatype Legacy Violations API

Use this REST API to list, grant, and revoke legacy status for policy violations of an application.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /api/v2/legacyViolations/application/{applicationPublicId}/grant Mark all policy violations as legacy · Grant #
Ask an LLM
“How do I mark every policy violation of an application as legacy?”
“Can I grant legacy status to all violations at once?”
Tell an agent
Grant legacy status to all policy violations of application {applicationPublicId}.
Mark every policy violation of {applicationPublicId} as legacy.
GET /api/v2/legacyViolations/application/{applicationPublicId} List legacy policy violations · List legacy violations #
Ask an LLM
“Which policy violations of an application have legacy status?”
“Can I filter legacy violations by policy or component?”
Tell an agent
List legacy policy violations of application {applicationPublicId}.
Show legacy violations of {applicationPublicId} for policy {policyId}.
POST /api/v2/legacyViolations/application/{applicationPublicId}/revoke Remove legacy status from policy violations · Revoke #
Ask an LLM
“How do I take legacy status off policy violations?”
“Can I revoke legacy status from all legacy violations of an application?”
Tell an agent destructive · confirm first
Revoke legacy status from all policy violations of application {applicationPublicId}.
Remove legacy status from {applicationPublicId}'s legacy violations.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sonatype:sonatype-legacy-violations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sonatype-legacy-violations-api-openapi.yml Raw ↑
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