Model Service API Overview¶
A model is the abstraction and digitization of an entity object in the physical world. The model connects the physical world with the digital platform by defining the characteristics and behaviors of assets, supporting data management and business applications.
Through Model Service APIs, device managers can query and update models, as well as obtain detailed model information. For a complete list of interfaces and functional descriptions of Model Service APIs, see API List.
Note
When you create models in EnOS Model Management , only models with Model Usage set to Device Connection can be used in EnOS Device Connectivity and Management, and can be queried and updated via Model Service APIs.
Prerequisites¶
Ensure that the current OU has a model with the usage of Device Connection.
Ensure that you have obtained a service account, and the service account has the permission to call the Model Service APIs. For more information, see Getting API Calling Permissions.
Ensure that you have read the limitations for models. For more information, see Limitations.
API List
¶
You can see what operations can be used via these APIs, the URL corresponding to each operation, and whether it is applicable to EnOS Cloud and EnOS Edge in the following table.
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Get models by modelId |
/model-service/v2.1/thing-models?action=get |
√ |
√ |
|
Search for models |
/model-service/v2.2/thing-models?action=search |
√ |
√ |
|
Update a model |
/model-service/v2.1/thing-models?action=update |
√ |
× |
SDK Samples¶
You can access the SDK samples for Model Service APIs on GitHub: