Sonatype Applications API

Use this REST API to manage applications. In addition to the primary functions of create, update and delete, you can also move applications from one organization to other.

OpenAPI Specification

sonatype-applications-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Sonatype Lifecycle Public REST Advanced Search Applications 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 applications.


    In addition to the primary functions of create, update and delete, you can also move applications from one organization to other.'
  name: Applications
paths:
  /api/v2/applications:
    get:
      description: 'Use this method to retrieve the application details for the applicationId(s) provided.


        Permissions required: View IQ Elements'
      operationId: getApplications
      parameters:
      - description: Enter the applicationId.
        in: query
        name: publicId
        schema:
          items:
            type: string
          type: array
          uniqueItems: true
      - description: Set this parameter to `true` to obtain the application tags (application categories) in the response.
        in: query
        name: includeCategories
        schema:
          default: false
          type: boolean
      responses:
        '200': &id001
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiApplicationListDTO'
          description: default response
        default: *id001
      tags:
      - Applications
    post:
      description: 'Use this method to create an application under an organization. Use the Organization REST API to obtain organizationId.


        Permissions required: Add Application (on parent organization)'
      operationId: addApplication
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiApplicationDTO'
        description: Specify the applicationId, application name and the organizationId under which the application should be created. `contactUserName` corresponds to the 'contact' field in the UI and represents the user name. If LDAP is used for authentication, you can use LDAP usernames.`tagId` is the internal identifier for the Application Category that you want to apply to the application. Use the Application Categories REST API for the available categories and the corresponding tagIds.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiApplicationDTO'
          description: The response contains application details for the application created using this method.
      tags:
      - Applications
  /api/v2/applications/organization/{organizationId}:
    get:
      description: 'Use this method to retrieve application details for all applications under the organizationId provided.


        Permissions required: View IQ Elements'
      operationId: getApplicationsByOrganizationId
      parameters:
      - description: Enter the organizationId.
        in: path
        name: organizationId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiApplicationListDTO'
          description: The response contains the details of all applications found under the organizationId provided.
      tags:
      - Applications
  /api/v2/applications/{applicationId}:
    delete:
      description: 'Use this method to permanently delete an existing application and all data associated with it. This action cannot be un-done. Before deleting, confirm that the application being deleted does not impact any integrations that could depend on it.


        Permissions required: Edit IQ Elements'
      operationId: deleteApplication
      parameters:
      - description: Enter the applicationId to be deleted.
        in: path
        name: applicationId
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Application deleted successfully
      tags:
      - Applications
    get:
      description: 'Use this method to retrieve the application details, by providing the applicationId.


        Permissions required: View IQ Elements'
      operationId: getApplication
      parameters:
      - description: Enter the applicationId.
        in: path
        name: applicationId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiApplicationDTO'
          description: The response contains the details of the application corresponding to the applicationId.
      tags:
      - Applications
    put:
      description: "Use this method to update the application name, application tags or the contact user name for an existing application by providing the applicationId. \n\nNOTE: This method cannot be used to change the organizationId of an application.\n\nPermissions required: Edit IQ Elements"
      operationId: updateApplication
      parameters:
      - in: path
        name: applicationId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiApplicationDTO'
        description: Specify the applicationId, application name and the organizationId under which  the application exists. `contactUserName` corresponds to the 'contact' field in the UI and represents the user name. If LDAP is used for authentication, you can use LDAP usernames.`tagId` is the internal identifier for the Application Category that you want to apply to the application. . Use the Application Categories REST API for the available categories and the corresponding tagIds.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiApplicationDTO'
          description: The response contains the updated application name, contact user name and application tags,  for the applicationId provided
      tags:
      - Applications
  /api/v2/applications/{applicationId}/move/organization/{organizationId}:
    post:
      description: 'Use this method to move an application from one organization to another.


        Permissions required: Edit IQ Elements'
      operationId: moveApplication
      parameters:
      - description: Enter the applicationId of the application to be moved.
        in: path
        name: applicationId
        required: true
        schema:
          type: string
      - description: Enter the organizationId of the destination organization.
        in: path
        name: organizationId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiMoveApplicationResponseDTOV2'
          description: Application moved successfully, with/without warnings. Warnings, if any, will appear in the response body.
        '404':
          description: Moving the application failed because either an application with the provided applicationId or the organizationId for the organization where it is to be moved is not found.
        '409':
          description: Moving the application failed due to conflicts between the organizations.
      tags:
      - Applications
  /api/v2/applications/{sourceApplicationId}/clone:
    post:
      description: 'Use this method to clone an existing application.


        Permissions required: Add Application (on the parent organization)'
      operationId: cloneApplication
      parameters:
      - description: Enter the applicationId for the application to be cloned.
        in: path
        name: sourceApplicationId
        required: true
        schema:
          type: string
      - description: Enter the application name for the new cloned application.
        in: query
        name: clonedApplicationName
        schema:
          type: string
      - description: Enter the applicationPublicId for the cloned application.
        in: query
        name: clonedApplicationPublicId
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiApplicationDTO'
          description: The response contains application details of the cloned application.
      tags:
      - Applications
components:
  schemas:
    ApiMoveApplicationResponseDTOV2:
      properties:
        errors:
          items:
            type: string
          type: array
        warnings:
          items:
            type: string
          type: array
      type: object
    ApiApplicationDTO:
      properties:
        applicationTags:
          items:
            $ref: '#/components/schemas/ApiApplicationTagDTO'
          type: array
        contactUserName:
          type: string
        id:
          type: string
        name:
          type: string
        organizationId:
          type: string
        publicId:
          type: string
      type: object
    ApiApplicationTagDTO:
      properties:
        applicationId:
          type: string
        id:
          type: string
        tagId:
          type: string
      type: object
    ApiApplicationListDTO:
      properties:
        applications:
          items:
            $ref: '#/components/schemas/ApiApplicationDTO'
          type: array
      type: object
  securitySchemes:
    BasicAuth:
      scheme: basic
      type: http
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http