asyncapi: 2.6.0
info:
  version: 4.0.0
  x-visibility: internal
  title: Asset Modeler Async API
  description: >
    Using asset modeler services, your MindConnect MQTT agents will be able to create and manage the entire asset model over MindConnect MQTT. This makes your agents smarter by creating and maintaining the asset hierarchy. Asset Modeler Async API defines topics to create and manage asset model. An asset model consists of assets, aspects, and their mapping to data points of an agent. There will be one to one relationship between MindConnect MQTT agent and asset model.


servers:
  EU1:
    url: 'mqtt.ih.eu1.siemens.app:(8883|443)'
    description: |
      Your MindConnect MQTT agent should use the above URL to connect to MindConnect MQTT broker. Please note that the broker supports Port 443 and 8883. Your client can use any one of the ports suiting to your needs.
    protocol: mqtts
channels:
  'tc/{tenantId}/{clientId}/o/amo_v4/mi':
    parameters:
      tenantId:
        $ref: '#/components/parameters/TenantId'
      clientId:
        $ref: '#/components/parameters/ClientId'
    publish:
      operationId: createOrAppendModel
      description: >
        Your MindConnect MQTT agent can create a new model or update an existing model using this topic. Desired model should be provided as the MQTT message. Refer to [How to create model documentation](https://documentation.mindsphere.io/MindSphere/howto/howto-create-data-model-mqtt-agent.html). The message is handled by the appropriate services in Insights Hub to create or update the desired model. If the model contains error then it will be returned in the corresponding *Subscribe* topic. Asset model can contain definition for one or more different elements: aspect types, asset types, asset type aspects, asset instances and data point mappings.
      tags:
        - name: Asset Model Instantiation Job
      message:
        summary: Instantiate Asset Model or Update.
        $ref: '#/components/messages/ModelInstantiationJobMessage'
  'tc/{tenantId}/{clientId}/i/amo_v4/mip':
    parameters:
      tenantId:
        $ref: '#/components/parameters/TenantId'
      clientId:
        $ref: '#/components/parameters/ClientId'
    subscribe:
      operationId: receiveModelInstantiationProgressMessages
      description: |
        Subscribe model instantiation progress messages. It can be used to give appropriate feedback to your users as well as it can be used to debug and resolve any errors in the model. Please note that the application on MindConnect MQTT agent should first subscribe to this topic ahead of publishing the model.
      tags:
        - name: Asset Model Instantiation Job
      message:
        summary: Receive model instantiation job progress message.
        $ref: '#/components/messages/ModelInstantiationJobProgressMessage'
  'tc/{tenantId}/{clientId}/o/amo_v4/m':
    parameters:
      tenantId:
        $ref: '#/components/parameters/TenantId'
      clientId:
        $ref: '#/components/parameters/ClientId'
    publish:
      operationId: requestAssetModel
      description: >
        Request an entire asset model URL containing all its resource definitions. Upon receiving this request, MindConnect MQTT services sends the asset model URL to this agent via another dedicated topic. The model can be downloaded over HTTPS interface. This ensures the entire model irrespective of its size can be downloaded. Ensure your agent has subscribed to the topic for recieving the model before making this request.
      tags:
        - name: Asset Model
      message:
        summary: Request Asset Model.
        $ref: '#/components/messages/RequestAssetModelMessage'
  'tc/{tenantId}/{clientId}/i/amo_v4/m':
    parameters:
      tenantId:
        $ref: '#/components/parameters/TenantId'
      clientId:
        $ref: '#/components/parameters/ClientId'
    subscribe:
      operationId: receiveAssetModel
      description: |
        Receive entire asset model with all resource definitions.
      tags:
        - name: Asset Model
      message:
        summary: Receive Asset Model.
        $ref: '#/components/messages/ReceiveAssetModelMessage'
  'tc/{tenantId}/{clientId}/o/amo_v4/m/{referenceId}':
    parameters:
      tenantId:
        $ref: '#/components/parameters/TenantId'
      clientId:
        $ref: '#/components/parameters/ClientId'
      referenceId:
        $ref: '#/components/parameters/ReferenceId'
    publish:
      operationId: requestResourceDefinition
      description: >
        Request specific resource definition of asset model for given referenceId.
      tags:
        - name: Asset Model
      message:
        summary: Request Specific Resource of Asset Model.
        $ref: '#/components/messages/RequestAssetModelMessageByRereferenceId'
  'tc/{tenantId}/{clientId}/i/amo_v4/m/{referenceId}':
    parameters:
      tenantId:
        $ref: '#/components/parameters/TenantId'
      clientId:
        $ref: '#/components/parameters/ClientId'
      referenceId:
        $ref: '#/components/parameters/ReferenceId'
    subscribe:
      operationId: receiveResourceDefinition
      description: |
        Receive specific resource definition of asset model for given referenceId.
      tags:
        - name: Asset Model
      message:
        summary: Receive Specific Resource of Asset Model.
        $ref: '#/components/messages/ReceiveAssetModelByReferenceIdMessage'
  'tc/{tenantId}/{clientId}/o/amo_v4/mi/u':
    parameters:
      tenantId:
        $ref: '#/components/parameters/TenantId'
      clientId:
        $ref: '#/components/parameters/ClientId'
    publish:
      operationId: updateResources
      description: >
        Update resources defined in the asset model. One can use this to update already existing resources such as only adding new variable to aspect type or adding new aspect to asset type is allowed. The defined resource can be any of the following resource types: aspect types, aspect type variables, asset types, asset type aspects, asset instances and data point mappings.
      tags:
        - name: Asset Model Instantiation Job
      message:
        summary:  Trigger Asset Model Instantiation Job to Update Resources.
        $ref: '#/components/messages/ModelInstantiationJobUpdateMessage'
  'tc/{tenantId}/{clientId}/o/amo_v4/mi/d/{referenceId}':
    parameters:
      tenantId:
        $ref: '#/components/parameters/TenantId'
      clientId:
        $ref: '#/components/parameters/ClientId'
      referenceId:
        $ref: '#/components/parameters/ReferenceId'
    publish:
      operationId: deleteResource
      description: >
        Delete specific resource of the asset model by using reference ID that is no longer needed. The defined resource can be any of the following resource types: aspect types, aspect type variables, asset types, asset type aspects, asset instances and data point mappings.
      tags:
        - name: Asset Model Deletion Job
      message:
        summary: Trigger Asset Model Instantiation Job to Delete Resource.
        $ref: '#/components/messages/ModelInstantiationJobDeleteMessage'
components:
  messages:
    ModelInstantiationJobMessage:
      name: Asset Model Message
      description: >
        Structure containing models for asset/aspect types, asset instances and
        mappings from provided keys to variables in the specified model.
      payload:
        $ref: '#/components/schemas/ModelInstantiationJobMessageData'
    ModelInstantiationJobProgressMessage:
      name: Instantiation Job Result message
      description: |
        Structure containing instantiation job progress messages.
      payload:
        $ref: '#/components/schemas/ModelInstantiationStatusMessageData'
    RequestAssetModelMessage:
      name: Asset Model request message
      description: >
        Structure containing request for asset model.
      payload:
        $ref: '#/components/schemas/RequestAssetModelMessageData'
    RequestAssetModelMessageByRereferenceId:
      name: Asset Model request message
      description: >
        Structure containing request for specific resource definition of asset model with given referenceId.
      payload:
        $ref: '#/components/schemas/RequestAssetModelMessageData'
    ReceiveAssetModelMessage:
      name: Asset Model Content message
      description: >
        Structure containing id, request id and data. Data containing content. Content is a presigned url which enables to download latest model.
      payload:
        $ref: '#/components/schemas/ReceiveAssetModelMessageData'
    ReceiveAssetModelByReferenceIdMessage:
      name: Asset Model Content by ReferenceId message
      description: >
        Structure containing specific resource definition of asset model with given referenceId.
      payload:
        $ref: '#/components/schemas/ReceiveAssetModelByReferenceIdMessageData'
    ModelInstantiationJobUpdateMessage:
      name: Asset Model Response message
      description: >
        Structure containing id of request and data. Data containing reference id and properties to be updated.
      payload:
        $ref: '#/components/schemas/ModelInstantiationJobUpdateMessageData'
    ModelInstantiationJobDeleteMessage:
      name: Asset Model Response message
      description: >
        Structure containing id of request.
      payload:
        $ref: '#/components/schemas/ModelInstantiationJobDeleteMessageData'

  schemas:
    ModelInstantiationJobMessageData:
      title: ModelInstantiationJobMessageData
      type: object
      description: >-
        Structure containing models for asset/aspect types, asset instances and
        mappings from provided keys to variables in the specified model.
      properties:
        id:
          type: string
          example: 99609765fed2452c8e126814c283a27f
          description: Unique id of message.
          minLength: 1
          maxLength: 32
        data:
          $ref: '#/components/schemas/AssetModelData'
      required:
        - id
        - data
    AssetModelData:
      title: Model
      type: object
      description: >-
        Structure containing model for asset/aspect types, asset instances and
        mappings from provided keys to variables in the specified model.
      properties:
        parentAssetId:
          type: string
          example: 8fd2f7db0d5b4613bb3eb801782cc33a
          description: >-
            Asset id of the asset that will be used as parent asset for the
            model. All asset instance models without a parent reference id in
            model will be direct child of this asset. If not provided, all asset
            instance models will be child of agent asset.
        typeModel:
          $ref: '#/components/schemas/TypeModel'
        instanceModel:
          $ref: '#/components/schemas/InstanceModel'
        mappingModel:
          $ref: '#/components/schemas/MappingModel'
      required:
        - typeModel
        - instanceModel
        - mappingModel
        - externalId
    TypeModel:
      title: Type Model
      type: object
      description: 'Model containing asset type and aspect type specifications.'
      properties:
        aspectTypes:
          type: array
          minItems: 0
          maxItems: 100
          items:
            $ref: '#/components/schemas/AspectType'
        assetTypes:
          type: array
          minItems: 0
          maxItems: 100
          items:
            $ref: '#/components/schemas/AssetType'
      required:
        - aspectTypes
        - assetTypes
    AspectType:
      title: AspectType
      type: object
      description: 'Aspect types are pre-configured templates for aspects. The advantage of aspects types is to use one type for several assets'
      properties:
        id:
          $ref: '#/components/schemas/AspectTypeId'
        name:
          type: string
          description: >-
            Name of the aspect type. It has to be unique inside the tenant and
            cannot be changed later.
          pattern: '^[a-zA-Z0-9_]+'
          minLength: 1
          maxLength: 128
          example: 'wingAspectType'
        category:
          type: string
          enum:
            - static
            - dynamic
          description: >-
            If the aspect-type is used for static data or time-series. Cannot be
            changed once the aspect-type is created.
        scope:
          type: string
          enum:
            - public
            - private
          default: private
          example: private
          description: >-
            Visibility of aspect type. Setting this property to public makes it
            available to other tenants. Private types are only visible to the
            user's own tenant. Currently only private types can be created.
        variables:
          type: array
          description: >-
            Variables of the aspect-type. Variable names should be unique inside
            an aspect-type. Only variables of static aspect-type
            can have default values.
          minItems: 0
          maxItems: 100
          items:
            $ref: '#/components/schemas/AspectVariable'
        description:
          type: string
          description: The description of the aspect type
          example: wing aspect type description
        referenceId:
          type: string
          description: Reference id of this aspect type.
          example: wingAspectTypeRefId
      required:
        - id
        - name
        - category
        - variables
    AspectTypeId:
      type: string
      minLength: 1
      maxLength: 128
      pattern: '[A-Za-z0-9_]{1,8}\.[A-Za-z0-9_]+'
      description: >-
        The aspect type's id is a unique identifier. The id's length must be
        between 1 and 128 characters and matches the following symbols "A-Z",
        "a-z", "0-9", "_" and "." beginning with the tenant prefix what has a
        maximum of 8 characters. (e.g . ten_pref.type_id). Once set cannot be
        changed.
      example: mdsp.wingAspectType
    AspectVariable:
      type: object
      allOf:
        - $ref: '#/components/schemas/VariableDefinition'
        - properties:
            qualityCode:
              type: boolean
              default: false
              description: >-
                Indicates whether the variable has quality code. Cannot be
                changed.
              example: true
    VariableDefinition:
      type: object
      required:
        - name
        - dataType
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 64
          pattern: '[a-zA-Z_][a-zA-Z0-9_]*'
          description: >-
            Name of the variable. Reserved words
            (id, name, description, tenant, etag, scope, properties,
            propertySets, extends, variables, aspects, parentTypeId) cannot be
            used as variable names.
          example: temperature
        dataType:
          type: string
          enum:
            - BOOLEAN
            - INT
            - LONG
            - DOUBLE
            - STRING
            - TIMESTAMP
            - BIG_STRING
          description: >-
            Data type of the variable. BIG_STRING could only be used by
            variables in dynamic aspect-types. Cannot be changed.
          example: STRING
        unit:
          type: string
          maxLength: 32
          pattern: '[^\'']*'
          description: Unit of measurement. Cannot be changed.
          example: C/F
        searchable:
          type: boolean
          default: false
          description: >-
            Indicates whether sorting and filtering is allowed on this variable.
            Only usable for static properties. Cannot be changed.
          example: true
        length:
          type: integer
          minimum: 1
          maximum: 100000
          description: >-
            The max length of the variable's value. The length field is only
            used for variables of string or big_string dataType. Max length for
            string is 255 and max length for big_string 100000. Cannot be
            changed.
          example: 5
        defaultValue:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            The default value of the variable. It must be compatible with the
            dataType! The default value will be inherited by the asset type's
            child types and by the asset instantiating it. It can be defined in
            aspect types and asset types.
          example: 25/77
        referenceId:
          type: string
          description: Reference id of this variable.
          example: temperatureVariableReferenceId
    AssetType:
      title: AssetType
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AssetTypeId'
        name:
          type: string
          description: The type's name.
          pattern: '[\p{L}_0-9_\. -]+'
          minLength: 1
          maxLength: 128
          example: wingAssetType
        parentTypeId:
          type: string
          description: >-
            The asset type's id is a unique identifier. The id's length must be
            between 1 and 128 characters and matches the following symbols
            "A-Z", "a-z", "0-9", “_” and “.” beginning with the tenant prefix
            what has a maximum of 8 characters. (e.g . ten_pref.type_id). Once
            set cannot be changed.
          example: core.basicasset
          minLength: 1
          maxLength: 128
          pattern: '[A-Za-z0-9_]{1,8}\.[A-Za-z0-9_]+'
        aspects:
          type: array
          minItems: 1
          maxItems: 100
          items:
            $ref: '#/components/schemas/AspectInstance'
        description:
          type: string
          description: description
          maxLength: 255
          example: Hyperspace jump capable space ship
        instantiable:
          type: boolean
          default: true
          example: true
          description: >-
            If instances can be created from this type. A non-instantiable type
            could be changed to be instantiable but not the other way around.
        scope:
          type: string
          enum:
            - public
            - private
          default: private
          example: private
          description: >-
            Visibility of the asset type. Setting this property to public makes
            it available to other tenants. Private types are only visible to the
            user's own tenant. Currently only private types could be created.
        referenceId:
          type: string
          description: Reference id of this asset type.
          example: wingAssetTypeRefId
      required:
        - id
        - name
        - parentTypeId
    AssetTypeId:
      type: string
      minLength: 1
      maxLength: 128
      pattern: '[A-Za-z0-9_]{1,8}\.[A-Za-z0-9_]+'
      description: >-
        The asset type's id is a unique identifier. The id's length must be
        between 1 and 128 characters and matches the following symbols "A-Z",
        "a-z", "0-9", "_" and "." beginning with the tenant prefix what has a
        maximum of 8 characters. (e.g . ten_pref.type_id). Once set cannot be
        changed.
      example: mdsp.wingAssetType
    AspectInstance:
      title: AspectInstance
      type: object
      properties:
        name:
          type: string
          description: >-
            Name of the aspect. It has to be unique inside the type-family
            (ancestors and descendants). Reserved words (id,
            name, description, tenant, etag, scope, properties, propertySets,
            extends, variables, aspects, parentTypeId) cannot be used as aspect
            names.
          minLength: 1
          maxLength: 64
          pattern: '[a-zA-Z0-9_]+'
          example: wingAspect
        aspectTypeId:
          $ref: '#/components/schemas/AspectTypeId'
        referenceId:
          type: string
          description: Reference id of this aspect type.
          example: wingAspectRefId
      required:
        - name
        - aspectTypeId
    InstanceModel:
      title: Instance Model
      type: object
      description: Model containing asset specifications.
      properties:
        assets:
          type: array
          minItems: 0
          maxItems: 100
          description: List of assets to be created.
          items:
            $ref: '#/components/schemas/AssetDescription'
      required:
        - assets
    AssetDescription:
      title: Asset Description
      type: object
      x-tags:
        - Instance Model Jobs
      description: Model describing a single asset instance.
      properties:
        referenceId:
          type: string
          description: >-
            An id unique per instance model which can be used to refer to this
            asset from other places within this model.
          example: wingAssetReferenceId
        parentReferenceId:
          type: string
          description: >-
            Reference id of the asset within this model. If not specified, this
            asset instance is created under model parent asset.
          example: root
        typeId:
          $ref: '#/components/schemas/AssetTypeId'
        name:
          type: string
          description: Name of the asset to be created.
          pattern: '[^\/\\]*'
          minLength: 1
          maxLength: 128
          example: wingAsset
        description:
          type: string
          description: The description of the asset
          maxLength: 255
          example: The ship of Han Solo and Chewbacca
      required:
        - referenceId
        - typeId
        - name
    MappingModel:
      title: MappingModel
      type: object
      description: >-
        Model consisting of a list of mappings from keys to variables residing
        in a specific asset instance's aspect.
      properties:
        mappings:
          type: array
          minItems: 0
          maxItems: 1000
          items:
            $ref: '#/components/schemas/Mapping'
      required:
        - mappings
    Mapping:
      title: Mapping
      example:
        dataPointId: dp01
        assetReferenceId: wingAssetReferenceId
        aspectName: wingAspect
        variableName: temperature
        referenceId: temperatureDataPointReferenceId
      type: object
      description: >-
        Describes a key-value mapping where key is specified with key and
        value(destination) is specified by
        assetReferenceId/aspectName/variableName tuple.
      properties:
        dataPointId:
          type: string
          description: Mapping key of this mapping.
          example: dp01
        assetReferenceId:
          type: string
          description: >-
            Unique identifier of data asset. If `assetId` is provided,
            `assetReferenceId` will be ignored. This datapoint will be mapped
            for this `assetId`.
          example: wingAssetReferenceId
        assetId:
          type: string
          description: >-
            Unique identifier of data asset. If `assetId` is provided,
            `assetReferenceId` will be ignored. This datapoint will be mapped
            for this `assetId`.
          example: 30d88a9a71d711eb94390242ac130002
        aspectName:
          type: string
          description: Name of the aspect within destination asset.
          example: wingAspect
        variableName:
          type: string
          description: Name of variable within destination aspect.
          example: temperature
        referenceId:
          type: string
          description: Reference id of this mapping
      required:
        - dataPointId
        - aspectName
        - variableName
    ModelInstantiationStatusMessageData:
      title: ModelInstantiationStatusMessageData
      type: object
      properties:
        id:
          type: string
          description: Unique id of message.
          readOnly: true
          example: 451a4a3989de4e8a93c3c2358870b39z
          minLength: 1
          maxLength: 32
        requestId:
          type: string
          description: >-
            Id of the message that triggered this instantiation job. This field
            can only be undefined if the message triggered this instantiation
            job was malformed (i.e. missing an id attribute).
          readOnly: true
          example: 99609765fed2452c8e126814c283a27f
          minLength: 1
          maxLength: 32
        data:
          type: object
          $ref: '#/components/schemas/ModelInstantiationStatusData'
          description: Structure containing properties for instantiation job result.
      required:
        - id
        - data
    ModelInstantiationStatusData:
      title: ModelInstantiationStatusData
      type: object
      description: >-
        Structure containing identifiers of instantiation and status of
        instantiation job.
      properties:
        id:
          type: string
          example: 59609765fed2452c8e126814c283a27f
          description: >-
            Id of instantiation job created. This field can be undefined if job
            creation failed.
        modelId:
          type: string
          example: 89609765fed2452c8e126814c283a27f
          description: Id of the model. This field can be undefined if job creation failed.
        message:
          type: string
          readOnly: true
          example: 100% completed.
          description: Message about current status of request.
        status:
          type: string
          enum:
            - Success
            - InProgress
            - Failed
          readOnly: true
        errors:
          type: array
          minItems: 1
          maxItems: 100
          description: >-
            Error messages about this intantiation job. This field contains
            errors related to instantiation job creation and instantiation
            progress.
          items:
            $ref: '#/components/schemas/ModelInstantiationError'
          readOnly: false
        resources:
          type: array
          minItems: 1
          maxItems: 100
          description: >-
            Resource creation status about this model instantiation job. This field is available If resources are getting created. This field contains resource name, resource referecence id and resource id if available.
          items:
            $ref: '#/components/schemas/CreatedResourceData'
          readOnly: false
      required:
        - message
        - status
    CreatedResourceData:
      title: CreatedResourceData
      type: object
      description: Information about created resources.
      properties:
        referenceId:
          type: string
          description: Reference id of instantiated resource.
          example: temperatureVariableRefId
        resourceId:
          type: string
          description: Resource id of instantiated resource.
          example: 19e9048e78f540e7a9ba25e1249fea9b
        resourceName:
          type: string
          description: Resource name of instantiated resource.
          example: temperature
      required:
        - referenceId
    ModelInstantiationError:
      title: ModelInstantiationError
      type: object
      description: Error response body model.
      properties:
        code:
          type: string
          description: InsightsHub error code
          example: mdsp.core.generic.invalidRequestBodyProperty
        logref:
          type: string
          description: CorrelationId of message
          example: ff4e48ff-0dbc-40d0-8ffd-9a7a8188d82a
        message:
          type: string
          description: Error message description
          example: >-
            {aspectType.id} matches the following symbols \"A-Z\", \"a-z\",
            \"0-9\", “_” and “.” beginning with the tenant prefix what has a
            maximum of 8 characters. (e.g . ten_pref.type_id)"
        referenceId:
          type: string
          description: Reference id of instantiated resource.
          example: temperatureDataPointReferenceId
    RequestAssetModelError:
      title: RequestAssetModelError
      type: object
      description: Error response body model.
      properties:
        code:
          type: string
          description: InsightsHub error code
          example: mdsp.core.assetmodeler.referenceIdNotFound
        logref:
          type: string
          description: CorrelationId of message
          example: ff4e48ff-0dbc-40d0-8ffd-9a7a8188d82a
        message:
          type: string
          description: Error message description
          example: >-
            Reference id: dc59100e63b34e259af6d9a94e5a704c is not found!
    RequestAssetModelMessageData:
      title: RequestAssetModelMessageData
      type: object
      properties:
        id:
          type: string
          description: Unique id of message.
          readOnly: true
          example: 65da4a3989de4e8a93c3c2358875g3g4
          minLength: 1
          maxLength: 32
    ReceiveAssetModelMessageData:
      title: ModelResponseData
      type: object
      description: >-
        Structure containing models for asset/aspect types, asset instances and
        mappings.
      properties:
        id:
          type: string
          example: 14609761sdv245248e126814c283a27f
          description: Unique id of message.
          minLength: 1
          maxLength: 32
        requestId:
          type: string
          description: >-
            Id of the message that triggered this instantiation job. This field
            can only be undefined if the message triggered this instantiation
            job was malformed (i.e. missing an id attribute).
          readOnly: true
          example: 65da4a3989de4e8a93c3c2358875g3g4
          minLength: 1
          maxLength: 32
        data:
          $ref: '#/components/schemas/ReceiveAssetModel'
      required:
        - id
        - data
    ReceiveAssetModel:
      title: Model
      type: object
      description: >-
        Structure containing models for asset/aspect types, asset instances and
        mappings from provided keys to variables in the specified model.
      properties:
        content:
          type: string
          example: https://your-bucket-name.s3.amazonaws.com/path/to/your/object/file.json?AWSAccessKeyId=YOUR_ACCESS_KEY_ID&Expires=EXPIRATION_TIMESTAMP&Signature=SIGNATURE
          description: "Presigned url which contains model to download. Presigned url is valid for one day"
        status:
          type: string
          enum:
            - Success
            - Failed
          readOnly: true
        errors:
          type: array
          minItems: 1
          maxItems: 100
          description: >-
            Error messages about this requested message.
          items:
            $ref: '#/components/schemas/RequestAssetModelError'
          readOnly: false
      required:
        - content
        - status
    ReceiveAssetModelByReferenceIdMessageData:
      title: ReceiveAssetModelByReferenceIdMessageData
      type: object
      description: >-
        Structure containing portion of asset model for given reference id.
      properties:
        id:
          type: string
          example: 72609761sdv245248e126814c283a27f
          description: Unique id of message.
          minLength: 1
          maxLength: 32
        requestId:
          type: string
          description: >-
            Id of the message that triggered this instantiation job. This field
            can only be undefined if the message triggered this instantiation
            job was malformed (i.e. missing an id attribute).
          readOnly: true
          example: 65da4a3989de4e8a93c3c2358875g3g4
          minLength: 1
          maxLength: 32
        data:
          $ref: '#/components/schemas/ReceiveAssetModelByReferenceId'
      required:
        - id
        - data
    ReceiveAssetModelByReferenceId:
      title: Model
      type: object
      description: >-
        Structure containing portion of model for given reference id.
      properties:
        wingAssetReferenceId:
          $ref: '#/components/schemas/AssetDescription'
        status:
          type: string
          enum:
            - Success
            - Failed
          readOnly: true
        errors:
          type: array
          minItems: 1
          maxItems: 100
          description: >-
            Error messages about this requested message.
          items:
            $ref: '#/components/schemas/RequestAssetModelError'
          readOnly: false
      required:
        - wingAssetReferenceId
        - status
    ModelInstantiationJobUpdateMessageData:
      title: ModelInstantiationJobUpdateMessageData
      type: object
      description: >-
        Structure containing id of request and data. Data containing reference id and properties to be updated.
      properties:
        id:
          type: string
          example: 72609761sdv245248e126814c283a27f
          description: Unique id of message.
          minLength: 1
          maxLength: 32
        data:
          $ref: '#/components/schemas/ModelInstantiationJobUpdateData'
      required:
        - id
        - data
    ModelInstantiationJobUpdateData:
      title: Update Model
      type: object
      description: Structure key value pairs. Key is reference id of property to be updated. Value of key is the actual properties to update.
      properties:
        temperatureVariableReferenceId:
          type: string
          minLength: 1
          maxLength: 64
          example: {"name":"temperatureNewName"}
        wingAssetReferenceId:
          type: string
          minLength: 1
          maxLength: 64
          example: {"name":"wingAssetNewName","description":"Upgraded wing asset version"}
    ModelInstantiationJobDeleteMessageData:
      title: ModelInstantiationJobDeleteMessageData
      type: object
      description: >-
        Structure containing id of request.
      properties:
        id:
          type: string
          example: 72609761sdv245248e126814c283a27f
          description: Unique id of message.
          minLength: 1
          maxLength: 32
      required:
        - id
        - data
  parameters:
    ClientId:
      description: >-
        MQTT client id. See the Insights Hub Developer Documentation overview page
        for this API to get more details.
      schema:
        type: string
        example: mytenant_Client001
    TenantId:
      description: >-
        Id of tenant which client belongs to. See the Insights Hub Developer
        Documentation overview page for this API to get more details.
      schema:
        type: string
        example: mytenant
    ReferenceId:
      description: >-
        Id of reference.
      schema:
        type: string
        example: 01hcq0ajwnvhf80cg22ka3jvwc
