basePath: /mlmanager/api/public/v2
definitions:
  agent.ActionStateResponseDTO:
    properties:
      actionId:
        format: uuid
        type: string
      agentId:
        format: uuid
        type: string
      code:
        type: string
      createdAt:
        type: string
      createdBy:
        type: string
      details:
        $ref: '#/definitions/entities.DetailsMap'
      id:
        format: uuid
        type: string
      kind:
        type: string
      message:
        type: string
      modifiedAt:
        type: string
      modifiedBy:
        type: string
      state:
        $ref: '#/definitions/entities.AgentActionStateEnum'
    type: object
  agent.AddAgentDTO:
    properties:
      appId:
        type: string
      deviceId:
        type: string
    required:
    - appId
    - deviceId
    type: object
  agent.AgentDTO:
    properties:
      actionState:
        $ref: '#/definitions/agent.ActionStateResponseDTO'
      applicationId:
        type: string
      applicationName:
        type: string
      applicationType:
        type: string
      applicationVersion:
        type: string
      capabilities:
        items:
          $ref: '#/definitions/agent.CapabilityDTO'
        type: array
      connectionStatus:
        $ref: '#/definitions/entities.AgentConnectionStatus'
      createdAt:
        type: string
      createdBy:
        type: string
      deviceId:
        type: string
      deviceName:
        type: string
      id:
        type: string
      modifiedAt:
        type: string
      modifiedBy:
        type: string
      onboardingAttempts:
        type: integer
    type: object
  agent.CapabilityDTO:
    properties:
      name:
        type: string
      version:
        type: string
    type: object
  aiis.PipelineComponent:
    properties:
      id:
        type: string
      runtimeType:
        type: string
      runtimeVersion:
        type: string
    type: object
  cerror.GenericError:
    properties:
      cause:
        items:
          type: object
        type: array
      code:
        type: string
      details:
        additionalProperties:
          type: string
        type: object
      logRef:
        type: string
      message:
        type: string
    type: object
  credential.CredentialRequestDTO:
    properties:
      credentialTypeId:
        description: can be acquired from /credentialtypes endpoint
        type: string
      id:
        type: string
      value:
        type: string
    type: object
  credential.CredentialResponseDTO:
    properties:
      createdAt:
        type: string
      createdBy:
        type: string
      credentialTypeId:
        type: string
      endpoint:
        type: string
      id:
        type: string
      modifiedAt:
        type: string
      modifiedBy:
        type: string
      topicPrefix:
        type: string
    type: object
  deployment.DeploymentActionStateRequestDTO:
    properties:
      code:
        type: string
      details:
        $ref: '#/definitions/entities.DetailsMap'
      kind:
        description: it is possible to send action kind as in the agent action file
          configuration or as a new action is requested via /deployments/{id}:{action}
        enum:
        - CREATE
        - ' DELETE'
        - ' ACTIVATE'
        - ' DEACTIVATE'
        - ' START'
        - ' STOP'
        - ' PAUSE'
        - ' deploy'
        - ' undeploy'
        - ' activatePipeline'
        - ' deactivatePipeline'
        - ' startPipeline'
        - ' stopPipeline'
        - ' pausePipeline'
        type: string
      message:
        type: string
      state:
        allOf:
        - $ref: '#/definitions/entities.StateEnum'
        enum:
        - AgentActionReceived
        - AgentFetchingDeployment
        - AgentUnpackingDeployment
        - AgentActionExecuted
        - AgentActionExecutionError
    required:
    - kind
    - state
    type: object
  deployment.DeploymentActionStateResponseDTO:
    properties:
      actionId:
        format: uuid
        type: string
      code:
        type: string
      createdAt:
        type: string
      createdBy:
        type: string
      deploymentId:
        format: uuid
        type: string
      details:
        $ref: '#/definitions/entities.DetailsMap'
      id:
        format: uuid
        type: string
      kind:
        enum:
        - deploy
        - ' undeploy'
        - ' activatePipeline'
        - ' startPipeline'
        - ' stopPipeline'
        - ' pausePipeline'
        type: string
      message:
        type: string
      modifiedAt:
        type: string
      modifiedBy:
        type: string
      state:
        allOf:
        - $ref: '#/definitions/entities.StateEnum'
        enum:
        - ErrorSendingAction
        - ActionSent
        - AgentActionReceived
        - AgentFetchingDeployment
        - AgentUnpackingDeployment
        - AgentActionExecuted
        - AgentActionExecutionError
    type: object
  deployment.DeploymentDTO:
    properties:
      action:
        $ref: '#/definitions/deployment.DeploymentActionStateResponseDTO'
      applicationId:
        type: string
      createdAt:
        type: string
      createdBy:
        type: string
      deviceId:
        type: string
      id:
        format: uuid
        type: string
      modifiedAt:
        type: string
      modifiedBy:
        type: string
      name:
        type: string
      packageId:
        format: uuid
        type: string
      ruleId:
        type: string
      status:
        $ref: '#/definitions/deployment.StatusDTO'
    type: object
  deployment.RequestDTO:
    properties:
      applicationId:
        type: string
      deviceId:
        type: string
      packageId:
        format: uuid
        type: string
      ruleId:
        type: string
    required:
    - deviceId
    - packageId
    type: object
  deployment.StatusDTO:
    properties:
      code:
        type: string
      createdAt:
        type: string
      createdBy:
        type: string
      deploymentId:
        format: uuid
        type: string
      details:
        $ref: '#/definitions/entities.DetailsMap'
      id:
        format: uuid
        type: string
      message:
        type: string
      modifiedAt:
        type: string
      modifiedBy:
        type: string
      status:
        allOf:
        - $ref: '#/definitions/entities.StatusEnum'
        enum:
        - New
        - Embedder*
    type: object
  embedder.AiISBuildInfoDTO:
    properties:
      apiVersion:
        type: string
      isGPUEnabledApp:
        type: boolean
      maxNumberOfDeployedPipelines:
        type: integer
      production:
        type: string
      pythonVersions:
        items:
          type: string
        type: array
      version:
        type: string
    type: object
  embedder.AiISPipelineDTO:
    properties:
      components:
        items:
          $ref: '#/definitions/aiis.PipelineComponent'
        type: array
      createdOn:
        type: string
      id:
        type: string
      name:
        type: string
      packageId:
        type: string
      status:
        type: string
      statusUpdatedOn:
        type: string
      updatedOn:
        type: string
      version:
        type: string
    type: object
  embedder.PipelineActionDTO:
    properties:
      kind:
        enum:
        - activate
        - deactivate
        - start
        - stop
        - pause
        - resume
        - delete
        type: string
    required:
    - kind
    type: object
  embedder.ResponseDTO-array_embedder_AiISPipelineDTO:
    properties:
      data:
        items:
          $ref: '#/definitions/embedder.AiISPipelineDTO'
        type: array
      errors:
        items:
          $ref: '#/definitions/cerror.GenericError'
        type: array
    type: object
  embedder.ResponseDTO-embedder_AiISBuildInfoDTO:
    properties:
      data:
        $ref: '#/definitions/embedder.AiISBuildInfoDTO'
      errors:
        items:
          $ref: '#/definitions/cerror.GenericError'
        type: array
    type: object
  entities.AgentActionStateEnum:
    enum:
    - ActionSent
    - AgentOnboarded
    - ActionRevoked
    type: string
    x-enum-varnames:
    - AgentActionStateActionSent
    - AgentActionStateAgentOnboarded
    - AgentActionStateActionRevoked
  entities.AgentConnectionStatus:
    enum:
    - DISCONNECTED
    - CONNECTED
    type: string
    x-enum-varnames:
    - AgentDisconnectedStatus
    - AgentConnectedStatus
  entities.ConnectionStatus:
    enum:
    - DISCONNECTED
    - CONNECTED
    - SUBSCRIPTION_FAILED
    - UNSUBSCRIBE_FAILED
    - PUBLISH_FAILED
    type: string
    x-enum-varnames:
    - Disconnected
    - Connected
    - SubscriptionFailed
    - UnsubscribeFailed
    - PublishFailed
  entities.DeploymentStatusDTO:
    properties:
      code:
        type: string
      deploymentId:
        type: string
      details:
        $ref: '#/definitions/entities.DetailsMap'
      message:
        type: string
      source:
        type: string
      status:
        enum:
        - New
        - Invalid
        - ErrorSendingAction
        - DeployActionSent
        - UnDeployActionSent
        - ActivateActionSent
        - StartActionSent
        - StopActionSent
        - PauseActionSent
        - AgentActionReceived
        - AgentFetchingDeployment
        - AgentUnpackingDeployment
        - AgentActionExecuted
        - AgentActionExecutionError
        - Embedder*
        type: string
    required:
    - deploymentId
    - source
    - status
    type: object
  entities.DetailsMap:
    additionalProperties:
      type: string
    type: object
  entities.IntegrationType:
    properties:
      description:
        type: string
      id:
        type: string
      name:
        type: string
      provider:
        $ref: '#/definitions/entities.Provider'
      providerId:
        type: string
    type: object
  entities.PackageStatus:
    enum:
    - NEW
    - SEEN
    type: string
    x-enum-varnames:
    - PackageStatusNew
    - PackageStatusSeen
  entities.Provider:
    properties:
      fullName:
        type: string
      id:
        type: string
      name:
        type: string
    type: object
  entities.StateEnum:
    enum:
    - ActionSent
    - ErrorSendingAction
    - AgentActionReceived
    - AgentActionExecuted
    - AgentActionExecutionError
    - AgentFetchingDeployment
    - AgentUnpackingDeployment
    type: string
    x-enum-varnames:
    - StateEnumActionSent
    - StateEnumErrorSendingAction
    - StateEnumAgentActionReceived
    - StateEnumAgentActionExecuted
    - StateEnumAgentActionExecutionError
    - StateEnumAgentFetchingDeployment
    - StateEnumAgentUnpackingDeployment
  entities.StatusEnum:
    enum:
    - New
    - EmbedderAvailable
    - EmbedderMapped
    - EmbedderWarning
    - EmbedderRunning
    - EmbedderPaused
    - EmbedderError
    - EmbedderRemoved
    type: string
    x-enum-varnames:
    - StatusEnumNew
    - StatusEnumEmbedderAvailable
    - StatusEnumEmbedderMapped
    - StatusEnumEmbedderWarning
    - StatusEnumEmbedderRunning
    - StatusEnumEmbedderPaused
    - StatusEnumEmbedderError
    - StatusEnumEmbedderRemoved
  generalinfo.Info:
    properties:
      license:
        description: API license or copyright
        type: string
      title:
        description: API title
        type: string
      version:
        description: API version
        type: string
    type: object
  packageapi.PackageDTO:
    properties:
      createdAt:
        type: string
      createdBy:
        type: string
      deployments:
        items:
          $ref: '#/definitions/deployment.DeploymentDTO'
        type: array
      descriptionExists:
        type: boolean
      hardwareType:
        type: string
      id:
        format: uuid
        type: string
      modifiedAt:
        type: string
      modifiedBy:
        type: string
      name:
        type: string
      packageId:
        format: uuid
        type: string
      runtimes:
        items:
          $ref: '#/definitions/packageapi.RuntimeDTO'
        type: array
      status:
        $ref: '#/definitions/entities.PackageStatus'
      type:
        type: string
      version:
        type: string
      workspaceId:
        format: uuid
        type: string
    type: object
  packageapi.PatchPackageDTO:
    properties:
      name:
        type: string
      status:
        $ref: '#/definitions/entities.PackageStatus'
    type: object
  packageapi.RuntimeDTO:
    properties:
      type:
        type: string
      version:
        type: string
    type: object
  packageapi.StepDTO:
    properties:
      createdAt:
        type: string
      createdBy:
        type: string
      description:
        type: string
      entryPoint:
        type: string
      hardwareType:
        type: string
      id:
        format: uuid
        type: string
      modifiedAt:
        type: string
      modifiedBy:
        type: string
      name:
        type: string
      packageId:
        type: string
      replicas:
        type: integer
      runtimeType:
        type: string
      runtimeVersion:
        type: string
      version:
        type: string
    type: object
  workspace.WorkspaceCreateDTO:
    properties:
      credential:
        $ref: '#/definitions/credential.CredentialRequestDTO'
      description:
        type: string
      integrationTypeId:
        description: can be acquired from /providers/{providerId}/integrationtypes
          endpoint.
        type: string
      name:
        maxLength: 20
        type: string
      workspaceTypeId:
        description: can be acquired from /workspacetypes endpoint.
        type: string
    required:
    - name
    - workspaceTypeId
    type: object
  workspace.WorkspaceResponseDTO:
    properties:
      connectionStatus:
        $ref: '#/definitions/entities.ConnectionStatus'
      createdAt:
        type: string
      createdBy:
        type: string
      credential:
        $ref: '#/definitions/credential.CredentialResponseDTO'
      credentialId:
        type: string
      description:
        type: string
      id:
        type: string
      integrationType:
        $ref: '#/definitions/entities.IntegrationType'
      integrationTypeId:
        type: string
      modifiedAt:
        type: string
      modifiedBy:
        type: string
      name:
        maxLength: 20
        type: string
      packages:
        items:
          $ref: '#/definitions/packageapi.PackageDTO'
        type: array
      protected:
        type: boolean
      workspaceType:
        $ref: '#/definitions/workspace.WorkspaceTypeDTO'
      workspaceTypeId:
        type: string
    required:
    - name
    type: object
  workspace.WorkspaceTypeDTO:
    properties:
      id:
        type: string
      name:
        type: string
    type: object
  workspace.WorkspaceUpdateDTO:
    properties:
      credential:
        $ref: '#/definitions/credential.CredentialRequestDTO'
      description:
        type: string
      name:
        maxLength: 20
        type: string
    required:
    - name
    type: object
info:
  contact: {}
  description: |-
    All endpoints of the AI Model Manager API require a cookie named "authToken". The value of the cookie
    can be obtained during login to the IE Device using its user interface, or programmatically by using
    the "login/direct" endpoint of the IE device (see the IE Device API specification for details).
    If SwaggerUI is hosted by the application, the browser automatically handles the "authToken" cookie.
  license:
    name: Copyright 2023 Siemens AG. All Rights Reserved. Confidential.
  title: AI Model Manager API
  version: 'local'
paths:
  /agents:
    get:
      operationId: Agent_LIST
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/agent.AgentDTO'
            type: array
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get a list of Agents
      tags:
      - Agent
    post:
      description: This method registers an agent for the target application referenced.
      operationId: Agent_ADD
      parameters:
      - description: TargetApplication json
        in: body
        name: TargetApplication
        required: true
        schema:
          $ref: '#/definitions/agent.AddAgentDTO'
      - description: Access Token
        in: header
        name: Iem-Access-Token
        required: true
        type: string
      produces:
      - application/json
      responses:
        "201":
          description: Created
          schema:
            $ref: '#/definitions/agent.AgentDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Add new Agent
      tags:
      - Agent
  /agents/{agentId}/actions/{actionId}/states:
    post:
      description: This method creates a new action state entry for the given agent
        if the latest state differs from the received, updates it otherwise.
      operationId: Agent_ActionState_POST
      parameters:
      - description: actionId
        in: path
        name: agentId
        required: true
        type: string
      - description: actionId
        in: path
        name: actionId
        required: true
        type: string
      - description: access token from the action file
        in: header
        name: MM-Access-Token
        required: true
        type: string
      - description: Status JSON
        in: body
        name: actionState
        required: true
        schema:
          $ref: '#/definitions/agent.ActionStateResponseDTO'
      produces:
      - application/json
      responses:
        "201":
          description: Created
          schema:
            $ref: '#/definitions/agent.ActionStateResponseDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "401":
          description: Unauthorized
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "403":
          description: Forbidden
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Add action state to an Agent. This endpoint is only intended to be
        used by AI Model Manger Agent.
      tags:
      - Agent
  /agents/{id}:
    delete:
      description: 'This method removes the specified agent (TODO: and sends a dispose
        action to the related Embedder application through IEM.)'
      operationId: Agent_DELETE
      parameters:
      - description: Access Token
        in: header
        name: Iem-Access-Token
        required: true
        type: string
      - description: Agent id to delete
        in: path
        name: id
        required: true
        type: string
      - collectionFormat: multi
        description: Optional flags. With 'force', agent is deleted even if dispose
          action fails
        in: query
        items:
          type: string
        name: options
        type: array
      produces:
      - application/json
      responses:
        "204":
          description: No Content
        "404":
          description: no agent exists with given ID
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: any error occurred on server side
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Delete an Agent
      tags:
      - Agent
    get:
      description: This method returns an Agent object given by its ID
      operationId: Agent_GET
      parameters:
      - description: AgentId
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/agent.AgentDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get an Agent by its ID
      tags:
      - Agent
  /agents/find:
    get:
      description: This method returns an exact Agent object specified by criteria.
        The criteria must be unique, resulting in a single Agent instance.
      operationId: Agent_FIND_BY_CRITERIA
      parameters:
      - description: Device id
        in: query
        name: deviceId
        required: true
        type: string
      - description: Application id
        in: query
        name: applicationId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/agent.AgentDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get an Agent by Criteria (DeviceId, ApplicationId)
      tags:
      - Agent
  /application/build:
    get:
      operationId: version_GET
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/generalinfo.Info'
      summary: Get the version of the app
      tags:
      - Generic
  /deployments:
    get:
      description: This method returns the list of deployments
      operationId: Deployment_LIST
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/deployment.DeploymentDTO'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/cerror.GenericError'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/cerror.GenericError'
      summary: Get the list of Deployments
      tags:
      - Deployments
    post:
      description: This method creates a deployment instance based on the details
        submitted.
      operationId: Deployment_ADD
      parameters:
      - description: Deployment data
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/deployment.RequestDTO'
      produces:
      - application/json
      responses:
        "201":
          description: Created
          schema:
            $ref: '#/definitions/deployment.DeploymentDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Add a Deployment instance
      tags:
      - Deployments
  /deployments/{id}:
    delete:
      description: This method removes the specified deployment instance and sends
        an undeploy action to the related deployment in the Embedder application through
        IEM.
      operationId: Deployment_DELETE
      parameters:
      - description: Access Token (mandatory if deployed to a device)
        in: header
        name: Iem-Access-Token
        type: string
      - description: Deployment ID to delete
        in: path
        name: id
        required: true
        type: string
      - collectionFormat: multi
        description: Optional flags. With 'force', deployment is deleted even if undeploy
          action fails
        in: query
        items:
          type: string
        name: options
        type: array
      produces:
      - application/json
      responses:
        "204":
          description: No Content
        "404":
          description: no deployment exists with given ID
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: any error occurred on server side
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Delete a Deployment instance
      tags:
      - Deployments
    get:
      description: This method returns details of a specific deployment instance.
      operationId: Deployment_GET
      parameters:
      - description: DeploymentId
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/deployment.DeploymentDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get a Deployment instance
      tags:
      - Deployments
  /deployments/{id}/action/{actionId}/state:
    post:
      description: This method creates a new action state entry for the given deployment
        if the latest status differs from the received, updates it otherwise.
      operationId: Deployment_POST_ACTION_STATE
      parameters:
      - description: DeploymentId
        in: path
        name: id
        required: true
        type: string
      - description: ActionId
        in: path
        name: actionId
        required: true
        type: string
      - description: key value pair separated with equals sign '=' where the key is
          the id of a deployment and the value is the actual access token acquired
          from the deployment action file
        in: header
        name: MM-Access-Token
        required: true
        type: string
      - description: Status JSON
        in: body
        name: deploymentActionState
        required: true
        schema:
          $ref: '#/definitions/deployment.DeploymentActionStateRequestDTO'
      produces:
      - application/json
      responses:
        "201":
          description: Created
          schema:
            $ref: '#/definitions/deployment.DeploymentActionStateResponseDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "401":
          description: Unauthorized
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "403":
          description: Forbidden
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Update action state of a Deployment. This endpoint is only intended
        to be used by AI Model Manger Agent.
      tags:
      - Deployments
  /deployments/{id}/status:
    get:
      deprecated: true
      description: This method returns the latest reported status of the given deployment.
      operationId: Deployment_GET_STATUS
      parameters:
      - description: DeploymentId
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/deployment.StatusDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get Status of a Deployment
      tags:
      - Deployments
    post:
      deprecated: true
      description: This method creates a new status entry for the given deployment
        if the latest status differs from the received, updates it otherwise.
      operationId: Deployment_POST_STATUS
      parameters:
      - description: DeploymentId
        in: path
        name: id
        required: true
        type: string
      - description: key value pair separated with equals sign '=' where the key is
          the id of a deployment and the value is the actual access token acquired
          from the deployment action file
        in: header
        name: MM-Access-Token
        required: true
        type: string
      - description: Status JSON
        in: body
        name: deploymentStatus
        required: true
        schema:
          $ref: '#/definitions/entities.DeploymentStatusDTO'
      produces:
      - application/json
      responses:
        "204":
          description: Status updated
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "401":
          description: Unauthorized
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "403":
          description: Forbidden
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Update status of a Deployment
      tags:
      - Deployments
  /deployments/{id}:{action}:
    post:
      description: This method sends the given action to the selected deployment in
        the Embedder application.
      operationId: Deployment_DeploymentAction
      parameters:
      - description: Access Token
        in: header
        name: Iem-Access-Token
        required: true
        type: string
      - description: DeploymentId
        in: path
        name: id
        required: true
        type: string
      - description: actions
        enum:
        - deploy
        - undeploy
        - activatePipeline
        - deactivatePipeline
        - startPipeline
        - stopPipeline
        - pausePipeline
        in: path
        name: action
        required: true
        type: string
      produces:
      - application/json
      responses:
        "202":
          description: Accepted
          schema:
            $ref: '#/definitions/deployment.DeploymentActionStateResponseDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Initiates the selected deployment action
      tags:
      - Deployments
  /deployments/{id}:directDeploy:
    post:
      description: This method sends the direct deployment creation action to the
        agent in the target application. Direct deployment is the process used to
        deploy packages to AI Inference Servers between version 2.0.0 and 2.4.0. Actions
        need a preexisting deployment object.
      operationId: Deployment_DirectDeploymentAction
      parameters:
      - description: DeploymentId
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "202":
          description: Accepted
          schema:
            $ref: '#/definitions/deployment.DeploymentActionStateResponseDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Initiates the direct deployment creation action
      tags:
      - Deployments
  /deployments/{id}:file:
    get:
      operationId: DeploymentPackage_GET
      parameters:
      - description: DeploymentId
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/zip
      responses:
        "200":
          description: OK
          schema:
            type: file
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get the Package based on which the deployment was created.
      tags:
      - Deployments
  /deployments/statuses:
    post:
      deprecated: true
      description: This method processes the received deployment statuses, creates
        new status entries for the given deployments if their respective status differs
        from the one received, updates the latest records otherwise.
      operationId: Deployment_POST_BATCHSTATUS
      parameters:
      - description: the token value is a comma separated  list, the list values are
          key value pairs separated with equals sign '=' where the key is the id of
          a deployment and the value is the actual access token acquired from the
          deployment action file
        in: header
        name: MM-Access-Token
        required: true
        type: string
      - description: Statuses JSON
        in: body
        name: statuses
        required: true
        schema:
          items:
            $ref: '#/definitions/entities.DeploymentStatusDTO'
          type: array
      produces:
      - application/json
      responses:
        "204":
          description: Status updated
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Update Status of Deployments. This endpoint is only intended to be
        used by AI Model Manger Agent.
      tags:
      - Deployments
  /embedders/aiis/application/build:
    get:
      description: |-
        This method initiates a process to collect information from connected target applications.
        For each connected target, a request is made to the target's REST API, or data is retrieved from local cache.
      operationId: Embedder_BuildInfo_GET
      parameters:
      - description: Id of an Agent
        in: query
        name: agent
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties:
              $ref: '#/definitions/embedder.ResponseDTO-embedder_AiISBuildInfoDTO'
            type: object
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get build information of AI Inference Server type target applications
      tags:
      - Embedder
  /embedders/aiis/pipelines:
    get:
      description: |-
        This method initiates a process to collect information from connected target applications.
        For each connected target, a request is made to the target's REST API, or data is retrieved from local cache.
      operationId: Embedder_PipelineList_GET
      parameters:
      - description: Id of an Agent
        in: query
        name: agent
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties:
              $ref: '#/definitions/embedder.ResponseDTO-array_embedder_AiISPipelineDTO'
            type: object
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get Pipeline List of AI Inference Server type target applications
      tags:
      - Embedder
  /embedders/aiis/pipelines/{id}/action:
    post:
      description: |-
        This method sends the given action to the selected pipeline in the Embedder application.
        For the connected target, a request is made to the target's REST API.
      operationId: Embedder_PipelineAction_POST
      parameters:
      - description: id of an Agent
        in: query
        name: agent
        required: true
        type: string
      - description: id of a pipeline
        in: path
        name: id
        required: true
        type: string
      - description: action details
        in: body
        name: action
        required: true
        schema:
          $ref: '#/definitions/embedder.PipelineActionDTO'
      produces:
      - application/json
      responses:
        "204":
          description: No Content
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Initiates the given pipeline action
      tags:
      - Embedder
  /packages:
    get:
      operationId: Package_LIST
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/packageapi.PackageDTO'
            type: array
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get a list of Packages
      tags:
      - Packages
  /packages/{id}:
    delete:
      operationId: Package_DELETE
      parameters:
      - description: Access Token (mandatory if deployed to a device)
        in: header
        name: Iem-Access-Token
        type: string
      - description: Package ID to delete
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "204":
          description: No Content
        "400":
          description: incorrect request format
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: no package exists with given ID
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: any error occurred on server side
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Delete a Package instance
      tags:
      - Packages
    get:
      operationId: Package_GET
      parameters:
      - description: PackageId
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/packageapi.PackageDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get a Package instance
      tags:
      - Packages
    patch:
      operationId: Package_PATCH
      parameters:
      - description: PackageId
        in: path
        name: id
        required: true
        type: string
      - description: Optional Package data fields
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/packageapi.PatchPackageDTO'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/packageapi.PackageDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Patch a package instance
      tags:
      - Packages
  /packages/{id}/steps:
    get:
      deprecated: true
      operationId: PackageStep_LIST
      parameters:
      - description: PackageId
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/packageapi.StepDTO'
            type: array
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get a list of Steps by Package
      tags:
      - Packages
  /packages:file:
    post:
      consumes:
      - multipart/form-data
      operationId: Package_POST_File
      parameters:
      - description: file
        in: formData
        name: file
        required: true
        type: file
      - description: workspaceId
        in: formData
        name: workspaceId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "201":
          description: Created
          schema:
            $ref: '#/definitions/packageapi.PackageDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Import Edge Configuration Package
      tags:
      - Packages
  /workspaces:
    get:
      operationId: Workspace_LIST
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/workspace.WorkspaceResponseDTO'
            type: array
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get a list of Workspaces
      tags:
      - Workspaces
    post:
      consumes:
      - application/json
      operationId: Workspace_ADD
      parameters:
      - description: workspace JSON
        in: body
        name: workspace
        required: true
        schema:
          $ref: '#/definitions/workspace.WorkspaceCreateDTO'
      produces:
      - application/json
      responses:
        "201":
          description: Created
          schema:
            $ref: '#/definitions/workspace.WorkspaceResponseDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "409":
          description: Conflict
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Add a Workspace instance
      tags:
      - Workspaces
  /workspaces/{id}:
    delete:
      operationId: Workspace_DELETE
      parameters:
      - description: Access Token (mandatory, if it has a deployment deployed to a
          device)
        in: header
        name: Iem-Access-Token
        type: string
      - description: Workspace ID to delete
        in: path
        name: id
        required: true
        type: string
      responses:
        "204":
          description: No Content
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Delete a Workspace instance
      tags:
      - Workspaces
    get:
      operationId: Workspace_GET
      parameters:
      - description: ID of workspace to get
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/workspace.WorkspaceResponseDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get a Workspace instance
      tags:
      - Workspaces
    put:
      consumes:
      - application/json
      operationId: Workspace_UPDATE
      parameters:
      - description: ID of workspace to update
        in: path
        name: id
        required: true
        type: string
      - description: workspace JSON
        in: body
        name: workspace
        required: true
        schema:
          $ref: '#/definitions/workspace.WorkspaceUpdateDTO'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/workspace.WorkspaceResponseDTO'
        "400":
          description: Bad Request
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "404":
          description: Not Found
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "409":
          description: Conflict
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Update a Workspace instance
      tags:
      - Workspaces
  /workspacetypes:
    get:
      operationId: WorkspaceType_LIST
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/workspace.WorkspaceTypeDTO'
            type: array
        "500":
          description: Internal Server Error
          schema:
            items:
              $ref: '#/definitions/cerror.GenericError'
            type: array
      summary: Get a list of WorkspaceTypes
      tags:
      - Workspaces
swagger: "2.0"
