设备接入 IOTDA-产品添加通知:请求示例

时间:2024-06-28 09:24:58

请求示例

产品添加通知示例:

产品添加通知

{
  "resource" : "product",
  "event" : "create",
  "event_time" : "20151212T121212Z",
  "event_time_ms" : "2015-12-12T12:12:12.000Z",
  "request_id" : "3fe58d5e-8697-4849-a165-7db128f7e776",
  "notify_data" : {
    "body" : {
      "app_name" : "testAPP01",
      "protocol_type" : "CoAP",
      "data_format" : "binary",
      "service_capabilities" : [ {
        "service_type" : "temperature",
        "service_id" : "temperature",
        "description" : "temperature",
        "properties" : [ {
          "unit" : "centigrade",
          "min" : "1",
          "method" : "R",
          "max" : "100",
          "data_type" : "decimal",
          "description" : "force",
          "step" : 0.1,
          "default_value" : {
            "color" : "red",
            "size" : 1
          },
          "enum_list" : [ "string" ],
          "required" : true,
          "property_name" : "temperature",
          "max_length" : 100
        } ],
        "commands" : [ {
          "command_name" : "reboot",
          "responses" : [ {
            "response_name" : "ACK",
            "paras" : [ {
              "unit" : "km/h",
              "min" : "1",
              "max" : "100",
              "para_name" : "force",
              "data_type" : "string",
              "description" : "force",
              "step" : 0.1,
              "enum_list" : [ "string" ],
              "required" : false,
              "max_length" : 100
            } ]
          } ],
          "paras" : [ {
            "unit" : "km/h",
            "min" : "1",
            "max" : "100",
            "para_name" : "force",
            "data_type" : "string",
            "description" : "force",
            "step" : 0.1,
            "enum_list" : [ "string" ],
            "required" : false,
            "max_length" : 100
          } ]
        } ],
        "events" : [ {
          "event_type" : "reboot",
          "paras" : [ {
            "unit" : "km/h",
            "min" : "1",
            "max" : "100",
            "para_name" : "force",
            "data_type" : "string",
            "description" : "force",
            "step" : 0.1,
            "enum_list" : [ "string" ],
            "required" : false,
            "max_length" : 100
          } ]
        } ],
        "option" : "Mandatory"
      } ],
      "create_time" : "20190303T081011Z",
      "product_id" : "5ba24f5ebbe8f56f5a14f605",
      "name" : "Thermometer",
      "description" : "this is a thermometer produced by Huawei",
      "device_type" : "Thermometer",
      "industry" : "smartCity",
      "manufacturer_name" : "ABC",
      "app_id" : "jeQDJQZltU8iKgFFoW060F5SGZka"
    }
  }
}
support.huaweicloud.com/api-iothub/iot_06_v5_01209.html