Mend General Info - Licenses API

The General Info - Licenses API from Mend — 2 operation(s) for general info - licenses.

OpenAPI Specification

mend-general-info-licenses-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Mend Access Management General Info - Licenses API
  description: 'Mend''s enhanced API enables automation of workflows in a REST compliant format. The API features:

    + Access for any user with Mend credentials, via a user key available in the user''s profile page in the Mend Platform.

    + Improved security with a JWT token per organization, which expires every 10 minutes.

    + Added scalability with support for cursor pagination and limiting results size.

    + Broader functionality available programmatically.

    + New standard API documentation for easy navigation and search.


    **Note:** To help you get started with the Mend API 3.0, we recommend reviewing our onboarding guide -> [Getting Started with API 3.0](https://docs.mend.io/platform/latest/getting-started-with-mend-api-3-0).

    This resource covers initial setup, authentication instructions, and helpful tips to help you successfully begin working with the Mend API 3.0. If you have a dedicated instance of Mend, contact your Mend representative to access this API on your instance.'
  version: '3.0'
servers:
- url: https://baseUrl
  description: Generated server url
security:
- bearer-key: []
tags:
- name: General Info - Licenses
paths:
  /api/v2.0/licenses/{licenseName}:
    get:
      tags:
      - General Info - Licenses
      summary: Get License Details
      description: Returns detailed information about a specific license
      operationId: getLicenseDetails
      parameters:
      - name: licenseName
        in: path
        description: license name (by running General Info - Licenses > Get All Licenses).
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseLicenseDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
  /api/v2.0/licenses:
    get:
      tags:
      - General Info - Licenses
      summary: Get All Licenses
      description: Returns a list of all known licenses in the system.
      operationId: getAllLicenses
      parameters:
      - name: pageSize
        in: query
        allowEmptyValue: true
        schema:
          maximum: 10000
          type: string
          default: '50'
      - name: page
        in: query
        allowEmptyValue: true
        schema:
          type: string
          default: '0'
      - name: search
        in: query
        description: "Filter your search to return items whose property has a specific value.\nUse the syntax: **property:operation:value** where a colon (:) separates between property, operation and value.\n+ Property: the name of the property of the item\n+ Operation:\n    + **equals** - true if the value is identical to this value.\n    + **like** - true if the property's value is contained within this value\n    + **in** - true if the value is identical to one of the items in this comma-separated list. E.g. in:value1,value2,value3\n+ Value: the value of the property.\n\nTo combine multiple filters, separate each filter with a semicolon with no space. E.g.  property1:operation1:value1;property2:operation2:value2\n\nThis endpoint supports filtering on the following properties and its supported operators:\n+ name:[equals | like | in]:value\n+ spdxName:[equals | like | in]:value\n+ uuid:[equals | in]:value"
        allowEmptyValue: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponsePageableCollectionLicenseDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
components:
  schemas:
    LicenseDTO:
      required:
      - name
      type: object
      properties:
        uuid:
          title: License Uuid
          type: string
          example: 123e4567-e89b-12d3-a456-426655440000
        name:
          title: Licenses
          type: string
          example: MIT
        spdxName:
          title: Spdx Name
          type: string
          example: Glide
        type:
          title: Type
          type: string
          example: OPEN_SOURCE
        suspected:
          title: Suspected License
          type: boolean
        osiApproved:
          title: Approved Osi
          type: boolean
        profile:
          $ref: '#/components/schemas/LicenseProfileDTO'
    DescriptionAndExplanationDTO:
      type: object
      properties:
        explanation:
          title: Explanation Link
          type: string
          example: http://en.wikipedia.org/wiki/Academic_Free_License
        indicatingText:
          title: Indicating Text
          type: string
          example: 1) Grant of Copyright License...
        description:
          title: Description
          type: string
          example: Not a CopyLeft license.
        displayText:
          title: Display Text
          type: string
          example: 'No'
    LicenseProfileDTO:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        links:
          uniqueItems: true
          type: array
          items:
            title: Links
            type: string
            example: http://www.opensource.org/licenses/AFL-3.0
        copyrightRiskScore:
          $ref: '#/components/schemas/RiskScoreExplanationDTO'
        patentAndRoyaltyRisk:
          $ref: '#/components/schemas/RiskScoreExplanationDTO'
        royaltyFree:
          title: Royalty Free
          type: string
          example: Conditional
        copyleft:
          $ref: '#/components/schemas/DescriptionAndExplanationDTO'
        linking:
          $ref: '#/components/schemas/DescriptionAndExplanationDTO'
        requiredNotices:
          type: array
          items:
            title: Required Notices
            type: string
            example: Must identify specific modifications
    DWRResponseLicenseDTO:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          $ref: '#/components/schemas/LicenseDTO'
    RiskScoreExplanationDTO:
      type: object
      properties:
        explanation:
          title: Explanation Link
          type: string
          example: http://en.wikipedia.org/wiki/Academic_Free_License
        indicatingText:
          title: Indicating Text
          type: string
          example: 1) Grant of Copyright License...
        riskScore:
          title: Risk Score
          type: integer
          format: int32
          example: 39
    DWRResponseBase:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
    DWRResponsePageableCollectionLicenseDTO:
      type: object
      properties:
        additionalData:
          title: Provides insights into endpoint-supported pagination information.
          type: object
          description: '+ **totalItems**: The total count of data points returned in an API response.

            + **isLastPage**: Defines whether the current page represents the conclusion of the API response. When “true”, this signifies you are viewing the last page of the API response. When “false”, this indicates there are further pages remaining.'
          example:
            totalItems: '422'
            isLastPage: 'true'
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          type: array
          items:
            $ref: '#/components/schemas/LicenseDTO'
      description: Provides insights into endpoint-supported pagination information
  securitySchemes:
    bearer-key:
      type: http
      description: JWT token Bearer
      scheme: bearer
      bearerFormat: JWT