openapi: 3.0.1
info:
  title: Portal Public API
  description: 'Use IEM API to automate tasks, such as IED onboarding or Industrial
    Edge Application management. The specification is compatible starting from version 1.13.5 of the IEM.'
  version: v1.5.0
servers:
  - url: /portal/api/v1
tags:
  - name: statistics
  - name: devices
  - name: tokens
  - name: applications
  - name: app-configs
  - name: installjobs
  - name: batches
  - name: application-import-jobs
  - name: developer-applications
  - name: projects
  - name: companies
security:
  - ApiKey: []
paths:
  /application-import-jobs:
    post:
      tags:
        - application-import-jobs
      summary: Import application to catalog
      description: This method imports an application to catalog by using application file.
      operationId: import-application
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file to import
              properties:
                file to import:
                  type: string
                  description: The .app file to import application.
                  format: binary
                digest_file:
                  type: string
                  description: The digest.json file if application is signed or need
                    digest file.
                  format: binary
      responses:
        202:
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportAppJobStatus'
        400:
          description: |-
            - invalid.fileName
            - file.size.exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.fileName:
                  $ref: '#/components/examples/invalid.fileName'
                file.size.exceeded:
                  $ref: '#/components/examples/file.size.exceeded'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.file
            - empty.userId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.file:
                  $ref: '#/components/examples/notFound.file'
                empty.userId:
                  $ref: '#/components/examples/empty.userId'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /application-import-jobs/{id}:
    get:
      tags:
        - application-import-jobs
      summary: Get application import job status with jobId
      description: This method returns the application import job status.
      operationId: get-import-job-status
      parameters:
        - name: id
          in: path
          description: The unique job ID, can get from import application to catalog response.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportAppJobStatus'
        400:
          description: invalid.job.id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.job.id:
                  $ref: '#/components/examples/invalid.job.id'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: notFound.job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.job:
                  $ref: '#/components/examples/notFound.job'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /devices/{id}/statistics:
    get:
      tags:
        - statistics
      summary: Get statistics for a Edge Device
      description: This method returns statistics for a specific Edge Device.
      operationId: get-devices-statistics
      parameters:
        - name: id
          in: path
          description: The unique Edge Device ID
          required: true
          schema:
            pattern: '[a-z0-9A-Z]{3,32}$'
            type: string
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Statistics'
        400:
          description: Invalid device id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.data:
                  $ref: '#/components/examples/invalid.device.id'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: notfound.device
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.device:
                  $ref: '#/components/examples/notFound.device'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /developer-applications:
    get:
      tags:
        - developer-applications
      summary: List all developer applications
      description: This method returns a list of all developer applications belongs to the logged-in user created in IEM and invited applications.
      operationId: list-user-applications
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeveloperApplication'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /developer-applications/{id}:
    get:
      tags:
        - developer-applications
      summary: List a specific application's detail info
      description: This method returns detail info of a specific application (self created
        and invited).
      operationId: list-dev-application-by-id
      parameters:
        - name: id
          in: path
          description: The unique application ID
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeveloperApplicationDetail'
        400:
          description: |-
            - notFound.appDetail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                notFound.appDetail:
                  $ref: '#/components/examples/notFound.appDetail'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          $ref: '#/components/responses/ForbiddenErrorV2'
        500:
          $ref: '#/components/responses/ServerInternalErrorV2'
  /developer-applications/{appid}/versions:
    get:
      tags:
        - developer-applications
      summary: List a specific developer application's versions
      description: This method returns a list of versions of a specific application (self created
        or invited).
      operationId: list-application-versions
      parameters:
        - name: appid
          in: path
          description: The unique application ID
          required: true
          schema:
            pattern: ^[a-z0-9A-Z]{32}$
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Version'
        400:
          description: The application id is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.id:
                  $ref: '#/components/examples/invalid.application.id'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: notFound.application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.application:
                  $ref: '#/components/examples/notFound.application'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /devices:
    get:
      tags:
        - devices
      summary: List Edge Devices
      description: This method returns a list of all available Edge Devices for the
        current user.
      operationId: list-devices
      parameters:
        - name: size
          in: query
          description: The size of the page
          schema:
            type: number
            default: 5
        - name: page
          in: query
          description: The page number
          schema:
            type: number
            default: 1
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceExternalVO'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        500:
          $ref: '#/components/responses/ServerInternalError'
    post:
      tags:
        - devices
      summary: Create a new Edge Device
      description: This method creates an Edge Device on IEM with the given
        configuration. It returns a JSON string which can be used for onboarding the
        Edge Device.
      operationId: createDevice
      requestBody:
        description: The device details object.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceCreation'
        required: true
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceCreated'
        400:
          description: |-
            - invalid.email
            - invalid.device.type.id
            - invalid.macaddress
            - duplicate.macaddress
            - limit.gatewayInterface
            - required.IP
            - invalid.ip
            - invalid.netmask
            - invalid.ntpServer
            - no.proxy.invalid
            - required.hostname
            - proxy.invalid
            - invalid.l2.ip
            - device.network.limit
            - invalid.ip.range
            - invalid.auxiliary.ip
            - limit.auxiliary.ip
            - usable.ip.unavailable
            - invalid.docker.ip
            - deviceName.unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.email:
                  $ref: '#/components/examples/invalid.email'
                invalid.device.type.id:
                  $ref: '#/components/examples/invalid.device.type.id'
                limit.gatewayInterface:
                  $ref: '#/components/examples/limit.gatewayInterface'
                invalid.macaddress:
                  $ref: '#/components/examples/invalid.macaddress'
                duplicate.macaddress:
                  $ref: '#/components/examples/duplicate.macaddress'
                required.IP:
                  $ref: '#/components/examples/required.IP'
                invalid.ip:
                  $ref: '#/components/examples/invalid.ip'
                invalid.netmask:
                  $ref: '#/components/examples/invalid.netmask'
                invalid.ntpServer:
                  $ref: '#/components/examples/invalid.ntpServer'
                required.hostname:
                  $ref: '#/components/examples/required.hostname'
                proxy.invalid:
                  $ref: '#/components/examples/proxy.invalid'
                no.proxy.invalid:
                  $ref: '#/components/examples/no.proxy.invalid'
                invalid.l2.ip:
                  $ref: '#/components/examples/invalid.l2.ip'
                device.network.limit:
                  $ref: '#/components/examples/device.network.limit'
                invalid.ip.range:
                  $ref: '#/components/examples/invalid.ip.range'
                invalid.auxiliary.ip:
                  $ref: '#/components/examples/invalid.auxiliary.ip'
                limit.auxiliary.ip:
                  $ref: '#/components/examples/limit.auxiliary.ip'
                usable.ip.unavailable:
                  $ref: '#/components/examples/usable.ip.unavailable'
                invalid.docker.ip:
                  $ref: '#/components/examples/invalid.docker.ip'
                deviceName.unavailable:
                  $ref: '#/components/examples/deviceName.unavailable'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
        409:
          description: |-
            - alreadyExists.macaddress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                alreadyExists.macaddress:
                  $ref: '#/components/examples/alreadyExists.macaddress'
        500:
          description: |-
            - platform.not.supported
            - something.wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                platform.not.supported:
                  $ref: '#/components/examples/platform.not.supported'
                something.wrong:
                  $ref: '#/components/examples/something.wrong'
      x-codegen-request-body-name: body
  /devices/{id}:
    get:
      tags:
        - devices
      summary: Get Edge Device details
      description: This method returns device details for a specific Edge Device.
      operationId: get-device-by-id
      parameters:
        - name: id
          in: path
          description: UUID of the device
          required: true
          schema:
            pattern: '[a-z0-9A-Z]{3,32}$'
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceVO'
        400:
          description: |-
            - notFound.device
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.device:
                  $ref: '#/components/examples/notFound.device.id'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
        500:
          $ref: '#/components/responses/ServerInternalError'
    delete:
      tags:
        - devices
      summary: Delete Edge Device
      description: This method removes a specific Edge Device.
      operationId: delete-device
      parameters:
        - name: id
          in: path
          description: The unique Edge Device ID.
          required: true
          schema:
            pattern: '[a-z0-9A-Z]{3,32}$'
            type: string
      responses:
        204:
          description: Successfully deleted device
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.device
            - notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.device:
                  $ref: '#/components/examples/notFound.device'
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /devices/installed-apps:
    get:
      tags:
        - devices
      summary: List applications installed on Edge Device
      description: This method returns a list of all applications installed on a specific
        Edge Device. If the Edge Device ID is not provided, then it lists all applications
        installed on all the Edge Devices assigned to the logged-in user.
      operationId: list-apps-on-devices
      parameters:
        - name: deviceId
          in: query
          description: The unique Edge Device ID
          schema:
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceApplication'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /devices/{id}/logs:
    get:
      tags:
        - devices
      summary: List the specific Edge Device logs files
      description: This method returns list of Edge Device logs files with the unique Edge Device id.
      operationId: list-device-logs
      parameters:
        - name: id
          in: path
          description: The unique Edge Device ID, can get from list Edge Devices.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceLog'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: notFound.device
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.device:
                  $ref: '#/components/examples/notFound.device'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /devices/{id}/logs/{logId}:
    get:
      tags:
        - devices
      summary: Download Edge Device logs by logId
      description: This method downloads Edge Device logs.
      operationId: download-device-logs
      parameters:
        - name: logId
          in: path
          description: The unique log ID.
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: The unique Edge Device ID.
          required: true
          schema:
            type: string
      responses:
        200:
          description: successful operation (return public path of the log file)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceLogUrl'
        400:
          description: |-
            - invalid.deviceId
            - invalid log id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.deviceId:
                  $ref: '#/components/examples/invalid.deviceId'
                InvalidLogId:
                  $ref: '#/components/examples/InvalidLogId'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.logFile
            - notFound.device
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.logFile:
                  $ref: '#/components/examples/notFound.logFile'
                notFound.device:
                  $ref: '#/components/examples/notFound.device'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /devices/filtered-logs:
    get:
      tags:
        - devices
      summary: Download Edge Device logs by filter options
      description: This method downloads Edge Device logs filtered by parameters. The filtered logs will be downloaded in a single file.This api is only applicable to IEM K8s.
      operationId: downloadFilteredLogs
      parameters:
        - name: deviceid
          in: query
          description: The unique Edge Device ID
          schema:
            type: string
        - name: start
          in: query
          description: Start of the time duration of data
          schema:
            type: string
          example: 2022-11-22T00:00:10Z
        - name: stop
          in: query
          description: Stop of the time duration of data
          schema:
            type: string
          example: 2022-11-22T00:00:10Z
        - name: type
          in: query
          description: The log type
          schema:
            type: string
            enum: ["applog","syslog"]
        - name: appRepoName
          in: query
          description: The application repo name when download log type is applog
          schema:
            type: string
          example: nginxapp
      responses:
        200:
          description: Successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                example: ",,0,2022-12-14T08:39:25.184640592Z,2022-12-14T08:39:25.180Z DEBUG [edgeeye-config-service] add oberver | source=obsersvc.go:53\n,log,kube.var.log.containers.edgeeye-config-service-7cd757bf58-tcb6n_iem_edgeeye-config-ui-03c7e6e4f1eec2135e99ea6a88b400edd47ddb5c50d47bbd9051b07972b8bc5c.log"
        400:
          description: |-
            - invalid.edgeeye
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                invalid.edgeeye:
                  $ref: '#/components/examples/invalid.edgeeye'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          $ref: '#/components/responses/ForbiddenErrorV2'
        500:
          $ref: '#/components/responses/ServerInternalErrorV2'
  /devices/{id}/installed-apps/{app-id}/statistics:
    get:
      tags:
        - devices
      summary: List Edge Device's application statistics
      description: This method lists statistics for a specific application installed
        on an Edge Device.
      operationId: getDeviceApplicationStatistics
      parameters:
        - name: id
          in: path
          description: The unique Edge Device ID
          required: true
          schema:
            type: string
        - name: app-id
          in: path
          description: The unique ID of application
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceAppStatisticsVO'
        400:
          description: |-
            - notFound.event
            - notFound.appDetail
            - notFound.user
            - invalid.id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                notFound.event:
                  $ref: '#/components/examples/notFound.event'
                notFound.appDetail:
                  $ref: '#/components/examples/notFound.appDetail'
                notFound.user:
                  $ref: '#/components/examples/notFound.user.v2'
                invalid.id:
                  $ref: '#/components/examples/invalid.id'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          $ref: '#/components/responses/ForbiddenErrorV2'
        500:
          $ref: '#/components/responses/ServerInternalErrorV2'
  /login/direct:
    post:
      tags:
        - tokens
      summary: Generate a specific user token
      description: |-
        This method logs in a user to IEM with the username, password. Example: '{"username":"myuser", "password":"mypassword"}'.
      operationId: get-token
      requestBody:
        description: The map of login credentials, including username, password.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Login'
        required: true
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
            example-1:
              example:
                value:
                  data:
                    access_token: string
                    expires_in: 0
        400:
          description: Your account has been suspended. Please contact admin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.data:
                  $ref: '#/components/examples/invalid.data'
        404:
          description: notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
        500:
          $ref: '#/components/responses/ServerInternalError'
      x-codegen-request-body-name: body
  /logout:
    get:
      tags:
        - tokens
      summary: Invalidate the token
      description: This method invalidates the token in IEM OS. Not applicable to IEM K8s.
      operationId: invalidate-token
      responses:
        204:
          description: Successful operation
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /auth-tokens/verify:
    get:
      tags:
        - tokens
      summary: Verifies the Auth Token
      description: This method verifies the Auth token, and returns the auth details.
      operationId: verify-token
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationsVO'
        400:
          description: Bad Request, some preconditions did not match e.g. Token to
            validate is missing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.data:
                  $ref: '#/components/examples/invalid.data'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /applications:
    get:
      tags:
        - applications
      summary: List catalog applications
      description: This method returns a list of applications in catalog.
      operationId: list-catalog
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogApplication'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /applications/{id}:
    get:
      tags:
        - applications
      summary: Get application details
      description: This method returns application details for a specific application
      operationId: get-application-by-id
      parameters:
        - name: id
          in: path
          description: The unique application ID, this can get from list catalog applications api.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationDetail'
        400:
          description: |-
            - notFound.appDetail
            - notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                notFound.appDetail:
                  $ref: '#/components/examples/notFound.appDetail'
                notFound.user:
                  $ref: '#/components/examples/notFound.user.v2'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          $ref: '#/components/responses/ForbiddenErrorV2'
        500:
          $ref: '#/components/responses/ServerInternalErrorV2'
  /applications/{id}/configs:
    get:
      tags:
        - app-configs
      summary: List application configs
      description: This method returns a list of configurations for a specific application.
      operationId: applications-list-config
      parameters:
        - name: id
          in: path
          description: The unique application ID, this can get from list catalog applications api.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationConfiguration'
        400:
          description: The application id is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.id:
                  $ref: '#/components/examples/invalid.id'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.user
            - notFound.application
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
                notFound.application:
                  $ref: '#/components/examples/notFound.application'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /applications/{id}/configs/{configId}/template/{templateId}:
    get:
      tags:
        - app-configs
      summary: Download application configuration template or configuration version file
      description: This method downloads an application configuration template file or an application configuration version file
      operationId: get-applications-template
      parameters:
        - name: id
          in: path
          description: The unique application ID, can get from list applications
          required: true
          schema:
            pattern: '[a-z0-9A-Z]{3,32}$'
            type: string
        - name: configId
          in: path
          description: The unique config ID, can get from applications-list-config
          required: true
          schema:
            pattern: '[a-z0-9A-Z]{3,32}$'
            type: string
        - name: templateId
          in: path
          description: If download an application configuration template file, this may be the unique config template ID or if download an application configuration version file, this would be the unique config version ID.
          required: true
          schema:
            pattern: '[a-z0-9A-Z]{3,32}$'
            type: string
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OctetStreamData'
        400:
          description: invalid.id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.id:
                  $ref: '#/components/examples/invalid.id'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.user
            - notFound.application
            - notFound.appconfig
            - notFound.file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
                notFound.application:
                  $ref: '#/components/examples/notFound.application'
                notFound.appconfig:
                  $ref: '#/components/examples/notFound.appconfig'
                notFound.file:
                  $ref: '#/components/examples/notFound.file'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /installjobs/{id}:
    get:
      tags:
        - installjobs
      summary: Get job status from jobId
      description: This method returns job status.
      operationId: get-install-job-status
      parameters:
        - name: id
          in: path
          description: The unique job ID, can get from list jobs by batch id api.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                required:
                  - data
                type: object
                properties:
                  data:
                    type: string
                    enum:
                      - COMPLETED
                      - PENDING
                      - QUEUED
                      - FAILED
                      - EXECUTING
                      - DELETED
                      - DELETING
                description: "The install job status."
        400:
          description: |-
            - invalid.id
            - notFound.job
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.id:
                  $ref: '#/components/examples/invalid.id'
                notFound.job:
                  $ref: '#/components/examples/notFound.job'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /installjobs:
    put:
      tags:
        - installjobs
      summary: Perform action(Retry, Rollback, RetryResubmit or RollbackResubmit)
        on job ids
      description: This method performs intented action and provides action submission
        status in each job.
      operationId: retry-rollback-job
      parameters:
        - name: action
          in: query
          description: The action to perform (Retry, Rollback, RetryResubmit or RollbackResubmit)
          required: true
          schema:
            type: string
            enum:
              - Retry
              - Rollback
              - RetryResubmit
              - RollbackResubmit
      requestBody:
        description: The list of job IDs. The job list can get from batches api with the specific batch id.
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
        required: true
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetryResponse'
        400:
          description: operation.invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                operation.invalid:
                  $ref: '#/components/examples/operation.invalid'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.user
            - notFound.job
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
                notFound.job:
                  $ref: '#/components/examples/notFound.job'
        500:
          $ref: '#/components/responses/ServerInternalError'
      x-codegen-request-body-name: body
    post:
      tags:
        - installjobs
      summary: Delete jobs
      description: This method removes a list of jobs from IEM.
      operationId: delete-job
      requestBody:
        description: The list of job IDs
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
        required: true
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                required:
                  - data
                type: object
                properties:
                  data:
                    type: boolean
                description: ""
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.user
            - notFound.job
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
                notFound.job:
                  $ref: '#/components/examples/notFound.job'
        500:
          $ref: '#/components/responses/ServerInternalError'
      x-codegen-request-body-name: body
  /batches:
    post:
      tags:
        - batches
      summary: Execute commands on app
      description: This method executes commands(installApplication, updateApplication, uninstallApplication, startApplication, restartApplication, stopApplication, updateAppConfig, deleteAppConfig) on
        an application in IEM. If installing a catalog application, the optional param
        named versionId is not required. If installing a develop application, the versionId should
        be detailed.
      operationId: submit-batch
      parameters:
        - name: appid
          in: query
          description: The unique application ID.
          required: true
          schema:
            pattern: ^[a-z0-9A-Z]{32}$
            type: string
        - name: operation
          in: query
          description: |-
            The operation to perform (install, uninstall, or update)

            Valid operations: (installApplication, updateApplication, uninstallApplication, startApplication, restartApplication, stopApplication, updateAppConfig, deleteAppConfig)
          required: true
          schema:
            type: string
            enum:
              - installApplication
              - updateApplication
              - uninstallApplication
              - startApplication
              - restartApplication
              - stopApplication
              - updateAppConfig
              - deleteAppConfig
        - name: schedule
          in: query
          description: The time in ticks from now to the date you want to trigger the job.
          schema:
            type: string
        - name: versionId
          in: query
          description: The specific version id for developer application.
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - infoMap
              properties:
                files:
                  type: string
                  format: binary
                  description: The files to send when use file-based configuration
                infoMap:
                  type: string
                  description: "The unique Edge Device ID, delayTime(optional value\
                    \ ranging between 1-60 in minutes which represents delay interval\
                    \ between jobs of a batch) and other info regarding config,resourses\
                    \ etc\n\nValid combinations:\n  - version config:  `{\"configs\"\
                    :[{\"configId\":\"configid\",\"versionId\":\"versionid\"}`\n \
                    \ - pre-defined template-based config: e.g. deploying or changing\
                    \ a template configuration: `{\"configId\":\"configid\",\"templateId\"\
                    :\"templateId\"}`\n  - template config: `{\"configId\":\"configid\"\
                    ,\"templateId\":\"templateId\",\n  \"editedTemplateText\":\"editedText\"\
                    }`\n  - file-based configuration: `{\"configId\":\"configid\"\
                    ,\"fileId\":\"unique id\"}]}` where `fileId` is the uploaded file\
                    \ `name` field\n  \n **Example value:**\n  ```\n  {\n    \"devices\"\
                    :  [\n      \"string\"\n    ],\n    \"delayTime\":integer,\n \
                    \   \"configs\": [\n      {\n        \"configId\": \"string\"\
                    ,\n        \"versionId\": \"string\",\n        \"templateId\"\
                    : \"string\",\n        \"editedTemplateText\": \"string\",\n \
                    \       \"fileId\": \"string\"\n      }\n    ]\n  }\n  ```"
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - data
                type: object
                properties:
                  data:
                    description: The batch job id.
                    type: string
                description: ""
                example:
                  data: 58ebd85caff84de3a0d09b7767b83b05
        400:
          description: |-
            - invalid.data
            - invalid.fileName
            - appId.notnull
            - deviceId.notnull
            - operation.invalid
            - file.size.exceeded
            - invalid.config
            - required.config
            - time.invalid
            - operation.notAllowed
            - invalid.delay.time
            - invalid.delay.time.interval
            - notFound.appVersion
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.data:
                  $ref: '#/components/examples/invalid.data'
                invalid.fileName:
                  $ref: '#/components/examples/invalid.fileName'
                appId.notnull:
                  $ref: '#/components/examples/appId.notnull'
                deviceId.notnull:
                  $ref: '#/components/examples/deviceId.notnull'
                operation.invalid:
                  $ref: '#/components/examples/operation.invalid'
                file.size.exceeded:
                  $ref: '#/components/examples/file.size.exceeded'
                invalid.config:
                  $ref: '#/components/examples/invalid.config'
                required.config:
                  $ref: '#/components/examples/required.config'
                time.invalid:
                  $ref: '#/components/examples/time.invalid'
                operation.notAllowed:
                  $ref: '#/components/examples/operation.notAllowed'
                invalid.delay.time:
                  $ref: '#/components/examples/invalid.delay.time'
                invalid.delay.time.interval:
                  $ref: '#/components/examples/invalid.delay.time.interval'
                notFound.appVersion:
                  $ref: '#/components/examples/notFound.appVersion'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.user
            - notFound.application
            - notFound.appconfig
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
                notFound.application:
                  $ref: '#/components/examples/notFound.application'
                notFound.appconfig:
                  $ref: '#/components/examples/notFound.appconfig'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /batches/device-jobs:
    post:
      tags:
        - batches
      summary: Execute commands on device
      description: This method executes commands(e.g. systemReboot, systemShutdown)
        on devices in IEM. Using this API, user can trigger operation
        on multiple devices and can schedule a future time to trigger an operation.
        If user does not provide a "schedule time", he can provide time interval
        using "delaytime" so that operation on devices will trigger with that interval.
      operationId: submit-batch-device
      requestBody:
        description: "The DeviceInputJob object. \n- **operation** **required*: operation\
          \ to be performed on given device, Allowed values are systemReboot, systemShutdown\n\
          - **metadata**: Any extra infornmation required by device to execute given\
          \ operation.\n- **schedule**: Epoch time (number of seconds that have elapsed\
          \ since the Unix epoch, excluding leap seconds. The Unix epoch is 00:00:00\
          \ UTC on 1 January 1970.) at which operation to be schedule. e.g for date\
          \ Thursday, June 23, 2022 10:19:00 AM, Epoch time is 1655979540  \n- **delayTime**:\
          \ optional value ranging between 1-60 in minutes which represents delay\
          \ interval between jobs of a batch\n- **devices** **required*: List of device\
          \ Ids on which operation to be performed."
        content:
          application/json:
            schema:
              type: object
              properties:
                deviceJobInput:
                  $ref: '#/components/schemas/DeviceInputJob'
        required: false
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - batch-id
                type: object
                properties:
                  batch-id:
                    type: string
                description: ""
            response:
              example:
                batch-id: "66565123456456789"
        400:
          description: |-
            - deviceId.notnull
            - operation.invalid
            - time.invalid
            - invalid.delay.time
            - invalid.delay.time.interval
            - invalid.data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.data:
                  $ref: '#/components/examples/invalid.data'
                deviceId.notnull:
                  $ref: '#/components/examples/deviceId.notnull'
                operation.invalid:
                  $ref: '#/components/examples/operation.invalid'
                time.invalid:
                  $ref: '#/components/examples/time.invalid'
                invalid.delay.time:
                  $ref: '#/components/examples/invalid.delay.time'
                invalid.delay.time.interval:
                  $ref: '#/components/examples/invalid.delay.time.interval'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        500:
          $ref: '#/components/responses/ServerInternalError'
      x-codegen-request-body-name: body
  /batches/{batchId}:
    get:
      tags:
        - batches
      summary: Get batch status with the unique batch ID
      description: This method gets batch status with the unique batch ID. If it's READY, it means
        batch is complete and soon its jobs will get created; PROCESSED ,it means
        all its jobs are created.
      operationId: get-batch-status
      parameters:
        - name: batchId
          in: path
          description: The unique batch ID
          required: true
          schema:
            pattern: ^[a-z0-9A-Z]{32}$
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                required:
                  - data
                type: object
                properties:
                  data:
                    type: string
                    enum:
                      - READY
                      - PROCESSED
                description: ""
        400:
          description: The batch id is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.id:
                  $ref: '#/components/examples/invalid.id'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.user
            - notFound.batch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
                notFound.batch:
                  $ref: '#/components/examples/notFound.batch'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /batches/{id}/jobs:
    get:
      tags:
        - batches
      summary: List of jobs with the unique batch ID
      description: This method gets a list of jobs with the unique batch ID.
      operationId: get-batch-jobs
      parameters:
        - name: id
          in: path
          description: The unique batch ID
          required: true
          schema:
            pattern: ^[a-z0-9A-Z]{32}$
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationJob'
        400:
          description: The batch id is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid.id:
                  $ref: '#/components/examples/invalid.id'
        401:
          $ref: '#/components/responses/UnAuthorizationError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        404:
          description: |-
            - notFound.user
            - notFound.batch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user'
                notFound.batch:
                  $ref: '#/components/examples/notFound.batch'
        500:
          $ref: '#/components/responses/ServerInternalError'
  /projects:
    get:
      tags:
        - projects
      summary: List projects
      description: This method returns a list of projects.
      operationId: list-project
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          description: |-
            - auth.unauthorizedToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                auth.unauthorizedToken:
                  $ref: '#/components/examples/auth.unauthorizedToken.v2'
        404:
          description: notFound.user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                notFound.user:
                  $ref: '#/components/examples/notFound.user.v2'
        500:
          $ref: '#/components/responses/ServerInternalErrorV2'
    post:
      tags:
        - projects
      summary: Create a new project
      description: This method creates a new project.
      operationId: create-project
      requestBody:
        description: The project information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectCreation'
        required: true
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectCreated'
        400:
          description: |-
            - project.notNull
            - projectName.notNull
            - description.notNull
            - companyId.notNull
            - notFound.company
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                project.notNull:
                  $ref: '#/components/examples/project.notNull'
                projectName.notNull:
                  $ref: '#/components/examples/projectName.notNull'
                description.notNull:
                  $ref: '#/components/examples/description.notNull'
                companyId.notNull:
                  $ref: '#/components/examples/companyId.notNull'
                notFound.company:
                  $ref: '#/components/examples/notFound.company'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          description: |-
            - auth.unauthorizedToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                auth.unauthorizedToken:
                  $ref: '#/components/examples/auth.unauthorizedToken.v2'
        500:
          $ref: '#/components/responses/ServerInternalErrorV2'
  /projects/{id}:
    delete:
      tags:
        - projects
      summary: Delete a project
      description: This method removes a specific project from IEM.
      operationId: delete-project
      parameters:
        - name: id
          in: path
          description: The unique project id
          required: true
          schema:
            type: string
      responses:
        204:
          description: Successfully deleted project
        400:
          description: notFound.project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                notFound.project:
                  $ref: '#/components/examples/notFound.project'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          description: |-
            - auth.unauthorizedToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                auth.unauthorizedToken:
                  $ref: '#/components/examples/auth.unauthorizedToken.v2'
        500:
          $ref: '#/components/responses/ServerInternalErrorV2'
  /projects/{id}/applications:
    get:
      tags:
        - projects
      summary: List project applications
      description: This method returns a list of all applications included in a specific project.
      operationId: list-apps-on-project
      parameters:
        - name: id
          in: path
          description: The unique project ID
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectApplication'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          $ref: '#/components/responses/ForbiddenErrorV2'
        500:
          $ref: '#/components/responses/ServerInternalErrorV2'
  /companies:
    get:
      tags:
        - companies
      summary: List companies
      description: This method returns a list of companies in IEM.
      operationId: list-company
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Companies'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          description: |-
            - auth.unauthorizedToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                auth.unauthorizedToken:
                  $ref: '#/components/examples/auth.unauthorizedToken.v2'
        500:
          $ref: '#/components/responses/ServerInternalErrorV2'
    post:
      tags:
        - companies
      summary: Create a new company
      description: This method creates a new company to IEM.
      operationId: create-company
      requestBody:
        description: The company details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompanyCreation'
        required: true
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
        400:
          description: |-
            - companyInfo.notNull
            - companyName.notNull
            - companyName.length.invalid
            - companyAddress.notNull
            - companyAddress.length.invalid
            - city.notNull
            - city.length.invalid
            - state.notNull
            - state.length.invalid
            - country.notNull
            - country.length.invalid
            - postalCode.notNull
            - postalCode.length.invalid
            - webAddress.invalid
            - webAddress.length.invalid
            - phone.notNull
            - phone.invalid
            - phone.length.invalid
            - email.notNull
            - email.invalid
            - email.length.invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                companyInfo.notNull:
                  $ref: '#/components/examples/companyInfo.notNull'
                companyName.notNull:
                  $ref: '#/components/examples/companyName.notNull'
                companyName.length.invalid:
                  $ref: '#/components/examples/companyName.length.invalid'
                companyAddress.notNull:
                  $ref: '#/components/examples/companyAddress.notNull'
                companyAddress.length.invalid:
                  $ref: '#/components/examples/companyAddress.length.invalid'
                city.notNull:
                  $ref: '#/components/examples/city.notNull'
                city.length.invalid:
                  $ref: '#/components/examples/city.length.invalid'
                state.notNull:
                  $ref: '#/components/examples/state.notNull'
                state.length.invalid:
                  $ref: '#/components/examples/state.length.invalid'
                country.notNull:
                  $ref: '#/components/examples/country.notNull'
                country.length.invalid:
                  $ref: '#/components/examples/country.length.invalid'
                postalCode.notNull:
                  $ref: '#/components/examples/postalCode.notNull'
                postalCode.length.invalid:
                  $ref: '#/components/examples/postalCode.length.invalid'
                webAddress.invalid:
                  $ref: '#/components/examples/webAddress.invalid'
                webAddress.length.invalid:
                  $ref: '#/components/examples/webAddress.length.invalid'
                phone.notNull:
                  $ref: '#/components/examples/phone.notNull'
                phone.invalid:
                  $ref: '#/components/examples/phone.invalid'
                phone.length.invalid:
                  $ref: '#/components/examples/phone.length.invalid'
                email.notNull:
                  $ref: '#/components/examples/email.notNull'
                email.invalid:
                  $ref: '#/components/examples/email.invalid'
                email.length.invalid:
                  $ref: '#/components/examples/email.length.invalid'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          description: |-
            - auth.unauthorizedToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                auth.unauthorizedToken:
                  $ref: '#/components/examples/auth.unauthorizedToken.v2'
        409:
          description: |-
            - alreadyExists.company
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                alreadyExists.company:
                  $ref: '#/components/examples/alreadyExists.company'
        500:
          $ref: '#/components/responses/ServerInternalErrorV2'
  /companies/{id}:
    delete:
      tags:
        - companies
      summary: Delete a company
      description: This method removes a specific company from IEM.
      operationId: delete-company
      parameters:
        - name: id
          in: path
          description: The unique company id
          required: true
          schema:
            type: string
      responses:
        204:
          description: Successfully deleted company
        400:
          description: notFound.company
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                notFound.company:
                  $ref: '#/components/examples/notFound.company'
        401:
          $ref: '#/components/responses/UnAuthorizationErrorV2'
        403:
          description: |-
            - auth.unauthorizedToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                auth.unauthorizedToken:
                  $ref: '#/components/examples/auth.unauthorizedToken.v2'
        405:
          description: |-
            Method not allowed
            - restricted.deleteCompany
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                restricted.deleteCompany:
                  $ref: '#/components/examples/restricted.deleteCompany.v2'
        500:
          description: |-
            Something went wrong... can not perform requested operation.
            - something.wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseV2'
              examples:
                something.wrong:
                  $ref: '#/components/examples/something.wrong.v2'
components:
  schemas:
    ApplicationJob:
      title: ""
      required:
        - data
      type: object
      properties:
        data:
          type: array
          items:
            required:
              - appId
              - installedJobId
              - objectId
              - operation
              - status
            type: object
            properties:
              installedJobId:
                type: string
                description: The unique install job id.
              objectId:
                type: string
                description: The object id can be the label id or the device id.
              status:
                type: string
                enum:
                  - PENDING
                  - QUEUED
                  - COMPLETED
                  - FAILED
                  - UNASSIGNED
                  - UNINSTALLING
                  - DELETING
                  - SKIPPED
                  - DELETED
                  - EXECUTING
              appId:
                type: string
                description: The id of the application to be installed.
              appVersion:
                type: string
                description: The appVersion is not set for published applications.
              operation:
                type: string
                enum:
                  - installApplication
                  - updateApplication
                  - uninstallApplication
                  - startApplication
                  - restartApplication
                  - stopApplication
                  - updateAppConfig
                  - deleteAppConfig
      description: ""
      example:
        data:
          - installedJobId: 152a2c9a6caa4c6a990e1cf3dd930584
            objectId: 06cdac6c607e447dad16eef9f767a56e
            status: COMPLETED
            appId: b98838937bb34487a20c77b8e8b6a9f8
            appVersion: ""
            operation: installApplication
    RetryResponse:
      required:
        - data
      type: object
      properties:
        data:
          required:
            - job-id
          type: object
          properties:
            job-id:
              type: string
      description: ""
    ErrorResponseV2:
      required:
        - errors
      type: object
      properties:
        errors:
          minItems: 1
          uniqueItems: true
          type: array
          items:
            type: object
            properties:
              timestamp:
                type: string
                description: Timestamp when the error has occurred
                format: date-time
              status:
                type: integer
                description: Status Code
                format: number
              error:
                type: string
                description: error code to identify error type
              message:
                type: string
                description: Error message in US english
              logref:
                type: string
                description: log reference identifier to find logs related to error
      description: Common error response return
    ErrorResponse:
      description: legacy error response structure
      type: object
      properties:
        errors:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            required:
              - code
              - message
              - errorCode
              - field
              - logref
            properties:
              code:
                type: string
                description: The error code.
              message:
                type: string
                description: The error detail messages.
              errorCode:
                type: number
                description: The http status code.
              field:
                type: string
              logref:
                type: string
                description: The log id, can help to find error details in log file.
              parentLogref:
                type: string
                description: The parent log id(if the error is thrown from an exception), can help to find error details in log file.
    InputStream:
      type: object
    OctetStreamData:
      type: object
      properties:
        octetStream:
          $ref: '#/components/schemas/InputStream'
        uri:
          type: string
        mimeType:
          type: string
    ApplicationConfigurationTemplate:
      type: object
      description: The application config template info.
      properties:
        appConfigTemplateId:
          type: string
          description: The application config template id.
        refName:
          maxLength: 50
          type: string
          description: The application config template file ref name.
        description:
          type: string
          description: The application config template file description.
        filename:
          maxLength: 50
          type: string
          description: The application config template file name.
        schemaType:
          type: string
          description: This value is optional and is only set if versioned configuration
            is used.
    ApplicationConfiguration:
      type: object
      properties:
        data:
          minItems: 1
          uniqueItems: true
          type: array
          items:
            required:
              - appConfigId
              - description
              - displayName
              - versioned
            type: object
            properties:
              appConfigId:
                type: string
                description: The application config id.
              displayName:
                maxLength: 100
                type: string
                description: The application config display name.
              description:
                type: string
                description: The application config description.
              appConfigVersionLst:
                type: array
                description: The application config version list.
                items:
                  $ref: '#/components/schemas/ApplicationConfigurationVersion'
              versioned:
                type: boolean
                description: Whether versioned or not.
              templateVo:
                $ref: '#/components/schemas/ApplicationConfigurationTemplate'
      description: ""
      example:
        data:
          - appConfigId: string
            displayName: string
            description: string
            appConfigVersionLst:
              - appConfigVersionId: string
                refName: string
                description: string
                filename: string
            versioned: true
            templateVo:
              appConfigTemplateId: string
              refName: string
              description: string
              filename: string
              schemaType: string
    ApplicationConfigurationVersion:
      type: object
      properties:
        appConfigVersionId:
          type: string
        refName:
          maxLength: 50
          type: string
        description:
          type: string
        filename:
          maxLength: 50
          type: string
    CatalogApplication:
      required:
        - data
      type: object
      properties:
        data:
          minItems: 1
          uniqueItems: true
          type: array
          items:
            required:
              - applicationId
              - icon
              - title
              - userId
            type: object
            properties:
              applicationId:
                type: string
                description: The application Id.
              userId:
                type: string
                description: Application owner's id.
              icon:
                type: string
                description: The application icon url.
              title:
                type: string
                description: The application title.
      description: "The catalog applications list info."
    ApplicationDetail:
      required:
        - id
        - userId
        - projectId
        - icon
        - title
        - appStatus
        - description
        - appVersions
      properties:
        description:
          type: string
          description: The application description.
        id:
          type: string
          description: The application Id.
        userId:
          type: string
          description: The application owner's id.
        icon:
          type: string
          description: The application icon url.
        projectId:
          type: string
          description: The id of the project which the application belongs to.
        title:
          type: string
          description: The application title.
        appStatus:
          type: string
          description: The application status.
          enum:
            - PUBLISHED
            - ACTIVE
            - PENDING
            - SUSPENDED
            - DELETED
            - FAILED
            - BEING_DELETED
        appVersions:
          minItems: 1
          uniqueItems: true
          type: array
          items:
            required:
              - versionId
              - versionNumber
            type: object
            properties:
              versionId:
                type: string
                description: The application version Id.
              versionNumber:
                type: string
                description: The application version number.
      description: "The application detail."
      example:
        id: c0bc43d7b7544bb9a45f2c9e3d30e525
        userId: a39a5a50f510432a8e3bd832d9ec3c39
        description: test
        icon: "https://localhost:443/pp/PortalCache/app/4c3d9239c115411e887c9b1f79859778/1.png"
        title: "test"
        appStatus: "PUBLISHED"
        projectId: "d4f9b1e0f2a2429a9d44eb9c872845ea"
        appVersions:
          - versionId: "wXqxknGCP2xd4tEeyEvZUMbTsjwxVUeU"
            versionNumber: "0.0.2"
    AuthorizationsVO:
      required:
        - data
      type: object
      properties:
        data:
          required:
            - applicationId
            - authenticationType
            - groupPermissions
            - role
            - userId
          type: object
          properties:
            userId:
              type: string
              description: The current user id.
            applicationId:
              type: string
              description: The id of the application which the user logged in. Here this application id means IEM, it is also treated as an application.
            groupPermissions:
              type: object
              properties: {}
              description: The permissions of the group which the current user in.
            role:
              type: string
              description: The user role.
            authenticationType:
              type: string
              description: The auth type, like "BEARER".
      description: ""
      example:
        data:
          userId: a39a5a50f510432a8e3bd832d9ec3c39
          applicationId: 41ff73c9719a42bdb0348355114ceb82
          groupPermissions: {}
          role: Admin
          authenticationType: BEARER
    DeviceAppStatisticsVO:
      type: object
      properties:
        deviceAppStatisticsData:
          type: string
      description: ""
      example:
        deviceAppStatisticsData: \{"status":"Active","time":"2022-12-19 07:14:06.319079052
          +0000 UTC m=+30.002882942"\}
    Login:
      required:
        - password
        - username
      type: object
      properties:
        username:
          type: string
          description: Associated user name for basic auth.
        password:
          type: string
          description: Associated password for basic auth.
      example:
        username: string
        password: string
    LoginResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            access_token:
              type: string
              description: access token
            refresh_token:
              type: string
              description: refresh token
            expires_in:
              type: integer
              description: Exipration time of the token
              format: int64
      example:
        data:
          access_token: string
          refresh_token: string
          expires_in: 12036854776000
    DeviceApplication:
      required:
        - data
      type: object
      properties:
        data:
          type: array
          items:
            required:
              - applicationId
              - deviceId
              - deviceName
              - icon
              - status
              - title
              - verionId
              - versionNumber
            type: object
            properties:
              applicationId:
                type: string
                description: The application id.
              icon:
                type: string
                description: The application icon url.
              title:
                type: string
                description: The application title.
              deviceId:
                type: string
                description: The id of the Edge Device on which the application installed.
              deviceName:
                type: string
                description: The name of the Edge Device on which the application installed.
              versionId:
                type: string
                description: The application's version id.
              versionNumber:
                type: string
                description: The application's version number.
              status:
                type: string
                description: If application is published to the catalog, the application will get
                  the status LIVE.
                enum:
                  - REVIEWED
                  - LIVE
      description: "The applications installed on the Edge Devices."
      example:
        data:
          - applicationId: 093751e589e040aca13f4aaefd2f62a9
            icon: ""
            title: "test"
            deviceId: 093751e589e040aca13f4aaefd2f62a9
            deviceName: "testDevice"
            versionId: PKF5CMDhyFUndKy0TciuWPKpR9ITlkSp
            versionNumber: 0.0.1
            status: "REVIEWED"
    DeviceExternalVO:
      required:
        - data
      type: object
      properties:
        data:
          type: array
          items:
            required:
              - createdDate
              - deviceId
              - deviceName
              - deviceStatus
              - modifiedDate
              - platformId
              - softwarePlatformName
              - swPlatformId
              - userId
            type: object
            properties:
              userId:
                type: string
                description: The device owner's id.
              deviceId:
                type: string
                description: The device id.
              deviceName:
                type: string
                description: The device name.
              deviceStatus:
                type: string
                description: The device status.
                enum:
                  - PENDING
                  - ACTIVE
                  - DELETED
              platformId:
                type: string
                description: The platform id.
              swPlatformId:
                type: string
                description: This is id corresponding to DockerCompose or Kubernetes.
              createdDate:
                type: number
                description: The date when the device create.
              modifiedDate:
                type: number
                description: The date when the device lastest modify.
              softwarePlatformName:
                type: string
                description: This was old implementation earlier, it could be dockerCompose or Kubernetes.
      description: If a device is created, default state is set to ACTIVE. This behavior
        will be fixed and the default state will be PENDING.
      example:
        data:
          - userId: 753674fed1824c1a86081711f77cc6e0
            deviceId: 8efd6f5029334011adb8702f7def0ef7
            deviceName: nursultan
            deviceStatus: ACTIVE
            platformId: 75f1547995a142dcb9a3032327e26c47
            swPlatformId: 5e4871fa86d8488fa19ae54e036ac515
            createdDate: 1632494254000
            modifiedDate: 1637323567000
            softwarePlatformName: DOCKER_COMPOSE
        pageNo: 1
        totalPages: 1
        pageSize: 5
        totalCount: 3
    DeviceVO:
      required:
        - data
      type: object
      properties:
        data:
          required:
            - createdDate
            - deviceId
            - deviceName
            - deviceStatus
            - deviceTypeId
            - deviceVersion
            - modifiedDate
            - platformId
            - softwarePlatformName
            - swPlatformId
            - userId
          type: object
          properties:
            userId:
              type: string
            deviceId:
              type: string
            deviceName:
              type: string
            deviceStatus:
              type: string
            platformId:
              type: string
            swPlatformId:
              type: string
              description: This is id corresponding to DockerCompose or Kubernetes.
            createdDate:
              type: number
            modifiedDate:
              type: number
            softwarePlatformName:
              type: string
              description: This was old implementation earlier, it could be dockerCompose or Kubernetes.
            deviceTypeId:
              type: string
              description: The device type refers to https://docs.eu1.edge.siemens.cloud/build_a_device/device_building/development/device_types/devicetypegenerator.html.
            deviceVersion:
              type: string
      description: ""
      example:
        data:
          userId: a39a5a50f510432a8e3bd832d9ec3c39
          deviceId: 06cdac6c607e447dad16eef9f767a56e
          deviceName: mydevice
          deviceStatus: ACTIVE
          platformId: 422a4adf1f18402f9d1c0f353b7ce49d
          swPlatformId: 0a39d22813d84f2c89f86f205400a619
          createdDate: 1616657417000
          modifiedDate: 1617186046000
          softwarePlatformName: DOCKER_COMPOSE
          deviceTypeId: core.ieipc
          deviceVersion: ied-os-1.5.0-15-amd64-develop
    DeviceCreation:
      required:
        - device
      type: object
      properties:
        device:
          required:
            - Device
            - onboarding
          type: object
          properties:
            onboarding:
              description: The device onboarding details.
              required:
                - deviceName
                - localPassword
                - localUserName
              type: object
              properties:
                localUserName:
                  type: string
                  description: The login username for the new Edge Device.
                localPassword:
                  type: string
                  description: The login password for the new Edge Device.
                deviceName:
                  type: string
                  description: The name for the new Edge Device, length should be between 3 and 15.
                deviceTypeId:
                  type: string
                  description: The type id for the new Edge Device. Default values is core.ieipc.
            Device:
              type: object
              properties:
                Network:
                  required:
                    - Interfaces
                  type: object
                  properties:
                    Interfaces:
                      type: array
                      items:
                        required:
                          - DHCP
                          - GatewayInterface
                          - MacAddress
                        type: object
                        properties:
                          MacAddress:
                            type: string
                          GatewayInterface:
                            type: boolean
                          DHCP:
                            type: string
                          Static:
                            required:
                              - Gateway
                              - IPv4
                              - NetMask
                            type: object
                            properties:
                              IPv4:
                                type: string
                              NetMask:
                                type: string
                              Gateway:
                                type: string
                          DNSConfig:
                            required:
                              - PrimaryDNS
                              - SecondaryDNS
                            type: object
                            properties:
                              PrimaryDNS:
                                type: string
                              SecondaryDNS:
                                type: string
                          L2Conf:
                            type: object
                            properties:
                              StartingAddressIPv4:
                                type: string
                              NetMask:
                                type: string
                              Range:
                                type: string
                          isL2NetworkDisable:
                            type: boolean
                          selectedL2Range:
                            type: object
                            properties:
                              id:
                                type: string
                              nameToString:
                                type: string
                dockerIP:
                  type: string
            ntpServer:
              type: array
              items:
                type: object
                properties:
                  ntpServer:
                    type: string
            proxies:
              type: array
              items:
                type: object
                properties:
                  host:
                    type: string
                  protocol:
                    type: string
                  user:
                    type: string
                  password:
                    type: string
                  noProxy:
                    type: string
                  customPorts:
                    type: array
                    items:
                      type: integer
      description: Device Creation object
      example:
        device:
          onboarding:
            localUserName: john.doe@company.com
            localPassword: securepassword
            deviceName: testdevice
          Device:
            Network:
              Interfaces:
                - MacAddress: ff:ff:ff:ff:ff:1f
                  GatewayInterface: true
                  DHCP: enabled
                  Static:
                    IPv4: ""
                    NetMask: ""
                    Gateway: ""
                  DNSConfig:
                    PrimaryDNS: 8.8.8.8
                    SecondaryDNS: 8.8.8.9
                  L2Conf:
                    StartingAddressIPv4: 192.168.178.0
                    NetMask: 255.255.255.0
                    Range: "2"
                  isL2NetworkDisable: true
                  selectedL2Range:
                    id: "2"
                    nameToString: "2"
            dockerIP: 172.17.0.0/16
          ntpServers:
            - ntpServer: 0.de.pool.ntp.org
              preferred: false
            - ntpServer: 1.de.pool.ntp.org
          proxies:
            - host: proxy.org:8081
              protocol: http
              user: myproxyuser
              password: myproxypassword
    Statistics:
      required:
        - data
      type: object
      properties:
        data:
          type: object
          properties: {}
      description: BoxId in response means deviceId, TomcatPort means tomcat port
      example:
        data:
          1638187400000: '{"AppCount":{"ApplicationCount":0.0,"InstalledAppPercentage":0.0,"MaxInstalledApp":20.0,"MaxRunningApp":10.0,"RunningAppPercentage":0.0,"RunningApplicationsCount":0.0},"DeviceId":"06cdac6c607e447dad16eef9f767a56e","InternetStatus":{"serialVersionUID":0.0,"NetworkType":"RelayNR","RouterIP":"","RelayServerID":"192.168.178.122","RelayServerAddress":"192.168.178.122","CurrentConnectedIP":"","CurrentConnectedPort":"","currentConnectedKeystonePort":"","RelayServerUsername":"","RelayServerPassword":"","RelayServerPort":"","RURLAddress":"","isRelaySet":false,"hostName":"","isRURLSet":false,"LanIPAddresses":["192.168.178.123"],"ExternalIPaddress":["mydomain.192.168.178.122:9443","192.168.178.123"],"BoxID":"26e120f7ed994613a21cbc90065efac7","TomcatPort":"32501","RURLTomcatPort":"32501"},"OperationalQualities":{"maxInstalledAppCount":20.0,"maxRunningAppCount":10.0,"maxUsableRamUsage":8192.0,"maxUsableStorageArea":20480.0,"maxCPULoad":100.0},"StorageInfo":{"DataSpaceFree":"25.4
            GB","DataSpacePercentage":"5.92%","DataSpaceTotal":"28.6 GB","DataSpaceUsed":"1.7
            GB"},"SystemInfo":{"CPUInfo":"x86_64","CpuCores":"2","CpuPercentage":"0.00","GetUptime":"0
            days, 0 hours, 0 minutes","KubeAppliance":"false","MemoryFree":"6.4 GB","MemoryPercentage":"4.84","MemoryTotal":"7.8
            GB","MemoryUsed":"385.3 MB"},"devicesCount":0.0,"interface":[{"interfaceName":"ens33","macAddress":"00:0C:29:FF:EE:0D","iPAddress":"192.168.178.123","subNetMask":"255.255.255.0","status":"Enabled","gateway":"192.168.178.1","primaryDns":"192.168.178.1","secondaryDns":"8.8.8.8","hostName":"mydomain","domainName":"mydomain.192.168.178.122:9443","isDHCP":true,"isEnabled":true,"dockerIP":"172.17.0.0/16"}]}'
    DeviceCreated:
      required:
        - Device
        - agents
        - onboarding
        - proxies
      type: object
      properties:
        Device:
          required:
            - Network
            - dockerIP
            - ntpServer
          type: object
          properties:
            Network:
              required:
                - Interfaces
              type: object
              description: The network related info.
              properties:
                Interfaces:
                  minItems: 1
                  uniqueItems: true
                  type: array
                  items:
                    required:
                      - DHCP
                      - GatewayInterface
                      - MacAddress
                    type: object
                    properties:
                      GatewayInterface:
                        type: boolean
                      MacAddress:
                        type: string
                      DHCP:
                        type: string
                      Static:
                        required:
                          - Gateway
                          - IPv4
                          - NetMask
                        type: object
                        properties:
                          IPv4:
                            type: string
                          NetMask:
                            type: string
                          Gateway:
                            type: string
                      DNSConfig:
                        required:
                          - PrimaryDNS
                          - SecondaryDNS
                        type: object
                        properties:
                          PrimaryDNS:
                            type: string
                          SecondaryDNS:
                            type: string
                      L2Conf:
                        required:
                          - NetMask
                          - Range
                          - StartingAddressIPv4
                        type: object
                        properties:
                          StartingAddressIPv4:
                            type: string
                          NetMask:
                            type: string
                          Range:
                            type: string
            ntpServer:
              type: array
              description: The ntp server related info.
              items:
                type: string
            dockerIP:
              type: string
        onboarding:
          required:
            - deviceId
            - deviceName
            - deviceRole
            - deviceType
            - isActivationConfirmed
            - localPassword
            - localUserName
            - nodeId
            - platformActualName
            - platformId
            - potalUrl
            - softwarePlatformName
            - swPlatformId
            - userId
          type: object
          properties:
            localUserName:
              type: string
            localPassword:
              type: string
            deviceName:
              type: string
            deviceId:
              type: string
            platformActualName:
              type: string
              description: This is arch info of device, it could be "x86-64" or "arm64".
            softwarePlatformName:
              type: string
              description: This was old implementation earlier, it could be dockerCompose or Kubernetes.
            potalUrl:
              type: string
              description: This is IEM url where this device is onboarded.
            nodeId:
              type: string
              description: This is internal property in database to support multinode platform.
            userId:
              type: string
            deviceType:
              type: string
              description: This was old implementation earlier, it could be DockerCompose or Kubernetes.
            swPlatformId:
              type: string
              description: This is id corresponding to DockerCompose or Kubernetes.
            platformId:
              type: string
              description: This is id corresponding to DockerCompose or Kubernetes.
            isActivationConfirmed:
              type: boolean
            deviceRole:
              type: string
              description: This is old implementation for master or node.
        agents:
          uniqueItems: true
          type: array
          items:
            required:
              - agentId
              - name
            type: object
            properties:
              name:
                type: string
              proxy:
                type: array
                items:
                  type: object
              agentId:
                type: string
              security:
                required:
                  - baseUrl
                  - ca_chain
                  - clientCredentialProfile
                type: object
                properties:
                  baseUrl:
                    type: string
                  clientCredentialProfile:
                    type: array
                    items:
                      type: string
                  ca_chain:
                    type: string
        proxies:
          uniqueItems: true
          type: array
          items:
            required:
              - host
              - password
              - protocol
              - proxyId
              - user
            type: object
            properties:
              proxyId:
                type: string
              host:
                type: string
              protocol:
                type: string
              user:
                type: string
              password:
                type: string
      description: "The created device info."
      example:
        Device:
          Network:
            Interfaces:
              - GatewayInterface: true
                MacAddress: ff:ff:ff:ff:ff:1f
                DHCP: enabled
                Static:
                  IPv4: ""
                  NetMask: ""
                  Gateway: ""
                DNSConfig:
                  PrimaryDNS: 8.8.8.8
                  SecondaryDNS: 8.8.8.9
                L2Conf:
                  StartingAddressIPv4: 192.168.178.0
                  NetMask: 255.255.255.0
                  Range: "2"
          ntpServer:
            - 0.de.pool.ntp.org iburst
            - 1.de.pool.ntp.org iburst
          dockerIP: 172.17.0.0/16
        onboarding:
          localUserName: ""
          localPassword: ""
          deviceName: test12
          deviceId: 0f6a2ec70e4f45cf87b35013bd8975c1
          platformActualName: x86_64
          softwarePlatformName: dockercompose
          potalUrl: mydomain.org
          nodeId: 865192524d70492d8b8d983ceb2863f9
          userId: a39a5a50f510432a8e3bd832d9ec3c39
          deviceType: DockerCompose
          swPlatformId: 0a39d22813d84f2c89f86f205400a619
          platformId: 422a4adf1f18402f9d1c0f353b7ce49d
          isActivationConfirmed: false
          deviceRole: NODE
        agents:
          - name: portal
            proxy:
              - 0d93f4b47ea7413390a10cdd4887062f
            agentId: a0fbbbb87cea4e0894595291a8334bb1
            security:
              baseUrl: mydomain.org
              clientCredentialProfile:
                - jwt-token
              ca_chain: base64
          - name: registry
            proxy:
              - 0d93f4b47ea7413390a10cdd4887062f
            agentId: ad9eda4a39f0481489d92841bb2e72f9
            security:
              baseUrl: mydomain.org
              clientCredentialProfile:
                - jwt-token
              ca_chain: base64
        proxies:
          - proxyId: 0d93f4b47ea7413390a10cdd4887062f
            host: proxy.org:8081
            protocol: http
            user: myproxyuser
            password: ""
    DeviceLog:
      required:
        - data
      type: object
      properties:
        data:
          type: object
          properties:
            logs:
              type: array
              items:
                required:
                  - logId
                  - timeStamp
                type: object
                properties:
                  timeStamp:
                    type: number
                    description: The timestamp of the log date .
                  logId:
                    type: string
                    description: The log id.
      description: "A list with separated dates(by days) and log id."
      example:
        data:
          logs:
            - logId: 7971f0f9f22f4fdd997c1032a6fb5bb1
              timestamp: 1683252878738
    DeviceLogUrl:
      required:
        - data
      type: object
      properties:
        data:
          type: object
          properties:
            download-url:
              type: string
      description: ""
      example:
        data:
          download-url: https://localhost:443/data/PortalCache/assets/links/1142ec8c83914285aefae5095af25e85/devicelogs_TR_IED_20_20221209082823.tar.gz
    ImportAppJobStatus:
      required:
        - data
      type: object
      properties:
        data:
          required:
            - id
            - status
          type: object
          properties:
            id:
              type: string
              description: The job id.
            status:
              type: string
              description: The job status.
      description: "This is an object describe import application job status."
      example:
        data:
          id: 1142ec8c83914285aefae5095af25e85
          status: COMPLETED
    DeveloperApplication:
      required:
        - data
      type: object
      properties:
        data:
          required:
            - developer-applications
          type: object
          properties:
            developer-applications:
              minItems: 1
              uniqueItems: true
              type: array
              items:
                required:
                  - iconUrl
                  - id
                  - title
                  - userId
                type: object
                properties:
                  id:
                    type: string
                    description: The developer application id.
                  userId:
                    type: string
                    description: The user id.
                  iconUrl:
                    type: string
                    description: The icon url.
                  title:
                    type: string
                    description: The developer application title.
      description: "The developer applications list."
      example:
        data:
          developer-applications:
            - id: 610758a711434e19b1f85de8f8ffb8eb
              userId: 88b0d08729b94a949ad8f4ae1abf60c7
              iconUrl: https://localhost:443/pp/PortalCache/app/610758a711434e19b1f85de8f8ffb8eb/29.png
              title: test
    DeveloperApplicationDetail:
      required:
        - id
        - projectId
        - iconUrl
        - title
        - appStatus
        - appLabels
        - userId
        - description
      properties:
        id:
          type: string
          description: The developer application id.
        userId:
          type: string
          description: The application's owner id.
        projectId:
          type: string
          description: The id of the project which the applicaion belongs to.
        iconUrl:
          type: string
          description: The application's icon url.
        title:
          type: string
          description: The application's title.
        appStatus:
          type: string
          description: The application's status.
          enum:
            - PUBLISHED
            - ACTIVE
            - PENDING
            - SUSPENDED
            - DELETED
            - FAILED
            - BEING_DELETED
        description:
          type: string
          description: The description for this application.
        appLabels:
          minItems: 1
          uniqueItems: true
          type: array
          description: The application labels, used to manage applications and easy to filter application.
          items:
            required:
              - labelId
              - labelName
            type: object
            properties:
              labelId:
                type: string
              labelName:
                type: string
      description: ""
      example:
        id: 4c3d9239c115411e887c9b1f79859778
        userId: 2c6a6bb621604ef684488f04fb96cb9d
        description: test
        projectId: 2c6a6bb621604ef684488f04fb96cb9d
        iconUrl: https://localhost:443/pp/PortalCache/app/4c3d9239c115411e887c9b1f79859778/1.png
        title: test
        appStatus: PUBLISHED
        appLabels:
          - labelId: 9c16a38c6e5b46cda69d0f98ff142d29
            labelName: test
    Version:
      required:
        - data
      type: object
      properties:
        data:
          required:
            - versions
          type: object
          properties:
            versions:
              minItems: 1
              uniqueItems: true
              type: array
              items:
                required:
                  - id
                  - number
                  - status
                type: object
                properties:
                  id:
                    type: string
                    description: The config version id.
                  number:
                    type: string
                    description: The config version number.
                  status:
                    type: string
                    description: The config version status. UPLOADING(0),  Version upload inprogress by developer.  REVIEWPENDING(1),  Reviewed Pending by admin. SUSPENDED(2),   Version suspend by developer. DELETED(3), Delete version by developer. LIVE(4),  Upload successfully version. REVIEWED(5), Reviewed by Admin. OLDRELEASED(6),  when new version upload then set this staus to all old versions. BEING_DELETED(7), when new a version going to delete.
      description: "The developer application version info."
      example:
        data:
          versions:
            - id: PKF5CMDhyFUndKy0TciuWPKpR9ITlkSp
              number: 0.0.1
              status: 5
    DeviceInputJob:
      title: DeviceInputJob
      required:
        - devices
        - operation
      type: object
      properties:
        operation:
          type: string
          description: Operation to be performed on given device.
          enum:
            - systemReboot
            - systemShutdown
        metadata:
          type: string
          description: Any extra information required by device to execute given
            operation. This is of no use to IEM but required at IED to process any particular job.
        schedule:
          type: string
          description: The time in ticks from now to the date you want to trigger the job.
        devices:
          minItems: 1
          type: array
          description: List of Edge Device ids on which operation to be performed.
          items:
            type: string
        delayTime:
          maximum: 60
          minimum: 1
          exclusiveMinimum: false
          type: integer
          description: Optional value ranging between 1-60 in minutes, which represents
            delay interval between operation execution on consecutive devices.This
            is not applicable for operation which are schedule for future time.
      x-stoplight:
        id: ndl6sl07po6b5
      x-examples:
        shutdown-Job:
          operation: systemShutdown
          metadata: string
          schedule: string
          devices:
            - string
          delayTime: 3
        reboot-Job:
          operation: systemReboot
          metadata: string
          schedule: string
          devices:
            - string
          delayTime: 3
    Project:
      required:
        - projects
      type: object
      properties:
        projects:
          minItems: 1
          uniqueItems: true
          type: array
          items:
            required:
              - id
              - name
              - description
              - userId
              - icon
            type: object
            properties:
              id:
                type: string
                description: The unique project ID.
              name:
                type: string
                description: The project name.
              description:
                type: string
                description: The project description.
              userId:
                type: string
                description: The id of the user who created the projcet.
              icon:
                type: string
                description: The icon url of the project.
      description: "A list of projects with current user."
      example:
        projects:
          - id: 2c6a6bb621604ef684488f04fb96cb9d
            description: test
            icon: "https://localhost:443/pp/PortalCache/app/4c3d9239c115411e887c9b1f79859778/1.png"
            name: "test"
            userId: 2c6a6bb621604ef684488f04fb96cb9d
    ProjectCreation:
      type: object
      required:
        - name
        - description
        - companyId
      properties:
        name:
          type: string
          description: the project name, length should between 1 and 50
        description:
          type: string
        companyId:
          type: string
          description: the company id can get from Get /companies api
      description: "The information provided to create a project."
      example:
        name: 'projectName'
        description: 'description'
        companyId: be5de0854507491c955d2a7d0a614d76
    ProjectCreated:
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        userId:
          type: string
        companyId:
          type: string
      description: "The response result when successfully created a project."
      example:
        id: 75d217804e1f40bc8309e302d52c8b19
        name: 'projectName'
        description: 'description'
        userId: b574c20057654cf9859c989f4ee694ac
        companyId: be5de0854507491c955d2a7d0a614d76
    ProjectApplication:
      required:
        - applications
      type: object
      properties:
        applications:
          minItems: 1
          uniqueItems: true
          type: array
          items:
            required:
              - iconUrl
              - id
              - title
              - userId
            type: object
            properties:
              id:
                type: string
                description: The developer application id.
              userId:
                type: string
                description: The user id.
              iconUrl:
                type: string
                description: The icon url.
              title:
                type: string
                description: The developer application title.
      description: "The developer applications list."
      example:
        applications:
          - id: 610758a711434e19b1f85de8f8ffb8eb
            userId: 88b0d08729b94a949ad8f4ae1abf60c7
            iconUrl: https://localhost:443/pp/PortalCache/app/610758a711434e19b1f85de8f8ffb8eb/29.png
            title: test
    CompanyCreation:
      type: object
      required:
        - name
        - address
        - city
        - state
        - country
        - postalCode
        - webAddress
        - phone
        - email
      properties:
        name:
          type: string
          description: the company name, length should between 1 and 50
        address:
          type: string
          description: the company address, length should between 1 and 100
        city:
          type: string
          description: the company city, length should between 1 and 25
        state:
          type: string
          description: the company state, length should between 1 and 50
        country:
          type: string
          description: the company country, length should between 1 and 50
        postalCode:
          type: string
          description: the company postalcode, length should between 1 and 32
        webAddress:
          type: string
          description: the company webaddress, should follow web address pattern
        phone:
          type: string
          description: the company phone, should follow phone number pattern
        email:
          type: string
          description: the company email, should follow email pattern
      description: "The information needed to create a company."
      example:
        name: SEWC
        address: China
        city: Chengdu
        state: Sichuan
        country: CN
        postalCode: '111000'
        webAddress: https://Siemens.com
        phone: +86 12345678911
        email: somebody@Siemens.com
    Company:
      properties:
        companyId:
          type: string
          description: the company unique id
        userId:
          type: string
          description: user id
        name:
          type: string
          description: the company name
        address:
          type: string
          description: the company address
        city:
          type: string
          description: city name where company located in
        state:
          type: string
          description: state name where company located in
        country:
          type: string
          description: country name where company located in
        postalCode:
          type: string
          description: postalcode
        webAddress:
          type: string
          description: web address
        phone:
          type: string
          description: phone number
        email:
          type: string
          description: email address
      description: "The company Information."
      example:
        companyId: be5de0854507491c955d2a7d0a614d76
        userId: b574c20057654cf9859c989f4ee694ac
        name: SEWC
        address: China
        city: Chengdu
        state: Sichuan
        country: CN
        postalCode: '111000'
        webAddress: https://Siemens.com
        phone: +86 12345678911
        email: somebody@Siemens.com
    Companies:
      required:
        - companies
      type: object
      properties:
        companies:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/Company'
  responses:
    ServerInternalErrorV2:
      description: |-
        Something went wrong... can not perform requested operation.
        - something.wrong
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseV2'
          examples:
            something.wrong:
              $ref: '#/components/examples/something.wrong.v2'
    ServerInternalError:
      description: |-
        Something went wrong... can not perform requested operation.
        - something.wrong
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            something.wrong:
              $ref: '#/components/examples/something.wrong'
    UnAuthorizationErrorV2:
      description: |-
        Please provide a valid authorization header
        - auth.missingAuthToken
        - auth.tokenExpired
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseV2'
          examples:
            auth.missingAuthToken:
              $ref: '#/components/examples/auth.missingAuthToken.v2'
            auth.tokenExpired:
              $ref: '#/components/examples/auth.tokenExpired.v2'
    UnAuthorizationError:
      description: |-
        Please provide a valid authorization header
        - auth.missingAuthToken
        - auth.tokenExpired
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            auth.missingAuthToken:
              $ref: '#/components/examples/auth.missingAuthToken'
            auth.tokenExpired:
              $ref: '#/components/examples/auth.tokenExpired'
    ForbiddenErrorV2:
      description: |-
        - auth.unauthorizedToken
        - auth.accessDenied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseV2'
          examples:
            auth.accessDenied:
              $ref: '#/components/examples/auth.accessDenied.v2'
            auth.unauthorizedToken:
              $ref: '#/components/examples/auth.unauthorizedToken.v2'
    ForbiddenError:
      description: |-
        - auth.unauthorizedToken
        - auth.accessDenied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            auth.accessDenied:
              $ref: '#/components/examples/auth.accessDenied'
            auth.unauthorizedToken:
              $ref: '#/components/examples/auth.unauthorizedToken'
  examples:
    auth.accessDenied.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 403
            error: auth.accessDenied
            message: no permission access error
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    auth.accessDenied:
      value:
        errors:
          - errorCode: 403
            code: auth.accessDenied
            message: no permission access error
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    auth.unauthorizedToken.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 403
            error: auth.unauthorizedToken
            message: Unauthorized token.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    auth.unauthorizedToken:
      value:
        errors:
          - errorCode: 403
            code: auth.unauthorizedToken
            message: Unauthorized token.
            field: "authorization"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: "872e1b1c-bf54-4951-8aa2-850c927d0b77"
    notFound.device.id:
      value:
        errors:
          - errorCode: 400
            code: notFound.device
            message: device not found.
            field: "deviceId"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    notFound.device:
      value:
        errors:
          - errorCode: 404
            code: notFound.device
            message: device not found.
            field: "deviceId"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    notFound.file:
      value:
        errors:
          - errorCode: 404
            code: notFound.file
            message: Requested file not found.
            field: "TempFile"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    empty.userId:
      value:
        errors:
          - errorCode: 404
            code: empty.userId
            message: user id not found
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    notFound.user:
      value:
        errors:
          - errorCode: 404
            code: notFound.user
            message: User not found.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    notFound.user.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 404
            error: notFound.user
            message: User not found.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    notFound.appDetail:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 400
            error: notFound.appDetail
            message: Application detail not found.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    notFound.batch:
      value:
        errors:
          - errorCode: 404
            code: notFound.batch
            message: batch not found.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    notFound.event:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 400
            error: notFound.event
            message: Application events not found.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    project.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: project.notNull
            message: The project info can not be null
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    projectName.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: projectName.notNull
            message: The project name can not be null and the length should be between 1 to 50
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    description.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: description.invalid
            message: The description should not be null
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    companyId.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: companyId.notNull
            message: The company id should not be null
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    notFound.company:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 400
            error: notFound.company
            message: company not found
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.edgeeye:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 400
            error: invalid.edgeeye
            message: edgeeye service is not available in cluster
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    notFound.job:
      value:
        errors:
          - errorCode: 404
            code: notFound.job
            message: job not found
            field: "jobVO"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    notFound.application:
      value:
        errors:
          - errorCode: 404
            code: notFound.application
            message: Application not found.
            field: "application"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    notFound.application.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 404
            error: notFound.application
            message: Application not found.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    notFound.project:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 400
            error: notFound.project
            message: Project not found.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.device.id:
      value:
        errors:
          - code: invalid.device.id
            message: Invalid device id.
            errorCode: 400
            field: ""
            logref: 98290e54-a84c-42ff-ac78-f80cb890e4cc
            innerError: ""
    notFound.logFile:
      value:
        errors:
          - errorCode: 404
            code: notFound.logFile
            message: No log files found.
            field: "logId"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    notFound.appconfig:
      value:
        errors:
          - errorCode: 404
            code: notFound.Appconfig
            message: App config not found.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    auth.missingAuthToken.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 401
            error: auth.missingAuthToken
            message: Please provide a valid authorization header - Missing authorization token.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    auth.missingAuthToken:
      value:
        errors:
          - errorCode: 401
            code: auth.missingAuthToken
            message: Please provide a valid authorization header - Missing authorization token.
            field: "token"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    auth.tokenExpired.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 401
            error: auth.tokenExpired
            message: token is expired
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    restricted.deleteCompany.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 405
            error: restricted.deleteCompany
            message: Company can not be deleted.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    auth.tokenExpired:
      value:
        errors:
          - errorCode: 401
            code: auth.tokenExpired
            message: token is expired
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.data:
      value:
        errors:
          - errorCode: 400
            code: invalid.data
            message: Invalid data
            field: ""
            logref: ac0f03ee-0b26-4ea9-abdb-854691cac56c
    invalid.job.id:
      value:
        errors:
          - errorCode: 400
            code: invalid.job.id
            message: invalid.job.id
            field: ""
            logref: ac0f03ee-0b26-4ea9-abdb-854691cac56c
            innerError: ""
    invalid.email:
      value:
        errors:
          - errorCode: 400
            code: invalid.email
            message: Invalid email
            field: "Email id"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    invalid.device.type.id:
      value:
        errors:
          - errorCode: 400
            code: invalid.device.type.id
            message: Edge Device type must be 1-36 characters long and alphanumeric characters.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.macaddress:
      value:
        errors:
          - errorCode: 400
            code: invalid.macaddress
            message: Invalid MAC Address - format should be xx:xx:xx:xx:xx:xx
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    duplicate.macaddress:
      value:
        errors:
          - errorCode: 400
            code: duplicate.macaddress
            message: Duplicate MAC Address not allowed.
            field: "macAddres"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    limit.gatewayInterface:
      value:
        errors:
          - errorCode: 400
            code: limit.gatewayInterface
            message: Exactly one gateway interface is required.
            field: "gatewayinterface"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    required.IP:
      value:
        errors:
          - errorCode: 400
            code: required.IP
            message: As DHCP is disabled so static values for IPV4, netMask, Gateway are required.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.ip:
      value:
        errors:
          - errorCode: 400
            code: invalid.ip
            message: IP address is incorrect.
            field: "dockerIP"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    invalid.netmask:
      value:
        errors:
          - errorCode: 400
            code: invalid.netmask
            message: Invalid netmask.
            field: "netmask"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    invalid.ntpServer:
      value:
        errors:
          - errorCode: 400
            code: invalid.ntpServer
            message: Invalid NTP server only domain name or IP allowed.
            field: "ntpServer"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    invalid.id:
      value:
        errors:
          - errorCode: 400
            code: invalid.id
            message: Invalid id.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    invalid.application.id:
      value:
        errors:
          - errorCode: 400
            code: invalid.application.id
            message: Invalid application id.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    appId.notnull:
      value:
        errors:
          - errorCode: 400
            code: appId.notnull
            message: Application id can not be null or empty
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    appId.notnull.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 400
            error: appId.notnull
            message: Application id can not be null or empty
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    notFound.appVersion:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 400
            error: notFound.appVersion
            message: App version not found.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    deviceId.notnull:
      value:
        errors:
          - errorCode: 400
            code: deviceId.notnull
            message: The Edge Device ID can not be null or empty
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    deviceId.notnull.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 400
            error: deviceId.notnull
            message: The Edge Device ID can not be null or empty
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    operation.invalid:
      value:
        errors:
          - errorCode: 400
            code: operation.invalid
            message: Invalid operation
            field: "ActivityOperation"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    time.invalid:
      value:
        errors:
          - errorCode: 400
            code: time.invalid
            message: Invalid time
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.delay.time:
      value:
        errors:
          - errorCode: 400
            code: invalid.delay.time
            message: Job with both delay time and schedule later not applicable.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.delay.time.interval:
      value:
        errors:
          - errorCode: 400
            code: invalid.delay.time.interval
            message: Job delay time should be between 1-60 minute
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    operation.notAllowed:
      value:
        errors:
          - errorCode: 400
            code: operation.notAllowed
            message: not allowed
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.fileName:
      value:
        errors:
          - errorCode: 400
            code: invalid.fileName
            message: Invalid filename
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: "872e1b1c-bf54-4951-8aa2-850c927d0b77"
    file.size.exceeded:
      value:
        errors:
          - errorCode: 400
            code: file.size.exceeded
            message: file size exceeded
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref:
    invalid.config:
      value:
        errors:
          - errorCode: 400
            code: invalid.config
            message: Either config name or key is invalid
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    required.config:
      value:
        errors:
          - errorCode: 400
            code: required.config
            message: Configuration cannot be empty
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    required.hostname:
      value:
        errors:
          - errorCode: 400
            code: required.hostname
            message: Host is required
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    proxy.invalid:
      value:
        errors:
          - errorCode: 400
            code: proxy.invalid
            message: Invalid proxy value provided.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    no.proxy.invalid:
      value:
        errors:
          - errorCode: 400
            code: no.proxy.invalid
            message: Invalid no-proxy value provided.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    invalid.l2.ip:
      value:
        errors:
          - errorCode: 400
            code: invalid.l2.ip
            message: Layer 2 for Apps/Start IP Address and Static/IPv4 entered IP must be different.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    invalid.ip.range:
      value:
        errors:
          - errorCode: 400
            code: invalid.ip.range
            message: Invalid ip range.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.auxiliary.ip:
      value:
        errors:
          - errorCode: 400
            code: invalid.auxiliary.ip
            message: Invalid Auxiliary Addresses.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    limit.auxiliary.ip:
      value:
        errors:
          - errorCode: 400
            code: limit.auxiliary.ip
            message: Entire range can not be used for auxiliary ip.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    device.network.limit:
      value:
        errors:
          - errorCode: 400
            code: device.network.limit
            message: Only one layer two network is allowed.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    usable.ip.unavailable:
      value:
        errors:
          - errorCode: 400
            code: usable.ip.unavailable
            message: The selected range results in 0 usable addresses, please choose a different range.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.docker.ip:
      value:
        errors:
          - errorCode: 400
            code: invalid.docker.ip
            message: Docker's default network range must not conflict with any other network ranges on device LAN network.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    deviceName.unavailable:
      value:
        errors:
          - errorCode: 400
            code: deviceName.unavailable
            message: Device name not available.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    notFound.appliance:
      value:
        errors:
          - errorCode: 400
            code: notFound.appliance
            message: Requested Edge Device not found.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    storage.space.unavailable:
      value:
        errors:
          - errorCode: 500
            code: storage.space.unavailable
            message: storage space is unavailable
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.deviceId:
      value:
        errors:
          - errorCode: 400
            code: invalid.deviceId
            message: Edge Device ID must be 3-32 characters long and must contain only alphanumeric characters
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    InvalidLogId:
      value:
        errors:
          - errorCode: 400
            code: invalid.log.id
            message: Invalid log id
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    platform.not.supported:
      value:
        errors:
          - errorCode: 500
            code: platform.not.supported
            message: platform not supportted
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    alreadyExists.macaddress:
      value:
        errors:
          - errorCode: 409
            code: alreadyExists.macaddress
            message: Edge Device with same mac-address already exists.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    alreadyExists.company:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 409
            error: "alreadyExists.company"
            message: Company with the same name already exists.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    companyInfo.notNull:
      value:
        errors:
          - errorCode: 400
            code: companyInfo.notNull
            message: Company info request body can not be null.
            field: ""
            logref: d9e42e76-7f84-4ffb-b58f-3c7bed2414ec
            innerError: ""
    companyName.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: name.notNull
            message: Name can not be null.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    companyName.length.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.name.length
            message: The length of company name should be between 1 to 50.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    companyAddress.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: address.notNull
            message: Address can not be null.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    companyAddress.length.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.address.length
            message: The length of company address should be between 1 to 100.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    city.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: city.notNull
            message: City can not be null.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    city.length.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.city.length
            message: The length of city should be between 1 to 50.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    state.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: state.notNull
            message: State can not be null.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    state.length.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.state.length
            message: The length of state should be between 1 to 50.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    country.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: country.notNull
            message: Country can not be null
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    country.length.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.country.length
            message: The length of country should be between 1 to 50
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    postalCode.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: postalCode.notNull
            message: Postal code can not be null
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    postalCode.length.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.postalCode.length
            message: The length of postal code should be between 1 to 32
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    webAddress.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.webaddress.invalid
            message: Invalid web address
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    webAddress.length.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: ApplicationVO.webaddress.length
            message: The length of web address should be between 1 to 100
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    phone.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: phone.notNull
            message: Phone can not be null
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    phone.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.phone.invalid
            message: Invalid phone no, must follow phone number pattern
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    phone.length.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.phone.length
            message: The length of phone no should be between 1 to 10
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    email.notNull:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: email.notNull
            message: Email can not be null
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    email.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.email.invalid
            message: Invalid email, must follow email number pattern
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    email.length.invalid:
      value:
        errors:
          - errorCode: 400
            field: ""
            code: CompanyInfoVO.email.length
            message: The length of email should be between 1 to 10
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            innerError: ""
    something.wrong.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 500
            error: something.wrong
            message: Something went wrong... can not perform requested operation.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    something.wrong:
      value:
        errors:
          - errorCode: 500
            code: something.wrong
            message: Something went wrong... can not perform requested operation.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
  securitySchemes:
    ApiKey:
      type: apiKey
      name: Authorization
      in: header
