物模型引擎API

Download OpenAPI specification:Download

物模型引擎API

读取设备的单个属性

path Parameters
thingId
required
string

设备ID

propertyName
required
string

属性名称

query Parameters
productBase
Array of strings
Default: ["false"]
        产品库代号,可选值:
        - remac-life-product
        - remac-community
tmMethod
string
        物映射实现方式,可选值:
        - thirdparty-mideaIoT
        - remac-life-messageRouter-passthrough
        - remac-community-mqtt
msgId
string

消息ID

productId
Array of strings
Default: ["false"]

产品ID

retrunSchema
boolean
Default: false

是否返回schema

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "schema": {
    }
}

设置设备的单个属性

path Parameters
thingId
required
string

设备ID

propertyName
required
string

属性名称

Request Body schema: application/json
empty
boolean
object
property name*
object

Responses

Request samples

Content type
application/json
Example

所设置属性的类型为String

{
  • "msgId": "消息ID",
  • "productBase": "产品库代号",
  • "productId": "产品ID",
  • "tmMethod": "可选,物映射实现方式",
  • "data": "xxx",
  • "extras": {
    }
}

Response samples

Content type
application/json
"string"

读取设备的多个或所有属性

path Parameters
thingId
required
string

设备ID

query Parameters
productBase
Array of strings
Default: ["false"]
        产品库代号,可选值:
        - remac-life-product
        - remac-community
tmMethod
string
        物映射实现方式,可选值:
        - thirdparty-mideaIoT
        - remac-life-messageRouter-passthrough
        - remac-community-mqtt
msgId
string

消息ID

productId
Array of strings
Default: ["false"]

产品ID

propertyNames
Array of strings

需读取的属性名称列表,以半角逗号分隔,为空则默认读取所有属性

retrunSchema
boolean
Default: false

是否返回schema

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "schema": {
    }
}

设置设备的多个属性

path Parameters
thingId
required
string

设备ID

Request Body schema: application/json
empty
boolean
object
property name*
object

Responses

Request samples

Content type
application/json
{
  • "msgId": "消息ID",
  • "productBase": "产品库代号",
  • "productId": "产品ID",
  • "tmMethod": "可选,物映射实现方式",
  • "data": {
    },
  • "extras": {
    }
}

Response samples

Content type
application/json
"string"

顺序设置设备的多个属性

path Parameters
thingId
required
string

设备ID

Request Body schema: application/json
empty
boolean
object
property name*
object

Responses

Request samples

Content type
application/json
{
  • "msgId": "消息ID",
  • "productBase": "产品库代号",
  • "productId": "产品ID",
  • "tmMethod": "可选,物映射实现方式",
  • "data": [
    ],
  • "extras": {
    }
}

Response samples

Content type
application/json
"string"

透传业务数据或设备数据

path Parameters
thingId
required
string

设备ID

query Parameters
msgId
string

消息ID

tmMethod
string

物映射实现方式

productBase
Array of strings
Default: ["false"]

产品库代号

productId
Array of strings
Default: ["false"]

产品ID

Request Body schema: application/json

透传内容,目前只支持JSON对象或数组,内部数据结构视物映射实现而定

string

Responses

Request samples

Content type
application/json
"string"

执行设备的单个动作

path Parameters
thingId
required
string

设备ID

actionName
required
string

动作名称

Request Body schema: application/json
empty
boolean
object
property name*
object

Responses

Request samples

Content type
application/json
{
  • "msgId": "消息ID",
  • "productBase": "产品库代号",
  • "productId": "产品ID",
  • "needResponse": "是否需要返回,默认false",
  • "tmMethod": "可选,物映射实现方式",
  • "input": {
    },
  • "extras": {
    }
}

Response samples

Content type
application/json
{
  • "output": {
    },
  • "schema": {
    }
}

获取设备在线状态

path Parameters
thingId
required
string

设备ID

query Parameters
productBase
Array of strings
Default: ["false"]
        产品库代号,可选值:
        - remac-life-product
        - remac-community

Responses

Response samples

Content type
application/json
{
  • "channelId": "xxx",
  • "thingId": "xxx",
  • "online": true,
  • "time": "1642996559000"
}