Sonatype License Legal Metadata Template API

Use this REST API to manage and customize templates for the license legal metadata generated in HTML format.

OpenAPI Specification

sonatype-license-legal-metadata-template-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Sonatype Lifecycle Public REST Advanced Search License Legal Metadata Template 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 and customize templates for the license legal metadata generated in HTML format.
  name: License Legal Metadata Template
paths:
  /api/v2/licenseLegalMetadata/report-template:
    get:
      description: 'Use this method to retrieve templates for all reports.


        Permissions required: Review Legal Obligations For Components Licenses for the root organization'
      operationId: getAllAttributionReportTemplates
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AttributionReportTemplateDTO'
                type: array
          description: The response contains the stored template details for all reports. For each template:<ul><li>`id` is the template id.</li><li>`templateName` indicates the name of the stored template.</li><li>`documentTitle` is the title that is displayed at the top of the report.</li><li>`header` is the text that will be displayed above the `documentTitle`.</li><li>`footer` is the text that will be displayed at the bottom of the report.<li><li>`includeTableOfContents` is `true` if a table of contents containing links to the components and their licenses will be added to the report.<li>`includeAppendix` is `true` if standard license text will be grouped in the report appendix.</li><li>`includeStandardLicenseTexts` is `true` if the standard license text will be displayed for components with no license files.</li><li>`includeSonatypeSpecialLicenses` is `true` if Sonatype Special Licenses (e.g. Generic-Copyleft-Clause, Generic-Liberal-Clause, See-License-Clause, Identity-Clause etc.) will be included in the report.</li><li>`lastUpdatedAt` indicates the time the template was last updated.</li><li>`includeInnerSource` is `true` if InnerSource components will be included in the report.</li></ul>
      tags:
      - License Legal Metadata Template
    post:
      description: 'Use this method to create or update a template.


        Permissions required: Review Legal Obligations For Components Licenses for the root organization'
      operationId: saveAttributionReportTemplate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttributionReportTemplateDTO'
        description: Specify the details for the template as:<ul><li>`id` is the template id.</li><li>`templateName` indicates the name of the stored template.</li><li>`documentTitle` is the title that is displayed at the top of the report.</li><li>`header` is the text that will be displayed above the `documentTitle`.</li><li>`footer` is the text that will be displayed at the bottom of the report.<li><li>`includeTableOfContents` is `true` if a table of contents containing links to the components and their licenses will be added to the report.<li>`includeAppendix` is `true` if standard license text will be grouped in the report appendix.</li><li>`includeStandardLicenseTexts` is `true` if the standard license text will be displayed for components with no license files.</li><li>`includeSonatypeSpecialLicenses` is `true` if Sonatype Special Licenses (e.g. Generic-Copyleft-Clause, Generic-Liberal-Clause, See-License-Clause, Identity-Clause etc.) will be included in the report.</li><li>`includeInnerSource` is `true` if InnerSource components will be included in the report.</li></ul>
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributionReportTemplateDTO'
          description: The response contains the details of the template created or updated.
      tags:
      - License Legal Metadata Template
  /api/v2/licenseLegalMetadata/report-template/{id}:
    delete:
      description: 'Use this method to delete an existing template.


        Permissions required: Review Legal Obligations For Components Licenses for the root organization'
      operationId: deleteAttributionReportTemplate
      parameters:
      - description: Enter the template id for the template to be deleted.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Template deleted successfully.
      tags:
      - License Legal Metadata Template
    get:
      description: 'Use this method to retrieve a template for license legal metadata.


        Permissions required: Review Legal Obligations For Components Licenses for the root organization.'
      operationId: getAttributionReportTemplateById
      parameters:
      - description: Enter the templateId for the report.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributionReportTemplateDTO'
          description: The response contains the stored template corresponding to the `id` provided:<ul><li>`id` is the template id.</li><li>`templateName` indicates the name of the stored template.</li><li>`documentTitle` is the title that is displayed at the top of the report.</li><li>`header` is the text that will be displayed above the `documentTitle`.</li><li>`footer` is the text that will be displayed at the bottom of the report.<li><li>`includeTableOfContents` is `true` if a table of contents containing links to the components and their licenses will be added to the report.<li>`includeAppendix` is `true` if standard license text will be grouped in the report appendix.</li><li>`includeStandardLicenseTexts` is `true` if the standard license text will be displayed for components with no license files.</li><li>`includeSonatypeSpecialLicenses` is `true` if Sonatype Special Licenses (e.g. Generic-Copyleft-Clause, Generic-Liberal-Clause, See-License-Clause, Identity-Clause etc.) will be included in the report.</li><li>`lastUpdatedAt` indicates the time the template was last updated.</li><li>`includeInnerSource` is `true` if InnerSource components will be included in the report.</li></ul>
      tags:
      - License Legal Metadata Template
components:
  schemas:
    AttributionReportTemplateDTO:
      properties:
        documentTitle:
          type: string
        footer:
          type: string
        header:
          type: string
        id:
          type: string
        includeAppendix:
          type: boolean
        includeInnerSource:
          type: boolean
        includeSonatypeSpecialLicenses:
          type: boolean
        includeStandardLicenseTexts:
          type: boolean
        includeTableOfContents:
          type: boolean
        lastUpdatedAt:
          format: date-time
          type: string
        templateName:
          type: string
      type: object
  securitySchemes:
    BasicAuth:
      scheme: basic
      type: http
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http