Mend Entities - Project API

The Entities - Project API from Mend — 3 operation(s) for entities - project.

OpenAPI Specification

mend-entities-project-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Mend Access Management Entities - Project 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: Entities - Project
paths:
  /api/v2.0/projects/{projectToken}/reassign/{productToken}:
    put:
      tags:
      - Entities - Project
      summary: Reassign Project
      description: Reassigns a project from one product to another.
      operationId: changeAssignment
      parameters:
      - name: projectToken
        in: path
        description: 'project UUID (by running Entities - Product > Get Product Projects) or Project Token (from the Mend SCA App: **Integrate** tab > **Project Token**).'
        required: true
        schema:
          type: string
      - name: productToken
        in: path
        description: 'project UUID (by running Entities - Product > Get Product Projects) or Project Token (from the Mend SCA App: **Integrate** tab > **Project Token**).'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseMessageDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
  /api/v2.0/projects/{projectToken}:
    get:
      tags:
      - Entities - Project
      summary: Get Project
      description: Returns the project identified by its token
      operationId: getEntity
      parameters:
      - name: projectToken
        in: path
        description: 'project UUID (by running Entities - Product > Get Product Projects) or Project Token (from the Mend SCA App: **Integrate** tab > **Project Token**).'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseProjectDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
    put:
      tags:
      - Entities - Project
      summary: Rename Project
      description: Renames the project identified by its token.
      operationId: updateProject
      parameters:
      - name: projectToken
        in: path
        description: 'project UUID (by running Entities - Product > Get Product Projects) or Project Token (from the Mend SCA App: **Integrate** tab > **Project Token**).'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContextEntityRequestDTO'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseProjectDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
    delete:
      tags:
      - Entities - Project
      summary: Remove Project
      description: Deletes the project identified by its token
      operationId: removeEntity
      parameters:
      - name: projectToken
        in: path
        description: 'project UUID (by running Entities - Product > Get Product Projects) or Project Token (from the Mend SCA App: **Integrate** tab > **Project Token**).'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseMessageDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
  /api/v2.0/projects/{projectToken}/vitals:
    get:
      tags:
      - Entities - Project
      summary: Get Project Vitals
      description: Returns basic information about a given project
      operationId: getVitals
      parameters:
      - name: projectToken
        in: path
        description: 'project UUID (by running Entities - Product > Get Product Projects) or Project Token (from the Mend SCA App: **Integrate** tab > **Project Token**).'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseVitalsDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
components:
  schemas:
    DWRResponseMessageDTO:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          $ref: '#/components/schemas/MessageDTO'
    VitalsDTO:
      type: object
      properties:
        lastScan:
          title: Last Scan Date
          type: string
          format: date-time
        lastUserScanned:
          $ref: '#/components/schemas/UserInfoDTO'
        requestToken:
          title: Request Token
          type: string
          example: 827eb16fefc040d399420b75791aa346adcba32b4386412682d0cce36a56c24e
        lastSourceFileMatch:
          title: Last Source File Match
          type: string
          format: date-time
        lastScanComment:
          title: Last Scan Comment
          type: string
          example: a comment
        projectCreationDate:
          title: Project Creation Date
          type: string
          format: date-time
        pluginName:
          title: Plugin Name
          type: string
          example: plugin:18.2.2
        pluginVersion:
          title: Plugin Version
          type: string
          example: plugin:18.2.2
        extraProperties:
          type: object
          additionalProperties:
            type: string
        libraryCount:
          title: Library Count
          type: integer
          format: int64
          example: 400
    ProjectDTO:
      type: object
      properties:
        uuid:
          title: Project UUID
          type: string
          example: 123e4567-e89b-12d3-a456-426655440000
        name:
          title: Project Name
          type: string
          example: My Project
        path:
          title: Product Name
          type: string
          example: My Product
        productName:
          title: Product Name
          type: string
          example: My Product
        productUuid:
          title: Product Uuid
          type: string
          example: 123e4567-e89b-12d3-a456-426655440000
    DWRResponseProjectDTO:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          $ref: '#/components/schemas/ProjectDTO'
    DWRResponseVitalsDTO:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          $ref: '#/components/schemas/VitalsDTO'
    ContextEntityRequestDTO:
      required:
      - name
      type: object
      properties:
        name:
          title: Entity Name
          type: string
          example: Entity A
    DWRResponseBase:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
    MessageDTO:
      type: object
      properties:
        message:
          title: message
          type: string
          example: Success!
    UserInfoDTO:
      required:
      - uuid
      type: object
      properties:
        uuid:
          title: User UUID
          type: string
          example: 123e4567-e89b-12d3-a456-426655440000
        name:
          title: User Name
          type: string
          example: Jon Smith
        email:
          title: User Email
          type: string
          example: jon.smith@mail.com
        userType:
          title: Type Of User
          type: string
          example: REGULAR
          enum:
          - REGULAR
          - SERVICE
          - SCAN_SUMMARY_RECEIVER
        accountStatus:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
          - LOCKOUT
  securitySchemes:
    bearer-key:
      type: http
      description: JWT token Bearer
      scheme: bearer
      bearerFormat: JWT