ThingDatapoint Struct | 
Unit Struct 
Multiplier 
Error Codes
Samples
Search Thing Model
Update Thing Model
 Other References 
            
        
    
    
    
      
          
          
          
            
            
              
  
    
      - Documentation
 
        
      - Get Thing Model
 
    
    
      
        - 
          
            
              
              
            
            
          
        
 
      
    
   
 
              
  
Get Thing Model
  
Get the model related information using its modelId. 
  
If you need to invoke this API after Update Thing Model API, it is recommended to wait for about 2 seconds to avoid obtaining unupdated data. 
Request Parameters (URI)
  
Name  | 
Location (Path/Query)  | 
Required/Optional  | 
Data Type  | 
Description  | 
 
orgId  | 
Query  | 
Required  | 
String  | 
The OU ID which the model belongs to. How to get orgId>>  | 
 
scope  | 
Query  | 
Optional  | 
Integer  | 
 | 
 
modelId  | 
Query  | 
Required  | 
String  | 
The model ID. How to get modelID>>  | 
 
 
Response Parameters
  
Name  | 
Data Type  | 
Description  | 
 
data  | 
ThingModel Struct  | 
The thing model. For more information on ThingModel struct, see ThingModel Struct.  | 
 
 
ThingModel Struct 
  
Name  | 
Data Type  | 
Description  | 
 
modelId  | 
String  | 
The model ID.  | 
 
modelIdPath  | 
String  | 
The model ID path.  | 
 
orgId  | 
String  | 
The OU ID that created this model. For example, if a model in OU B is created by sharing from OU A, when you query the information of that model in OU B, the returned ID will be from OU A.  | 
 
name  | 
StringI18n  | 
The model name, supports internationalization. For more details on the structure and locales supported, see Internationalized name struct.  | 
 
desc  | 
String  | 
The model description.  | 
 
category  | 
String  | 
Model category. In EnOS 3.0.0 Model Management, model categories are no longer defined, and the categories of existing models will be added to the models as tags.  | 
 
tags  | 
Map  | 
User-defined tags. (The Key and Value are of String type.)  | 
 
attributes  | 
Map  | 
The key is the static attribute ID, of String type, and the value is of the ThingAttribute Struct. For more information, see ThingAttribute Struct.  | 
 
measurepoints  | 
Map  | 
The key is the measurement point ID, of String type, and the value is of the ThingMeasurepoint Struct. For more information, see ThingMeasurepoint Struct.  | 
 
services  | 
Map  | 
The key is the service ID(i.e. command ID in EnOS Model Management), of String type, and the value is of the ThingService Struct. For more information, see ThingService Struct.  | 
 
 
ThingAttribute Struct 
  
Name  | 
Data Type  | 
Description  | 
 
identifier  | 
String  | 
The attribute ID.  | 
 
dataType  | 
String  | 
The data type. E.g.: ARRAY, BOOL, DATE, ENUM, INT, FLOAT, DOUBLE, STRUCT, STRING, TIMESTAMP, FILE  | 
 
dataDefinition  | 
String  | 
The data definition of the dataType in this structure, which is a JSON string. For example, when the dataType is “STRING”, it defines the string length; when the dataType is “ENUM”, it defines the value and description. How to use dataDefinition>>  | 
 
isRequired  | 
Boolean  | 
If true, the value of this attribute must be set when the asset is instantiated; otherwise the asset will return a validation failure error when it is created.  | 
 
defaultValue  | 
As defined in the thing model  | 
The default value of the attribute. If the attribute has no default value, defaultValue would be null. Note: EnOS Edge does not support this parameter.  | 
 
name  | 
StringI18n  | 
The attribute name, supports internationalization. For more details on the structure and locales supported, see Internationalized name struct.  | 
 
i18nDesc  | 
StringI18n  | 
The attribute description, supports internationalization. For more details on the structure and locales supported, see Internationalized name struct.  | 
 
tags  | 
Map  | 
User-defined tags. (The Key and Value are of String type.)  | 
 
isStdElement  | 
Boolean  | 
 Note: EnOS Edge does not support this parameter. 
 | 
 
stdElementId  | 
String  | 
The URN of the element if isStdElement is true . The format is urn:enos:modelelement:std: <id> : <version> . id is the element ID. <version> is the version of the element. 
If isStdElement is false , then stdElementId is null. 
Note: EnOS Edge does not support this parameter. 
 | 
 
unit  | 
Unit Struct  | 
For more information, see Unit Struct.  | 
 
 
ThingMeasurepoint Struct 
  
Name  | 
Data Type  | 
Description  | 
 
identifier  | 
String  | 
The ID of the measurement point.  | 
 
dataType  | 
String  | 
Data type. E.g.: ARRAY, DATE, ENUM, INT, FLOAT, DOUBLE, STRUCT, STRING, TIMESTAMP, FILE  | 
 
dataDefinition  | 
String  | 
The data definition of the dataType in this structure, which is a JSON string. For example, when the dataType is “STRING”, it defines the string length; when the dataType is “ENUM”, it defines the value and description. How to use dataDefinition>>  | 
 
name  | 
StringI18n  | 
The measurement point name, supports internationalization. For more details on the structure and locales supported, see Internationalized name struct.  | 
 
i18nDesc  | 
StringI18n  | 
The measurement point description, supports internationalization. For more details on the structure and locales supported, see Internationalized name struct.  | 
 
tags  | 
Map  | 
User-defined tags. (The Key and Value are of String type.)  | 
 
isStdElement  | 
Boolean  | 
 Note: EnOS Edge does not support this parameter. 
 | 
 
stdElementId  | 
String  | 
The URN of the element if isStdElement is true . The format is urn:enos:modelelement:std: <id> : <version> . id is the element ID. <version> is the version of the element. 
If isStdElement is false , then stdElementId is null. 
Note: EnOS Edge does not support this parameter. 
 | 
 
hasQuality  | 
Boolean  | 
 | 
 
signalType  | 
String  | 
The signal/point type. E.g.: Generic, AI, PI, DI  | 
 
unit  | 
Unit Struct  | 
For more information, see Unit Struct.  | 
 
 
ThingService Struct 
  
Name  | 
Data Type  | 
Description  | 
 
identifier  | 
String  | 
The service ID(i.e. command ID in EnOS Model Management).  | 
 
name  | 
StringI18n  | 
The service name(i.e. command name in EnOS Model Management), supports internationalization. For more details on the structure and locales supported, see Internationalized name struct.  | 
 
i18nDesc  | 
StringI18n  | 
The service description(i.e. command description in EnOS Model Management), supports internationalization. For more details on the structure and locales supported, see Internationalized name struct.  | 
 
tags  | 
Map  | 
User-defined tags. (The Key and Value are of String type.)  | 
 
isStdElement  | 
Boolean  | 
 Note: EnOS Edge does not support this parameter. 
 | 
 
stdElementId  | 
String  | 
The URN of the element if isStdElement is true . The format is urn:enos:modelelement:std: <id> : <version> . id is the element ID. <version> is the version of the element. 
If isStdElement is false , then stdElementId is null. 
Note: EnOS Edge does not support this parameter. 
 | 
 
inputData  | 
ThingDatapoint Struct  | 
The service’s input parameters list. For more information, see ThingDatapoint Struct.  | 
 
outputData  | 
ThingDatapoint Struct  | 
The service’s output parameters list. For more information, see ThingDatapoint Struct.  | 
 
callType  | 
String  | 
The calling type. This parameter will be deprecated. 
ASYNC: Asynchronous.
  
SYNC: Synchronous.
  
 
 | 
 
 
ThingDatapoint Struct | 
 
  
Name  | 
Data Type  | 
Description  | 
 
identifier  | 
String  | 
The data point ID.  | 
 
dataType  | 
String  | 
Data type. E.g.: ARRAY, DATE, ENUM, INT, FLOAT, DOUBLE, STRUCT, STRING, TIMESTAMP, FILE  | 
 
dataDefinition  | 
String  | 
The data definition of the dataType in this structure, which is a JSON string. For example, when the dataType is “STRING”, it defines the string length; when the dataType is “ENUM”, it defines the value and description. How to use dataDefinition>>  | 
 
name  | 
StringI18n  | 
The data point name, supports internationalization. For more details on the structure and locales supported, see Internationalized name struct.  | 
 
i18nDesc  | 
StringI18n  | 
The data point description, supports internationalization. For more details on the structure and locales supported, see Internationalized name struct.  | 
 
tags  | 
Map  | 
User-defined tags. (The Key and Value are of String type.)  | 
 
isStdElement  | 
Boolean  | 
 Note: EnOS Edge does not support this parameter. 
 | 
 
stdElementId  | 
String  | 
The URN of the element if isStdElement is true . The format is urn:enos:modelelement:std: <id> : <version> . id is the element ID. <version> is the version of the element. 
If isStdElement is false , then stdElementId is null. 
Note: EnOS Edge does not support this parameter. 
 | 
 
unit  | 
Unit Struct  | 
For more information, see Unit Struct.  | 
 
isRequired  | 
Boolean  | 
Applicable only for service inputData. If true (default) and defaultValue is null, the value of this data point must be given when invoking the service. 
Note: EnOS Edge does not support this parameter. 
 | 
 
defaultValue  | 
Depends on the data type  | 
The default value of the data point. If the data point has no default value, defaultValue would be null. Applicable only for service inputData. 
Note: EnOS Edge does not support this parameter. 
 | 
 
 
Unit Struct 
  
Name  | 
Data Type  | 
Description  | 
 
unitId  | 
String  | 
The unit ID.  | 
 
multiplier  | 
String  | 
The multiplier of the unit. For more information, see Multiplier.  | 
 
 
Multiplier 
  
The multiplier of the unit can have the following values: 
YOTTA ,//Y     10^24
ZETTA ,//Z     10^21
EXA   ,//E     10^18
PETA  ,//P     10^15
TERA  ,//T     10^12
GIGA  ,//G     10^9
MEGA  ,//M     10^6
KILO  ,//k     10^3
HECTO ,//h     10^2
DECA  ,//da    10^1
ONE   ,//      10^0
DECI  ,//d     10^-1
CENTI ,//c     10^-2
MILLI ,//m     10^-3
MICRO ,//μ     10^-6
NANO  ,//n     10^-9
PICO  ,//p     10^-12
FEMTO ,//f     10^-15
ATTO  ,//a     10^-18
ZEPTO ,//z     10^-21
YOCTO ,//y     10^-24
  
 
Samples
Request Sample
  
url: https://{apigw-address}/model-service/v2.1/thing-models?action=get&orgId=yourOrgId&modelId=yourModelId
method: GET
 
 
Response Sample
{
   "code":0,
   "msg":"OK",
   "requestId":"41e3da4c-9e40-47e5-b202-58f946b294c5",
   "data":{
      "modelId":"yourModel",
      "modelIdPath":"/yourModel",
      "orgId":"yourOrgId",
      "name":{
         "defaultValue":"yourModel",
         "i18nValue":{
            "en_US":"",
            "zh_CN":""
         }
      },
      "desc":"yourModel",
      "tags":{
         "group":"1"
      },
      "attributes":{
         "capacity":{
            "identifier":"capacity",
            "name":{
               "defaultValue":"capacity",
               "i18nValue":{
                  "en_US":"capacity",
                  "zh_CN":"容量"
               }
            },
            "i18nDesc":{
               "defaultValue":"Capacity",
               "i18nValue":{
                  "en_US":"Capacity",
                  "zh_CN":"容量"
               }
            },
            "tags":{
               "cap":"1"
            },
            "stdElementId":"urn:user:modelelement:std:atom-property-int:1.0",
            "isStdElement":true,
            "dataType":"INT",
            "unit":{
               "unitId":"G",
               "multiplier":"ONE"
            },
            "dataDefinition":null,
            "isRequired":true,
            "defaultValue":111
         }
      },
      "measurepoints":{
         "ActiveSC":{
            "identifier":"ActiveSC",
            "name":{
               "defaultValue":"ActiveSC_Name",
               "i18nValue":{
                  "en_US":"ActiveSC_Name",
                  "zh_CN":"活动状态字"
               }
            },
            "i18nDesc":{
               "defaultValue":"ActiveSC desc",
               "i18nValue":{
                  "en_US":"ActiveSC desc",
                  "zh_CN":"活动状态描述"
               }
            },
            "tags":{
            },
            "stdElementId":null,
            "isStdElement":false,
            "dataType":"INT",
            "unit":null,
            "dataDefinition":null,
            "hasQuality":false,
            "signalType":"DI"
         },
         "windspeed_90":{
            "identifier":"windspeed_90",
            "name":{
               "defaultValue":"windspeed_90",
               "i18nValue":{
                  "en_US":"windspeed_90"
               }
            "i18nDesc":{
               "defaultValue":"90m wind speed",
               "i18nValue":{
                  "en_US":"90m wind speed",
                  "zh_CN":"90m 风速"
               }
            },
            "tags":{
            },
            "stdElementId":null,
            "isStdElement":false,
            "dataType":"DOUBLE",
            "unit":{
               "unitId":"m/s",
               "multiplier":"ONE"
            },
            "dataDefinition":null,
            "hasQuality":false,
            "signalType":"Generic"
         },
         "windspeed_80_identity":{
            "identifier":"windspeed_80_identity",
            "name":{
               "defaultValue":"windspeed_80",
               "i18nValue":{
                  "en_US":"windspeed_80"
               }
            },
            "i18nDesc":{
               "defaultValue":"80m wind speed",
               "i18nValue":{
                  "en_US":"80m wind speed",
                  "zh_CN":"80m 风速"
               }
            },
            "tags":{
            },
            "stdElementId":null,
            "isStdElement":false,
            "dataType":"DOUBLE",
            "unit":{
               "unitId":"m/s",
               "multiplier":"ONE"
            },
            "dataDefinition":null,
            "hasQuality":false,
            "signalType":"Generic"
         },
         "windspeed_110":{
            "identifier":"windspeed_110",
            "name":{
               "defaultValue":"windspeed_110",
               "i18nValue":{
                  "en_US":"windspeed_110"
               }
            },
            "i18nDesc":{
               "defaultValue":"110m wind speed",
               "i18nValue":{
                  "en_US":"110m wind speed",
                  "zh_CN":"110m 风速"
               }
            },
            "tags":{
            },
            "stdElementId":null,
            "isStdElement":false,
            "dataType":"DOUBLE",
            "unit":{
               "unitId":"m/s",
               "multiplier":"ONE"
            },
            "dataDefinition":null,
            "hasQuality":false,
            "signalType":"AI"
         },
         "system_start":{
            "identifier":"system_start",
            "name":{
               "defaultValue":"启动指令",
               "i18nValue":{
                  "en_US":"",
                  "zh_CN":""
               }
            },
            "i18nDesc":{
               "defaultValue":"Start system",
               "i18nValue":{
                  "en_US":"Start system",
                  "zh_CN":"启动"
               }
            },
            "tags":{
               "control":"true"
            },
            "stdElementId":null,
            "isStdElement":false,
            "dataType":"ENUM",
            "unit":null,
            "dataDefinition":{
                 "enumDesc": {
                    "0": {
                          "defaultValue": "关闭",
                           "i18nValue": {}
                    },
                   "1": {
                          "defaultValue": "打开",
                          "i18nValue": {}
                    },
                   "2": {
                          "defaultValue": "不定态",
                          "i18nValue": {}
                    },
                   "3": {
                          "defaultValue": "会不定态",
                          "i18nValue": {}
                    }
                  },
                 "enumType": "INT"
            },
            "hasQuality":false,
            "signalType":"Generic"
         },
         "windspeed_140":{
            "identifier":"windspeed_140",
            "name":{
               "defaultValue":"windspeed_140",
               "i18nValue":{
                  "en_US":"windspeed_140"
               }
            },
            "i18nDesc":{
               "defaultValue":"140m wind speed",
               "i18nValue":{
                  "en_US":"140m wind speed",
                  "zh_CN":"140m 风速"
               }
            },
            "tags":{
            },
            "stdElementId":null,
            "isStdElement":false,
            "dataType":"DOUBLE",
            "unit":{
               "unitId":"m/s",
               "multiplier":"ONE"
            },
            "dataDefinition":null,
            "hasQuality":false,
            "signalType":"AI"
         },
         "cedianforsolar":{
            "identifier":"cedianforsolar",
            "name":{
               "defaultValue":"cediantedsst",
               "i18nValue":{
                  "en_US":"cediantedsst"
               }
            },
            "i18nDesc":{
               "defaultValue":"Solar measurement point",
               "i18nValue":{
                  "en_US":"Solar measurement point",
                  "zh_CN":"Solar 测点"
               }
            },
            "tags":{
            },
            "stdElementId":null,
            "isStdElement":false,
            "dataType":"DOUBLE",
            "unit":null,
            "dataDefinition":null,
            "hasQuality":false,
            "signalType":"Generic"
         }
      },
      "services":{
         "speedup":{
            "identifier":"speedup",
            "name":{
               "defaultValue":"speedup",
               "i18nValue":{
                  "en_US":"speedup"
               }
            },
            "i18nDesc":{
               "defaultValue":"Speedup",
               "i18nValue":{
                  "en_US":"Speedup",
                  "zh_CN":"加速"
               }
            },
            "tags":null,
            "stdElementId":null,
            "isStdElement":false,
            "outputData":[
               {
                  "identifier":"delta",
                  "name":{
                     "defaultValue":"delta",
                     "i18nValue":{
                        "en_US":"delta"
                     }
                  },
                  "i18nDesc":{
                     "defaultValue":"Delta",
                     "i18nValue":{
                        "en_US":"Delta",
                        "zh_CN":"Delta 描述"
                     }
                  },
                  "tags":{
                  },
                  "stdElementId":null,
                  "isStdElement":false,
                  "dataType":"INT",
                  "unit":null,
                  "dataDefinition":null
               }
            ],
            "inputData":[
               {
                  "identifier":"delta",
                  "name":{
                     "defaultValue":"delta",
                     "i18nValue":{
                        "en_US":"delta"
                     }
                  },
                  "i18nDesc":{
                     "defaultValue":"Delta",
                     "i18nValue":{
                        "en_US":"Delta",
                        "zh_CN":"Delta 描述"
                     }
                  },
                  "tags":{
                  },
                  "stdElementId":null,
                  "isStdElement":false,
                  "dataType":"INT",
                  "unit":{
                     "unitId":"rpm",
                     "multiplier":"ONE"
                  },
                  "dataDefinition":null,
                  "isRequired":true,
                  "defaultValue":3
               }
            ],
            "callType":"ASYNC"
         }
      }
   }
}
 
 
            
            
            
            
          
        
        
         |      |