Mend Entities - Organization API

The Entities - Organization API from Mend — 7 operation(s) for entities - organization.

OpenAPI Specification

mend-entities-organization-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Mend Access Management Entities - Organization 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 - Organization
paths:
  /api/v2.0/orgs/{orgToken}:
    get:
      tags:
      - Entities - Organization
      summary: Get Organization
      description: 'Returns an organization as identified by its token. '
      operationId: getEntity_2
      parameters:
      - name: orgToken
        in: path
        description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: **Integrate** tab > **API Key**).'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseContextEntityDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
    put:
      tags:
      - Entities - Organization
      summary: Rename Organization
      description: Renames the organization identified by its token
      operationId: updateDomain
      parameters:
      - name: orgToken
        in: path
        description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: **Integrate** tab > **API Key**).'
        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/DWRResponseDomainDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
  /api/v2.0/orgs/{orgToken}/projects:
    get:
      tags:
      - Entities - Organization
      summary: Get Organization Projects
      description: Returns a list of all projects accessible to the current user
      operationId: getProjects_1
      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: populateProducts
        in: query
        description: Add populateProducts=false to receive a slimmer response containing only the project UUID and name.
        allowEmptyValue: true
        schema:
          type: string
          default: 'true'
      - name: orgToken
        in: path
        description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: **Integrate** tab > **API Key**).'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponsePageableCollectionProjectDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
    post:
      tags:
      - Entities - Organization
      summary: Create Project With A New Product
      description: Creates a new project within a new product. If project name exists will return existing project
      operationId: createProject_1
      parameters:
      - name: orgToken
        in: path
        description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: **Integrate** tab > **API Key**).'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectByOrganizationRequestDTO'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseCreatedCreateProjectResponseDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
  /api/v2.0/orgs/{orgToken}/products:
    get:
      tags:
      - Entities - Organization
      summary: Get Organization Products
      description: Returns a list of all products accessible to the current user
      operationId: getProducts
      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: orgToken
        in: path
        description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: **Integrate** tab > **API Key**).'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponsePageableCollectionProductDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
    post:
      tags:
      - Entities - Organization
      summary: Create Product
      description: Creates a new product, If the product already exists it returns the existing product
      operationId: createProduct
      parameters:
      - name: orgToken
        in: path
        description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: **Integrate** tab > **API Key**).'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProductDTO'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseCreatedProductDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
  /api/v2.0/orgs:
    get:
      tags:
      - Entities - Organization
      summary: Get User Organizations
      description: Returns a list of all organizations where the current user is a member.
      operationId: getUserDomains
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseCollectionDomainDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
    post:
      tags:
      - Entities - Organization
      summary: Create Organization
      description: Creates a new organization
      operationId: createDomain
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContextEntityRequestDTO'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseDomainDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
  /api/v2.0/orgs/{orgToken}/productEntities:
    get:
      tags:
      - Entities - Organization
      summary: Get Organization Product Entities
      description: Returns extended product information for all products in an organization
      operationId: getDomainProductEntities
      parameters:
      - name: pageSize
        in: query
        description: Enter the number of items to return in each page of the result.
        allowEmptyValue: true
        schema:
          maximum: 10000
          type: string
          default: '50'
      - name: page
        in: query
        description: Enter the page number to display in the result. Page numbers start at 0
        allowEmptyValue: true
        schema:
          type: string
          default: '0'
      - name: orgToken
        in: path
        description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: **Integrate** tab > **API Key**).'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponsePageableCollectionDomainEntitiesProductDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
  /api/v2.0/orgs/{orgToken}/entities:
    get:
      tags:
      - Entities - Organization
      summary: Get Organization Entities
      description: Returns all projects and their associated product for a given organization.
      operationId: getDomainEntities
      parameters:
      - name: pageSize
        in: query
        description: Enter the number of items to return in each page of the result.
        allowEmptyValue: true
        schema:
          maximum: 10000
          type: string
          default: '50'
      - name: page
        in: query
        description: Enter the page number to display in the result. Page numbers start at 0
        allowEmptyValue: true
        schema:
          type: string
          default: '0'
      - name: orgToken
        in: path
        description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: **Integrate** tab > **API Key**).'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponsePageableCollectionDomainEntitiesDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
  /api/v2.0/orgs/{orgToken}/changeOrganization/{otherOrgToken}:
    get:
      tags:
      - Entities - Organization
      summary: Change Organization
      description: You can access a different organization by asking for a new JWT token for the new org. The previous JWT is still valid for the previous org until it expires. All JWT tokens are valid for 10 minutes.
      operationId: changeDomain
      parameters:
      - name: orgToken
        in: path
        description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: **Integrate** tab > **API Key**).'
        required: true
        schema:
          type: string
      - name: otherOrgToken
        in: path
        description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: **Integrate** tab > **API Key**).'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DWRResponseSessionInfo'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DWRResponseBase'
components:
  schemas:
    ContextEntityDTO:
      required:
      - name
      type: object
      properties:
        uuid:
          title: Context Uuid
          type: string
          example: 123e4567-e89b-12d3-a456-426655440000
        name:
          title: Context Name
          type: string
          example: Context A
    DWRResponseCollectionDomainDTO:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          type: array
          items:
            $ref: '#/components/schemas/DomainDTO'
    DomainEntitiesProjectDTO:
      type: object
      properties:
        uuid:
          title: Project UUID
          type: string
          example: 123e4567-e89b-12d3-a456-426655440000
        name:
          title: Project Name
          type: string
          example: Project A
        tags:
          type: array
          items:
            $ref: '#/components/schemas/EntityTagDTO'
        lastScanned:
          title: Last Project Scan Date
          type: string
          format: date-time
        scannedByEmail:
          title: Scanned By
          type: string
          example: jon.snow@mail.com
        scanComment:
          title: Scan Comment
          type: string
          example: Scan comment
        createdAt:
          title: Creation Date
          type: string
          format: date-time
    DWRResponseCreatedCreateProjectResponseDTO:
      type: object
      properties:
        additionalData:
          title: Provides insights on creating resources using supported endpoints.
          type: object
          description: "+ **created**: Indicates whether the requested project was successfully created or if it already exists. \n When “true”, this signifies the project was successfully created. When “false”, this indicates the project already exists"
          example:
            created: 'true'
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          $ref: '#/components/schemas/CreateProjectResponseDTO'
    DWRResponseCreatedProductDTO:
      type: object
      properties:
        additionalData:
          title: Provides insights on creating resources using supported endpoints.
          type: object
          description: "+ **created**: Indicates whether the requested project was successfully created or if it already exists. \n When “true”, this signifies the project was successfully created. When “false”, this indicates the project already exists"
          example:
            created: 'true'
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          $ref: '#/components/schemas/ProductDTO'
    CreateProjectResponseDTO:
      type: object
      properties:
        project:
          $ref: '#/components/schemas/ProjectDTO'
        product:
          $ref: '#/components/schemas/ProductDTO'
    DWRResponsePageableCollectionDomainEntitiesProductDTO:
      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/DomainEntitiesProductDTO'
      description: Provides insights into endpoint-supported pagination information
    DWRResponsePageableCollectionProjectDTO:
      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/ProjectDTO'
      description: Provides insights into endpoint-supported pagination information
    SessionInfo:
      type: object
      properties:
        correlationId:
          type: string
        userUuid:
          type: string
        userName:
          type: string
        email:
          type: string
        refreshToken:
          type: string
        jwtToken:
          type: string
        orgName:
          title: Organization Name
          type: string
          example: Organization A
        orgUuid:
          title: Organization Uuid
          type: string
          example: 123e4567-e89b-12d3-a456-426655440000
    EntityTagDTO:
      type: object
      properties:
        key:
          title: Entity Tag Key
          type: string
          example: key
        value:
          title: Entity Tag value
          type: string
          example: value
    DWRResponseSessionInfo:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          $ref: '#/components/schemas/SessionInfo'
    ContextEntityRequestDTO:
      required:
      - name
      type: object
      properties:
        name:
          title: Entity Name
          type: string
          example: Entity A
    DomainDTO:
      title: OrgDTO
      type: object
      properties:
        uuid:
          title: Org Uuid
          type: string
          example: 123e4567-e89b-12d3-a456-426655440000
        name:
          title: Org Name
          type: string
          example: Organization A
    ProductDTO:
      type: object
      properties:
        uuid:
          title: Product Uuid
          type: string
          example: 123e4567-e89b-12d3-a456-426655440000
        name:
          title: Product Name
          type: string
          example: Product A
    DomainEntitiesDTO:
      type: object
      properties:
        project:
          $ref: '#/components/schemas/DomainEntitiesProjectDTO'
        product:
          $ref: '#/components/schemas/DomainEntitiesProductDTO'
    DWRResponseDomainDTO:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          $ref: '#/components/schemas/DomainDTO'
    DWRResponsePageableCollectionProductDTO:
      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/ProductDTO'
      description: Provides insights into endpoint-supported pagination information
    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
    DWRResponseBase:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
    DomainEntitiesProductDTO:
      type: object
      properties:
        uuid:
          title: Product Uuid
          type: string
          example: 123e4567-e89b-12d3-a456-426655440000
        name:
          title: Product Name
          type: string
          example: Product A
        tags:
          type: array
          items:
            $ref: '#/components/schemas/EntityTagDTO'
        createdAt:
          type: string
          format: date-time
    DWRResponseContextEntityDTO:
      type: object
      properties:
        supportToken:
          title: Support Token
          type: string
          example: 1171c60d
        retVal:
          $ref: '#/components/schemas/ContextEntityDTO'
    CreateProjectByOrganizationRequestDTO:
      required:
      - projectName
      type: object
      properties:
        projectName:
          title: Project Name
          type: string
          example: Project A
        projectDescription:
          title: Project Description
          type: string
          example: Description for project
        productName:
          title: Product Name
          type: string
          example: Product A
      description: If product name is empty a default product will be created
    DWRResponsePageableCollectionDomainEntitiesDTO:
      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/DomainEntitiesDTO'
      description: Provides insights into endpoint-supported pagination information
    CreateProductDTO:
      required:
      - productName
      type: object
      properties:
        productName:
          title: Product Name
          type: string
          example: Product A
  securitySchemes:
    bearer-key:
      type: http
      description: JWT token Bearer
      scheme: bearer
      bearerFormat: JWT