Sonatype License Overrides API

Use this REST API to manage license overrides for components in your applicationsorganizations and repositories.

OpenAPI Specification

sonatype-license-overrides-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Sonatype Lifecycle Public REST Advanced Search License Overrides API
  version: 1.201.0-02
  description: Use the Advanced Search REST API to perform searches on Lifecycle application scan reports.
security:
- BasicAuth: []
  BearerAuth: []
tags:
- description: Use this REST API to manage license overrides for components in your applicationsorganizations and repositories.
  name: License Overrides
paths:
  /api/v2/licenseOverrides/{ownerType}/{ownerId}:
    get:
      description: 'Use this method to retrieve the applied license overrides for a component.


        Permissions required: View IQ Elements'
      operationId: getAppliedLicenseOverrides
      parameters:
      - description: Select the `ownerType` for which you want to retrieve the applied license overrides.
        in: path
        name: ownerType
        required: true
        schema:
          enum:
          - application
          - organization
          - repository_container
          - repository_manager
          - repository
          pattern: application|organization|repository|repository_manager|repository_container
          type: string
      - description: Enter the id of the application, organization or the repository.
        in: path
        name: ownerId
        required: true
        schema:
          type: string
      - description: Enter the componentIdentifier consisting of format and coordinates as a JSON e.g., `?componentIdentifier={"format":"maven","coordinates":"{...}}"}
        in: query
        name: componentIdentifier
        required: true
        schema:
          $ref: '#/components/schemas/ComponentIdentifier'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiAppliedLicenseOverridesDTO'
          description: The response contains the license overrides for the component.
      tags:
      - License Overrides
    post:
      description: 'Use this method to add or update a license override to a component for a given owner scope.


        Permissions required: Change Licenses'
      operationId: addLicenseOverride
      parameters:
      - description: Select the `ownerType` scope for which you want to add or update a license override
        in: path
        name: ownerType
        required: true
        schema:
          enum:
          - application
          - organization
          - repository_container
          - repository_manager
          - repository
          pattern: application|organization|repository|repository_manager|repository_container
          type: string
      - description: Enter the id of the application, organization or the repository.
        in: path
        name: ownerId
        required: true
        schema:
          type: string
      - in: query
        name: where
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiLicenseOverrideDTO'
        description: "Enter the license override details to add or update a license override for a component.\nThe request body should contain the following fields:\n - `ownerId`: Enter the id of the application, organization or the repository.\n - `comment`: Enter a comment for the license override.\n - `licenseIds`: Enter the license ids for the license override.\n - `componentIdentifier`: Enter the componentIdentifier consisting of format and coordinates.\n - `status`: Enter the status of the license override. The possible values are `OPEN`, `ACKNOWLEDGED`, `OVERRIDDEN`, `SELECTED`, and `CONFIRMED`."
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiLicenseOverrideDTO'
          description: The response contains the same license override information that was added.
      tags:
      - License Overrides
  /api/v2/licenseOverrides/{ownerType}/{ownerId}/legalReviewer:
    get:
      description: 'Use this method to retrieve the applied license overrides for a given component and owner.


        Permissions required: Review Legal Obligations For Components Licenses'
      operationId: getAppliedLicenseOverridesForLegalReviewer
      parameters:
      - description: Select the `ownerType` for which you want to retrieve the applied license overrides.
        in: path
        name: ownerType
        required: true
        schema:
          enum:
          - application
          - organization
          - repository_container
          - repository_manager
          - repository
          pattern: application|organization|repository|repository_manager|repository_container
          type: string
      - description: Enter the id of the owner.
        in: path
        name: ownerId
        required: true
        schema:
          type: string
      - description: Enter the component format and coordinates.
        in: query
        name: componentIdentifier
        required: true
        schema:
          $ref: '#/components/schemas/ComponentIdentifier'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiAppliedLicenseOverridesDTO'
          description: Successfully retrieved the applied license overrides.
      tags:
      - License Overrides
  /api/v2/licenseOverrides/{ownerType}/{ownerId}/{licenseOverrideId}:
    delete:
      description: 'Use this method to delete a license override for a component.


        Permissions required: Change Licenses'
      operationId: deleteLicenseOverride
      parameters:
      - description: Select the `ownerType` scope for which you want to delete license override
        in: path
        name: ownerType
        required: true
        schema:
          enum:
          - application
          - organization
          - repository_container
          - repository_manager
          - repository
          pattern: application|organization|repository|repository_manager|repository_container
          type: string
      - description: Enter the id of the application, organization or the repository.
        in: path
        name: ownerId
        required: true
        schema:
          type: string
      - description: Enter the id of the license override you want to delete.
        in: path
        name: licenseOverrideId
        required: true
        schema:
          type: string
      - in: query
        name: where
        schema:
          type: string
      responses:
        '204':
          description: The license override was deleted successfully.
      tags:
      - License Overrides
components:
  schemas:
    LicenseOverrideByOwner:
      properties:
        licenseOverride:
          $ref: '#/components/schemas/LicenseOverride'
        ownerId:
          type: string
        ownerName:
          type: string
        ownerType:
          enum:
          - application
          - organization
          - repository_container
          - repository_manager
          - repository
          - global
          type: string
      type: object
    LicenseOverride:
      properties:
        comment:
          type: string
        componentIdentifier:
          $ref: '#/components/schemas/ComponentIdentifier'
        id:
          type: string
        licenseIds:
          items:
            type: string
          type: array
          uniqueItems: true
        ownerId:
          type: string
        status:
          enum:
          - OPEN
          - ACKNOWLEDGED
          - OVERRIDDEN
          - SELECTED
          - CONFIRMED
          type: string
      type: object
    ApiComponentIdentifierDTOV2:
      properties:
        coordinates:
          additionalProperties:
            type: string
          type: object
        format:
          type: string
      type: object
    ApiAppliedLicenseOverridesDTO:
      properties:
        licenseOverridesByOwner:
          items:
            $ref: '#/components/schemas/LicenseOverrideByOwner'
          type: array
      type: object
    ComponentIdentifier:
      properties:
        coordinates:
          additionalProperties:
            type: string
          type: object
        format:
          type: string
      type: object
    ApiLicenseOverrideDTO:
      properties:
        comment:
          type: string
        componentIdentifier:
          $ref: '#/components/schemas/ApiComponentIdentifierDTOV2'
        id:
          type: string
        licenseIds:
          items:
            type: string
          type: array
          uniqueItems: true
        ownerId:
          type: string
        status:
          enum:
          - OPEN
          - ACKNOWLEDGED
          - OVERRIDDEN
          - SELECTED
          - CONFIRMED
          type: string
      type: object
  securitySchemes:
    BasicAuth:
      scheme: basic
      type: http
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http