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."
  version: 2.0.2
  contact:
    name: Siemens Industrial Edge
servers:
  - url: https://{host}
    description: Endpoint reachable from outside the cluster.
    variables:
      host:
        default: iem.example.com
  - url: http://gateway-internal.{namespace}.svc.cluster.local:80
    description: gateway-internal.{namespace}.svc.cluster.local:80 is accessible starting with Version 2.0.
    variables:
      namespace:
        default: iem
  - url: http://edge-manager.{namespace}.svc.cluster.local:8080/ems/api/v1
    description: Legacy API endpoint for device management, accessible now but will be deprecated. Ignore the paths /portal/ below below.
    variables:
      namespace:
        default: iem
  - url: http://portal-service.{namespace}.svc.cluster.local:8080/p.service
    description: Legacy API endpoint for device management, accessible now but will be deprecated. The path /p.service need to be prefixed.
    variables:
      namespace:
        default: iem
tags:
  - name: tokens
  - name: devices
  - name: device-statistics
  - name: app-statistics
  - name: device-logs
  - name: device-applications
  - name: app-installation
  - name: application-import-jobs
  - name: device-applications-configs
  - name: diagnosis
security:
  - ApiKey: []
paths:
  /portal/api/v2/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
      parameters:
        - name: appSource
          in: query
          description: type of application we want to upload
          required: false
          schema:
            type: string
            default: others
            enum:
              - others
              - self-developed
      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"
  /portal/api/v1/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"
  /portal/api/v1/devices/{id}/statistics:
    get:
      tags:
        - device-statistics
      summary: Get statistics for a Edge Device
      description: This endpoint returns statistics for a specific device. The structure of the `statistics` object in the response may vary depending on the device version. The example provided is just one possible structure. Consumers of this API should be prepared to handle different structures in the `statistics` object.
      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"
  /portal/api/v2/devices:
    get:
      operationId: get-devices
      description: This method retrieves a comprehensive list of Edge Devices with support for sorting, filtering, and pagination. Use filter parameters to query devices by status, type, or other attributes, and sort parameters to order results by specific fields.
      summary: List Edge Devices with filtering, sorting and pagination
      tags:
        - "devices"
      parameters:
        - $ref: "#/components/parameters/deviceFilter"
        - $ref: "#/components/parameters/deviceSorting"
        - $ref: "#/components/parameters/pageNumber"
        - $ref: "#/components/parameters/pageSize"
      responses:
        "200":
          $ref: "#/components/responses/deviceList"
        "400":
          $ref: "#/components/responses/deviceListInvalidInput"
        "401":
          $ref: "#/components/responses/errorUnauthenticated"
        "500":
          $ref: "#/components/responses/genericError"
  /portal/api/v1/devices:
    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: create-device
      requestBody:
        description: The device configuration object including device type, network settings, credentials, and onboarding parameters required to create and register an Edge Device on IEM.
        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
            - host.invalid
            - invalid.l2.ip
            - device.network.limit
            - invalid.ip.range
            - invalid.auxiliary.ip
            - limit.auxiliary.ip
            - usable.ip.unavailable
            - invalid.docker.ip
            - deviceName.unavailable
            - invalid.password.format
            - invalid.password.spaces
            - invalid.expiration.time
            - invalid.device.name
          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"
                host.invalid:
                  $ref: "#/components/examples/host.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"
                invalid.password.format:
                  $ref: "#/components/examples/invalid.password.format"
                invalid.expiration.time:
                  $ref: "#/components/examples/invalid.expiration.time"
                invalid.password.spaces:
                  $ref: "#/components/examples/invalid.password.spaces"
                invalid.device.name:
                  $ref: "#/components/examples/invalid.device.name"
        "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
  /portal/api/v2/devices/{device-id}:
    get:
      operationId: get-device-details
      description: Retrieve device's details
      x-internal: true
      summary: Get Device Details
      tags:
        - "devices"
      parameters:
        - $ref: "#/components/parameters/deviceId"
      responses:
        "200":
          $ref: "#/components/responses/device"
        "401":
          $ref: "#/components/responses/errorUnauthenticated"
        "404":
          $ref: "#/components/responses/deviceNotFound"
        "500":
          $ref: "#/components/responses/genericError"
    delete:
      operationId: delete-device-details
      description: Delete device and its related resources
      x-internal: true
      summary: Deletes a Device
      tags:
        - "devices"
      parameters:
        - $ref: "#/components/parameters/deviceId"
      responses:
        "204":
          description: "Successfully deleted device"
        "401":
          $ref: "#/components/responses/errorUnauthenticated"
        "403":
          $ref: "#/components/responses/errorForbidden"
        "404":
          $ref: "#/components/responses/deviceNotFound"
        "500":
          $ref: "#/components/responses/genericError"
  /portal/api/v1/devices/{id}/logs:
    get:
      tags:
        - device-logs
      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"
  /portal/api/v1/devices/{id}/logs/{logId}:
    get:
      tags:
        - device-logs
      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"
  /portal/api/v1/devices/{id}/installed-apps/{app-id}/statistics:
    get:
      tags:
        - app-statistics
      summary: List Edge Device's application statistics
      description:
        This method lists statistics for a specific application installed
        on an Edge Device.
      operationId: get-device-application-statistics
      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"
        "404":
          description: |-
            - notFound.event
            - notFound.appDetail
            - notFound.user
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/ErrorResponseV2"
                  - $ref: "#/components/schemas/ErrorResponse"
              examples:
                notFound.event:
                  $ref: "#/components/examples/notFound.event"
                notFound.appDetail:
                  $ref: "#/components/examples/notFound.appDetail"
                notFound.user:
                  $ref: "#/components/examples/notFound.user.v2"
        "400":
          description: |-
            - invalid.id
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/ErrorResponseV2"
                  - $ref: "#/components/schemas/ErrorResponse"
              examples:
                invalid.id:
                  $ref: "#/components/examples/invalid.id"
        "401":
          $ref: "#/components/responses/UnAuthorizationErrorV2"
        "403":
          $ref: "#/components/responses/ForbiddenErrorV2"
        "500":
          $ref: "#/components/responses/ServerInternalErrorV2"
  /portal/api/v1/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
  /portal/api/v1/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"
  /portal/api/v2/device-applications/{id}/configs:
    get:
      tags:
        - device-applications-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"
  /portal/api/v2/device-applications/{id}/configs/{configId}/template/{templateId}:
    get:
      tags:
        - device-applications-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"
  /portal/api/v1/installjobs/{id}:
    get:
      tags:
        - app-installation
      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"
  /portal/api/v1/installjobs:
    put:
      tags:
        - app-installation
      summary:
        Perform action(Retry, Rollback, RetryResubmit or RollbackResubmit)
        on job ids
      description:
        This method performs intended 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:
        - app-installation
      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
  /portal/api/v1/batches:
    post:
      tags:
        - app-installation
      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 unique upload id of the  file\
                    \ \n  \n **Example value:**\n  ```\n  {\n    \"devices\"\
                    :  [\n      \"device-id\"\n    ],\n    \"delayTime\":delay-time,\n \
                    \   \"configs\": [\n      {\n        \"configId\": \"first-config-id\"\
                    ,\n        \"templateId\"\
                    : \"first-template-id\"\n      }\n    {\n        \"configId\": \"second-config-id\"\
                    ,\n        \"templateId\"\
                    : \"second-template-id\",\n        \"editedTemplateText\": \"edited-template-text\"\n      }\n   {\n        \"configId\": \"third-config-id\"\
                    ,\n        \"versionId\": \"config-version-id\"\n      }\n   {\n        \"configId\": \"fourth-config-id\"\
                    ,\n \
                    \       \"fileId\": \"unique-file-id\"\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"
  /portal/api/v1/batches/device-jobs:
    post:
      tags:
        - app-installation
      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 information 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:
              $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
  /portal/api/v1/batches/{batchId}:
    get:
      tags:
        - app-installation
      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"
  /portal/api/v1/batches/{id}/jobs:
    get:
      tags:
        - app-installation
      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"
  /portal/api/v2/device-applications:
    get:
      operationId: device-applications-list
      description: This API returns a filtered list of Device Applications
      summary: List Device Applications with Filter
      tags:
        - "device-applications"
      parameters:
        - $ref: "#/components/parameters/deviceAppFilter"
        - $ref: "#/components/parameters/deviceAppSorting"
      responses:
        "200":
          $ref: "#/components/responses/deviceAppListSuccess"
        "400":
          $ref: "#/components/responses/deviceAppListInvalidContent"
        "401":
          $ref: "#/components/responses/errorUnauthenticated"
        "403":
          $ref: "#/components/responses/errorUnauthourized"
        "500":
          $ref: "#/components/responses/genericError"
  /portal/api/v2/device-applications/{applicationId}:
    get:
      operationId: device-applications-get
      description: This API returns the details of a Device Application based on the application ID.
      summary: Get Device Application Details
      tags:
        - "device-applications"
      parameters:
        - $ref: "#/components/parameters/applicationId"
      responses:
        "200":
          $ref: "#/components/responses/deviceAppDetailSuccess"
        "401":
          $ref: "#/components/responses/errorUnauthenticated"
        "403":
          $ref: "#/components/responses/errorUnauthourized"
        "404":
          $ref: "#/components/responses/errorAppNotFound"
        "500":
          $ref: "#/components/responses/genericError"
  /portal/api/v2/device-applications/{id}/versions/{versionid}/validate:
    get:
      tags:
        - device-applications
      summary: Validates application against pre defined rule set to list warning and blocker if any.
      description: This method validates application against pre defined rule set to list warning and blocker if any.
      operationId: device-application-validate
      parameters:
        - name: Authorization
          in: header
          description: The authentication token
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: UUID of the applications
          required: true
          schema:
            type: string
        - name: versionid
          in: path
          description: The unique version ID of the applications
          required: true
          schema:
            type: string
        - name: deviceId
          in: query
          description: The unique device ID
          schema:
            type: string
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccessPolicy"
        "400":
          description: |-
            - notFound.application
            - notFound.device
            - notFound.appVersion
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponseV2"
              examples:
                notFound.application:
                  $ref: "#/components/examples/notFound.application.v2"
                notFound.device:
                  $ref: "#/components/examples/notFound.device.v2"
                notFound.appVersion:
                  $ref: "#/components/examples/notFound.appVersion.v2"
        "401":
          description: |-
            - 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"
        "403":
          description: |-
            - auth.unauthorizedToken
            - auth.accessDenied
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponseV2"
              examples:
                auth.unauthorizedToken:
                  $ref: "#/components/examples/auth.unauthorizedToken.v2"
                auth.accessDenied:
                  $ref: "#/components/examples/auth.accessDenied.v2"
        "405":
          description: |-
            - platform.mismatch
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponseV2"
              examples:
                platform.mismatch:
                  $ref: "#/components/examples/platform.mismatch"
        "500":
          description: |-
            - something.wrong
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponseV2"
              examples:
                something.wrong:
                  $ref: "#/components/examples/something.wrong.v2"
  /portal/api/v2/diagnosis:
    get:
      tags:
        - diagnosis
      summary: Download pod logs in tar.gz format
      description: This method download a tar.gz file which contains all pods logs in same namespace.
      operationId: download-pod-logs
      responses:
        "200":
          $ref: "#/components/responses/downloadPodLogsSuccess"
        "401":
          description: Missing Auth Token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponseLogs"
              examples:
                missingAuthToken:
                  $ref: "#/components/examples/auth.missingAuthToken.logs"
        "403":
          description: Unauthorized Token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponseLogs"
              examples:
                unauthorizedToken:
                  $ref: "#/components/examples/auth.unauthorizedToken.logs"
        "500":
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponseLogs"
              examples:
                somethingWrong:
                  $ref: "#/components/examples/something.wrong.logs"
components:
  parameters:
    deviceAppFilter:
      name: filter
      in: query
      required: false
      schema:
        type: string
      description: |-
        Filter query parameter that can be used by API clients to provide a resource query expression to filter results.
        The API client specifies the selection of resources in the following format.
        <br>
        _[GET] /device-applications?filter=\<expression\>_
        <br>
        The \<expression\> <b>MUST</b> contain the query and is on the right-hand side of the equal sign.
        The \<expression\> specifies the logical filtering operation on a field in the resource that is being read.
        <br>
        <b>Supported filter keys</b>
        <li>name (operator 'contains')</li>
        <li>appSource (operator 'eq', value 'self-developed')</li>
        <br>
        e.g.<br>
        <li>Plain: /device-applications?filter=name contains 'Databus' and appSource eq 'self-developed'</li>
        <li>URL Encoded: /device-applications?filter=name%20contains%20%27Databus%27%20and%20appSource%20eq%20%27self-developed%27</li>
    deviceAppSorting:
      name: sort
      in: query
      required: false
      schema:
        type: string
      description: |-
        Sort query parameter that can be used by API clients to provide a resource query expression to sort results.
        <br>
        The API client specifies the selection of resources in the following format:
        <br>
        <i>[GET] /device-applications?sort=&lt;expression&gt;</i>
        <br><br>
        The &lt;expression&gt; <b>MUST</b> contain the query and is on the right-hand side of the equal sign.
        <br>
        The &lt;expression&gt; specifies the logical sorting operation on a field in the resource that is being read.
        <br><br>
        <b>Supported sort keys:</b>
        <li>name</li>
        <br>
        <b>Supported sort operators:</b>
        <li>sort=&lt;key&gt; (ascending)</li>
        <li>sort=+&lt;key&gt; (ascending)</li>
        <li>sort=-&lt;key&gt; (descending)</li>
        <br>
        <b>Example:</b>
        <li>/device-applications?sort=-name</li>
    applicationId:
      schema:
        type: string
      name: applicationId
      required: true
      in: path
      description: Unique id of the application to retrieve
    deviceFilter:
      name: filter
      in: query
      schema:
        type: string
        example: status%20eq%20%27Online%27%20and%20typeId%20eq%27core.ieipc%27
      style: spaceDelimited
      explode: false
      description: |
        URL-encoded list of fields that filter the result.

        The filter values must be wrapped in double quotes (`"`), and may contain the following expressions:

        - `typeId eq 'value'`
        - `architecture eq 'value'`
        - `name contains 'value'`
        - `status eq 'Offline'`, `'Online'`, `'withoutapps'`, or `'notonboarded'`
        - `label contains 'value'`
        - `hasRemoteAccess eq true` or `false`

        **Example**

        For filtering `status == 'value1' and typeId == 'value2'`, the filter parameter should contain the URL-encoded value of:

        - Plain:  
          `"status eq 'value1' and typeId eq 'value2' and label contains 'value3'"`
        - URL-encoded:  
          `"status%20eq%20%27value1%27%20and%20typeId%20eq%20%27value2%27%20and%20label%20contains%20%27value3%27"`

        **Supported filter fields:**  
        `name`, `status`, `architecture`, `typeId`, `label`, `hasRemoteAccess`

        **Note:**  
        Single quotes inside values must be escaped with a backslash (`\'`).  
        The escape character is removed in the parsed value (e.g., `John\'s device` becomes `John's device`).
      required: false
    deviceId:
      schema:
        type: string
      in: path
      name: device-id
      description: The unique device Id
      required: true
    deviceSorting:
      schema:
        type: array
        minItems: 1
        items:
          type: string
          enum:
            [
              id,
              +id,
              -id,
              name,
              +name,
              -name,
              status,
              +status,
              -status,
              architecture,
              +architecture,
              -architecture,
              onboarded,
              +onboarded,
              -onboarded,
              typeId,
              +typeId,
              -typeId,
            ]
      in: query
      name: sort
      description: |
        List of fields that order the result.
        For sorting based on status, since there are three possible statuses and only two possible direction of sorting, please use the following table to obtain the desired sorting by status.

        | Desired status order              | Input to the sorting field     |
        | ----------------------------------| -------------------------------|
        | NotOnboarded, Online, Offline     | sort=onboarded,-status         |
        | NotOnboarded, Offline, Online     | sort=onboarded,status          |
        | Online, Offline, NotOnboarded     | sort=-status,-onboarded        |
        | Offline, Online, NotOnboarded     | sort=-onboarded,status         |
        | Online, NotOnboarded, Offline     | sort=-status,onboarded         |
        | Offline, NotOnboarded, Online     | sort=status,-onboarded         |
      required: false
    pageNumber:
      in: query
      name: page
      description: Page number
      required: false
      schema:
        type: integer
        default: 1
    pageSize:
      in: query
      name: size
      description: Page size
      required: false
      schema:
        type: integer
        default: 10
  schemas:
    DeviceApplicationDetails:
      type: object
      properties:
        title:
          type: string
          description: The title of the application
          example: "Edgecalibur Test Application"
        applicationId:
          type: string
          example: as7g32asd48as325d48as65a84a6s5d77gv4
        repoName:
          type: string
          example: "edgecalibur-test-app"
        icon:
          type: string
          example: https://localhost:443/pp/PortalCache/app/78e8d7e2fd624d7fa9c90a6dbca42c1d/appicon.png
        appSource:
          type: string
          enum:
            - others
            - self-developed
        description:
          type: string
          example: "IESS testing app - can do magic things"
        publicVersion:
          type: string
          example: 1.0.0
        externalConfigurator:
          type: boolean
          example: false
        externalUrl:
          type: string
          example: "/acs"
        versions:
          type: array
          items:
            $ref: "#/components/schemas/DeviceApplicationVersionDetails"
        canShare:
          type: boolean
          example: false
        developedWith:
          type: string
          description: developedWith mendix or other
    DeviceApplicationVersionDetails:
      type: object
      properties:
        versionId:
          type: string
          example: "a658sd74g35s4dr6a3sd4s3g4s65d4f3a4da"
        version:
          type: string
          example: "1.3.4"
        releaseNotes:
          type: string
          example: "This is a test app used to test IE State Service"
        images:
          type: array
          items:
            type: object
            properties:
              image:
                type: string
                example: "app-volumes-nginx"
              digest:
                type: string
                example: "sha256:5fd924625f6ab16a19cc9807c7c506ae1813490e4ba675f843d5a10e0baacdb8"
        architecture:
          type: string
          example: "amd64"
        issuer:
          type: string
          example: "L\u003dBengaluru, ST\u003dAsia Pacific, C\u003dIN, OU\u003dDI FA CTR OEC IE, O\u003dsystest-br, CN\u003dsystest-br"
        creationDate:
          type: string
          example: "2020-01-01T00:00:00Z"
        status:
          type: string
          enum:
            - UPLOADING
            - REVIEWPENDING
            - SUSPENDED
            - DELETED
            - LIVE
            - REVIEWED
            - OLDRELEASED
            - BEING_DELETED
        canShare:
          type: boolean
          example: false
    installedApplicationListDetailed:
      type: object
      properties:
        installedApplications:
          type: array
          items:
            allOf:
              - $ref: "#/components/schemas/installedApplicationLimited"
              - $ref: "#/components/schemas/installedApplicationAdditionalInfo"
    installedApplicationAdditionalInfo:
      type: object
      properties:
        size:
          type: integer
          description: Size is in KB
          example: 660649984
        version:
          type: string
          example: 1.11.0-2
        versionId:
          type: string
          example: a658sd74g35s4dr6a3sd4s3g4s65d4f3a4da
    pageMetadata:
      type: object
      properties:
        page:
          type: object
          properties:
            number:
              type: integer
              example: 1
            size:
              type: integer
              example: 10
            totalElements:
              type: integer
              example: 15
            totalPages:
              type: integer
              example: 2
            elements:
              type: integer
              example: 10
    deviceCapability:
      type: object
      properties:
        capabilityID:
          type: string
          example: "host.certificates"
        details:
          type: object
          example:
            key1: "value1"
            key2: "value2"
    deviceAdditionalInfo:
      type: object
      properties:
        remoteAccessPort:
          type: integer
        version:
          type: string
          example: "ied-os-1.9.0-27-amd64"
        capabilities:
          type: array
          items:
            $ref: "#/components/schemas/deviceCapability"

    deviceDetailed:
      allOf:
        - $ref: "#/components/schemas/deviceLimited"
        - $ref: "#/components/schemas/annotationList"
        - $ref: "#/components/schemas/deviceAdditionalInfo"
        - $ref: "#/components/schemas/installedApplicationListDetailed"
    deviceListLimited:
      allOf:
        - $ref: "#/components/schemas/deviceLimited"
        - $ref: "#/components/schemas/annotationList"
        - $ref: "#/components/schemas/installedApplicationListLimited"
    deviceLimited:
      type: object
      properties:
        id:
          type: string
          example: ef9614ac39554172845026c369024987
        architecture:
          type: string
          example: x86-64
        hasRemoteAccess:
          type: boolean
          example: false
        ipAddresses:
          type: array
          items:
            type: string
            example: "127.0.0.1"
        name:
          type: string
          example: myDevice
        owned:
          type: boolean
          example: true

        status:
          type: string
          example: "Online"
        typeId:
          type: string
          example: "core.ieipc"
        identityFederationStatus:
          type: boolean
          example: false

    annotationList:
      type: object
      properties:
        annotations:
          type: array
          items:
            $ref: "#/components/schemas/annotationObject"
    annotationObject:
      type: object
      properties:
        id:
          type: string
          example: 4dabc36897fb46cda0eadb4896051ec9
        label:
          type: string
          example: "Annotation123"

    installedApplicationListLimited:
      type: object
      properties:
        installedApplications:
          type: array
          items:
            $ref: "#/components/schemas/installedApplicationLimited"
    installedApplicationLimited:
      type: object
      properties:
        id:
          type: string
          example: ba44551050f2406340710fa9ff013454
        name:
          type: string
          example: IE Databus
        icon:
          type: string
          example: /data/PortalCache/app/ba44551050f2406340710fa9ff013454/appicon.png

    error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                example: "something.wrong"
              status:
                type: integer
                example: 500
              title:
                type: string
                example: Internal Server Error
              source:
                type: object
                description: Optional or will have one of the following members
                properties:
                  parameter:
                    type: string
                    description: a string that indicates which URI query parameter caused the error.
                  pointer:
                    type: string
                    description: 'JSON pointer to the value in the request document that caused the error. Example, "/data" for a primary data object, or "/data/attributes/title" for a specific attribute.'
                  header:
                    type: string
                    description: a string that indicates the name of a the header property which caused the error.
                  resourceId:
                    type: string
                    description: the identifier which refers to the respective resource causing the error of a bulk operation (e.g. a device id)
    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
            required:
              - timestamp
              - status
              - error
              - message
              - logref
            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
    AuthorizationsVO:
      required:
        - data
      type: object
      properties:
        data:
          required:
            - roles
            - userId
          type: object
          properties:
            userId:
              type: string
              description: The current user id.
            roles:
              type: array
              description: The user role.
              items:
                type: string
      description: ""
      example:
        data:
          userId: a39a5a50f510432a8e3bd832d9ec3c39
          roles: [Admin]
    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
    DeviceCreation:
      required:
        - device
      type: object
      properties:
        device:
          required:
            - Device
            - onboarding
          type: object
          properties:
            onboarding:
              description: The device onboarding details.
              required:
                - deviceName
                - localPassword
                - localUserName
                - platformActualName
              type: object
              properties:
                platformActualName:
                  type: string
                  description: This is arch info of device, it could be "x86-64" or "arm64".
                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.
                expirationTime:
                  type: integer
                  description: Expiration time, customizable by the user, should be specified in Hours. The maximum expiration time is 1440 hours (60 days).
            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
            platformActualName: x86-64
          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: Contains the statistics for a specific device. The structure of this object may vary depending on the device version, since it is only passed through from the device to the management. The BoxId in the response means deviceId.
      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","DataSpaceCriticalPoint":"85.15","DataSpaceWarningPoint":"68.12","DataSpaceReadSpeed":"4 Mb/s","DataSpaceWriteSpeed":"5 Mb/s","DataSpaceType":"HDD","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","CPUModel":"Intel(R) Xeon(R) Gold 6258R CPU @ 2.70GHz","CPUPeak":"12.80 %","CPUBaseSpeed":"2693.67 MHz","CPUWarningPoint":"56.0","CPUAverage":"5.34 %","CPUCriticalPoint":"70.0",
            "CPUIdleTime":"01:43:21","KubeAppliance":"false","MemoryFree":"6.4 GB","MemoryPercentage":"4.84","MemoryTotal":"7.8
            GB","MemoryUsed":"385.3 MB","MemoryPeak":"4.7 GB","MemoryAverage":"3.7 GB","MemoryPeriod":"20 minutes","MemoryWarningPoint":"1.7 GB","MemoryCriticalPoint":"2.7 GB"},"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: # TODO: Typo?
              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: string
              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
    DeviceApplicationListResponse:
      required:
        - data
      type: object
      properties:
        data:
          type: array
          items:
            properties:
              applicationId:
                type: string
                description: The UUID of the application
              icon:
                type: string
                description: Icon path
              title:
                type: string
                description: The title of the application
              appSource:
                type: string
                enum:
                  - others
                  - self-developed
              appStatus:
                type: string
                enum:
                  - ACTIVE
                  - PENDING
                  - SUSPENDED
                  - DELETED
                  - PUBLISHED
                  - FAILED
                  - BEING_DELETED
              canShare:
                type: boolean
                example: false
              developedWith:
                type: string
                description: developedWith mendix or other
      description: "List of apps"
      example:
        data:
          - applicationId: 78e8d7e2fd624d7fa9c90a6dbca42c1d
            icon: https://localhost:443/pp/PortalCache/app/78e8d7e2fd624d7fa9c90a6dbca42c1d/appicon.png
            title: Team Edgecalibur Test App
            appSource: self-developed
            appStatus: ACTIVE
            canShare: true
            developedWith: ""
          - applicationId: 2j34kjn234242343xc4gh22342k342c3
            icon: https://localhost:443/pp/PortalCache/app/2j34kjn234242343xc4gh22342k342c3/appicon.png
            title: Schwifty App
            appSource: others
            appStatus: PUBLISHED
            canShare: false
            developedWith: ""
    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
    AccessPolicy:
      required:
        - access-policy
      type: object
      properties:
        access-policy:
          minItems: 1
          uniqueItems: true
          type: array
          items:
            required:
              - action
              - code
              - info
              - details
            type: object
            properties:
              action:
                type: string
                description: rego files content with base64 encoded
              code:
                type: string
                description: schema files content with base64 encoded
              info:
                type: string
                description: data files content with base64 encoded
              details:
                type: array
                items:
                  $ref: "#/components/schemas/AccessPolicyDetails"
      example:
        access-policy:
          - action: warn
            code: rule.warn.state
            info: some rule is in warn state
            details:
              - action: allow
                code: compose_version.IEM.allow
                info: Docker Compose version of the application is supported on the IEM.
              - action: warn
                code: host_network.warn
                info: Host network is used, and application is not signed by a trusted vendor.
    AccessPolicyDetails:
      type: object
      properties:
        action:
          type: string
        code:
          maxLength: 50
          type: string
        info:
          type: string
    ErrorResponseLogs:
      description: "Error response for AMS logs"
      type: object
      properties:
        errors:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            required:
              - timestamp
              - status
              - message
              - logref
            type: object
            properties:
              timestamp:
                type: string
                description: Time stamp of the error occurrence
              status:
                type: integer
                format: int32
                description: HTTP status code
              message:
                type: string
                description: Error detailed message
              logref:
                type: string
                description: he log id, can help to find error details in log file
  responses:
    deviceAppListInvalidContent:
      description: Invalid input content
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponseV2"
          examples:
            invalid.content:
              $ref: "#/components/examples/invalid.content.v2"
    errorAppNotFound:
      description: "Requested application not found"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponseV2"
          examples:
            notFound.applicationDetail:
              $ref: "#/components/examples/notFound.application.v2"
    deviceAppListSuccess:
      description: Successful operation
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DeviceApplicationListResponse"
    deviceAppDetailSuccess:
      description: Successful operation
      content:
        application-json:
          schema:
            $ref: "#/components/schemas/DeviceApplicationDetails"
    deviceList:
      description: Devices successfully retrieved
      content:
        application-json:
          schema:
            allOf:
              - $ref: "#/components/schemas/deviceListLimited"
              - $ref: "#/components/schemas/pageMetadata"
          examples:
            success:
              $ref: "#/components/examples/deviceListResponse"
    deviceListInvalidInput:
      description: Bad Request
      content:
        application-json:
          schema:
            $ref: "#/components/schemas/error"
          examples:
            invalid-page-number:
              value:
                errors:
                  - code: "request.invalidContent"
                    status: 400
                    title: invalid request parameter, page
                    source:
                      parameter: page
            invalid-pagesize:
              value:
                errors:
                  - code: "request.invalidContent"
                    status: 400
                    title: invalid request parameter, size
                    source:
                      parameter: size
            invalid-pagesize-and-number:
              value:
                errors:
                  - code: "request.invalidContent"
                    status: 400
                    title: invalid request parameter, page
                    source:
                      parameter: page
                  - code: "request.invalidContent"
                    status: 400
                    title: invalid request parameter, size
                    source:
                      parameter: size
            invalid-all-filters:
              value:
                errors:
                  - code: "request.invalidContent"
                    status: 400
                    title: invalid request parameter, 'name'
                    source:
                      parameter: name
                  - code: "request.invalidContent"
                    status: 400
                    title: invalid request parameter, 'typeId'
                    source:
                      parameter: typeId
                  - code: "request.invalidContent"
                    status: 400
                    title: invalid request parameter, 'architecture'
                    source:
                      parameter: architecture
                  - code: "request.invalidContent"
                    status: 400
                    title: invalid request parameter, 'status'
                    source:
                      parameter: status
    errorUnauthenticated:
      description: "Unauthenticated, authorization token does not exists or not starting with bearer <auth token>"
      content:
        application-json:
          schema:
            $ref: "#/components/schemas/error"
          examples:
            missing-auth-header:
              value:
                errors:
                  - code: auth.missingToken
                    status: 401
                    title: Authentication Token is missing
            invalid-auth-header:
              value:
                errors:
                  - code: auth.unauthenticated
                    status: 401
                    title: Authentication Token is invalid
    errorUnauthourized:
      description: "Unauthorized, the user doesn't have the role or the privileges to execute the action. Access denied."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/error"
          examples:
            auth.unauthorizedToken:
              value:
                errors:
                  - code: auth.unauthorizedToken
                    status: 401
                    title: Unauthorized token
            auth.accessDenied:
              value:
                errors:
                  - code: auth.accessDenied
                    status: 401
                    title: Access denied
    genericError:
      description: Something went wrong
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/error"
    deviceNotFound:
      description: Device not found
      content:
        application-json:
          schema:
            $ref: "#/components/schemas/error"
          examples:
            device-not-found:
              $ref: "#/components/examples/deviceNotFoundError"
    device:
      description: ""
      content:
        application-json:
          schema:
            $ref: "#/components/schemas/deviceDetailed"
          examples:
            success:
              $ref: "#/components/examples/deviceResponse"
    errorForbidden:
      description: "Unauthorized, the user doesn't have the role or the privileges to execute the action. Access denied."
      content:
        application-json:
          schema:
            $ref: "#/components/schemas/error"
          examples:
            unauthorized-token:
              value:
                errors:
                  - code: auth.unauthorizedToken
                    status: 403
                    title: Not enough privileges to perform this action
    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"
    downloadPodLogsSuccess:
      description: Successful operation
      content:
        application/octet-stream:
          schema:
            type: string
            format: binary
            example: gzip compressed file content
  examples:
    deviceListResponse:
      value:
        devices:
          id: 1dc96b1fdae34a23b9003bbb630ea423
          architecture: "x86-64"
          hasRemoteAccess: false
          ipAddresses:
            - "105.80.203.224"
          annotations:
            - id: "annotation-id-1"
              label: "annotation-1"
            - id: "annotation-id-2"
              label: "annotation-2"
          name: testdevice1
          owned: true
          status: Online
          typeId: f81c145c-fcac-42bf-946e-88c22bada03a
          identityFederationStatus: false
          installedApplications:
            - id: "ba44551050f2406340710fa9ff013454"
              name: "IE Databus"
              icon: "/data/PortalCache/app/ba44551050f2406340710fa9ff013454/appicon.png"
            - id: 2dc96b1fdae34a23b9003bbb630ea423
              architecture: "x86-64"
              hasRemoteAccess: false
              ipAddresses:
                - "105.80.203.224"
              name: testdevice2
              typeId: f81c145c-fcac-42bf-946e-88c22bada03a
              identityFederationStatus: false
              owned: true
              status: Offline
          meta:
            - page:
              - number: 1
                size: 2
                totalElements: 25
                totalPages: 13
                elements: 2
    deviceResponse:
      value:
        id: 1dc96b1fdae34a23b9003bbb630ea423
        architecture: "x86-64"
        hasRemoteAccess: false
        ipAddresses: 
          - "105.80.203.224"
        annotations:
          - id: "annotation-id-1"
            label: "annotation-1"
          - id: "annotation-id-2"
            label: "annotation-2"
        name: testdevice1
        owned: true
        remoteAccessPort: 30002
        status: Online
        typeId: f81c145c-fcac-42bf-946e-88c22bada03a
        identityFederationStatus: false
        version: "ied-os-1.9.0-27-amd64"
        capabilities:
          - capabilityID: "host.certificates"
            details:
              allowExternal: "true"
              certFilePath: ""
              keyFilePath: ""
              renewPolicy: "autoRenew"
        installedApplications:
          - id: "ba44551050f2406340710fa9ff013454"
            name: "IE Databus"
            icon: "/data/PortalCache/app/ba44551050f2406340710fa9ff013454/appicon.png"
            size: 660649984
            version: "1.11.0-2"
            versionId: "324a0d296e374e418af8755e680d80be"  
    deviceNotFoundError:
      value:
        errors:
          - code: "notFound"
            status: 404
            title: failed to find object device with id:DeviceId-01
    auth.accessDenied.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 403
            error: auth.accessDenied
            message: Access denied.
            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:
      value:
        errors:
          - errorCode: 404
            code: notFound.device
            message: device not found.
            field: "deviceId"
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
            parentLogref: ""
    notFound.device.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 400
            error: notFound.device
            message: device not found.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    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
    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: 400
            error: notFound.application
            message: Application 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
    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.name:
      value:
        errors:
          - errorCode: 400
            code: invalid.device.name
            message: Edge Device Name must be 3-64 characters long and can only contain alphanumeric characters and '.', '+', '-', '_'"
            field: "devicename"
            logref: 683fcecd-150b-42f2-9988-53be786b50cb
            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: ""
    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
    notFound.appVersion:
      value:
        errors:
          - errorCode: 400
            code: notFound.appVersion
            message: App version not found
            field: ""
            logref: e286ed72-2288-45de-a43e-0ccc4d3973f1
            parentLogref: ""
    notFound.appVersion.v2:
      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
    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: ""
    host.invalid:
      value:
        errors:
          - errorCode: 400
            code: host.invalid
            message: "Invalid host name format. Use 'IP:port' or 'domain:port'. Port should be a number between 1 and 65535 (inclusive). For example : 192.168.1.1:8080 or example.com:80."
            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
    invalid.password.format:
      value:
        errors:
          - errorCode: 400
            code: invalid.password.format
            message: Password must contain at least 8 characters and should have at least one capital letter, special character (!@#$%^&*.()_+) and a number.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.password.spaces:
      value:
        errors:
          - errorCode: 400
            code: invalid.password.spaces
            message: Password cannot contain leading and trailing spaces.
            field: ""
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    invalid.expiration.time:
      value:
        errors:
          - errorCode: 400
            code: invalid.expiration.time
            message: The expiration time you provided is out of the acceptable range. It must be over 1 hour and less than 1440 hours (60 days). Please adjust accordingly.
            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: ""
    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
    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
    invalid.content.v2:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 400
            error: invalid.content
            message: Invalid input param.
            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
    platform.mismatch:
      value:
        errors:
          - timestamp: 2022-09-27T02:51:53.867Z
            status: 405
            error: platform.mismatch
            message: Platforms for application and device do not match.
            logref: a56288cd-3976-4a46-b12d-a9e79f294744
    auth.missingAuthToken.logs:
      value:
        errors:
          - timestamp: "2025-11-19T10:57:16.103819027Z"
            status: 401
            error: "missing.token"
            message: "Authorization Token is missing"
            logref: "c4f3df91-ada5-493e-8870-1ea66a25e15e4"
    auth.unauthorizedToken.logs:
      value:
        errors:
          - timestamp: "2025-11-19T11:03:04.28067819Z"
            status: 403
            error: "auth.unauthorizedToken"
            message: "Unauthorized request "
            logref: "8d35cd14-93ba-402c-810d-07085283d5cc"
    something.wrong.logs:
      value:
        errors:
          - timestamp: "2025-11-19T11:05:23.408Z"
            status: 500
            error: "something.wrong"
            message: "Internal server error occurred"
            logref: "f1e8b6a3-2f3e-4d3a-9f4e-8b6a3f3e4d3a"
  securitySchemes:
    ApiKey:
      type: apiKey
      name: Authorization
      in: header
