Connection Service API Overview¶
Device connection and management can help you quickly establish fast and secure communication between devices and the EnOS Cloud, and achieve full lifecycle management of devices from the planning phase to the retirement phase.
Through the Conection Service API, device access and management personnel can create and manage products and devices, manage device certificates and firmware, as well as remotely issue commands, etc. For a complete list of interfaces and functional descriptions of the Connection Service API, see API List.
Prerequisites¶
Ensure that you have obtained a service account, and the service account has the permission to call the Asset Service APIs. For more information, see Getting API Calling Permissions。
Ensure that you have read the limitations for logical assets. See Limitations.
API List
¶
The following is the list of Connecion Service APIs. “√” and “×” indicate whether they are applicable to EnOS Cloud or EnOS Edge.
Some APIs have added a V2.4 version based on the original version, and both the old and new versions are supported for use.
Product¶
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Create a product |
/connect-service/v2.1/products?action=create |
√ |
× |
|
Delete a product |
/connect-service/v2.1/products?action=delete |
√ |
× |
|
Get the details of a product via its |
|
√ |
× |
|
Search for products based on the search criteria |
|
√ |
× |
|
Update a product |
/connect-service/v2.1/products?action=update |
√ |
× |
Device¶
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Create a device |
|
√ |
× |
|
Batch create devices |
|
√ |
× |
|
Delete a device |
/connect-service/v2.1/devices?action=delete |
√ |
× |
|
Disable a device |
/connect-service/v2.1/devices?action=disable |
√ |
× |
|
Enable a device |
/connect-service/v2.1/devices?action=enable |
√ |
× |
|
Get the information of a device |
|
√ |
√ |
|
Replace the |
|
√ |
× |
|
Search for devices based on the search criteria |
|
√ |
√ |
|
Update a device |
/connect-service/v2.1/devices?action=update |
√ |
× |
|
Get the device statistics of an organization or product |
/connect-service/v2.1/devices?action=getStats |
√ |
× |
|
Report the device firmware version |
/connect-service/v2.5/devices?action=reportFirmwareVersion |
√ |
× |
|
Modify the device status |
/connect-service/v2.4/devices?action=modifyDeviceStatus |
√ |
× |
Certificate¶
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Apply for a certificate and bind it to a device |
/connect-service/v2.0/certificates?action=apply |
√ |
× |
|
Update a certificate and bind it to a device |
/connect-service/v2.0/certificates?action=renew |
√ |
× |
|
Revoke a certificate bound to a device |
/connect-service/v2.0/certificates?action=revoke |
√ |
× |
|
List the certificates bound to a device |
/connect-service/v2.0/certificates?action=list |
√ |
× |
Gateway and Sub-Device¶
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Add new sub-devices to the gateway device |
/connect-service/v2.1/device-topos?action=addSubDevice |
√ |
× |
|
Get the gateway information based on the specified sub-device |
|
√ |
× |
|
Remove sub-devices from the gateway |
/connect-service/v2.1/device-topos?action=removeSubDevice |
√ |
× |
|
Search for sub-devices under the specified gateway |
|
√ |
× |
Device Data¶
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Cancel cached commands |
/connect-service/v2.1/commands?action=cancel |
√ |
× |
|
Get the details of a command |
/connect-service/v2.1/commands?action=get |
√ |
× |
|
Obtain the latest measurement point data uploaded from a device |
/connect-service/v2.1/measurepoints?action=queryLatest |
√ |
√ |
|
Service invocation for the device |
/connect-service/v2.1/commands?action=invokeService |
√ |
× |
|
Search for commands |
/connect-service/v2.1/commands?action=search |
√ |
× |
|
Measurement point setting for the device |
/connect-service/v2.1/commands?action=setMeasurepoint |
√ |
√ |
|
Get the information of a file |
/connect-service/v2.1/files?action=getFileInfo |
√ |
× |
|
Download a file from a device |
/connect-service/v2.1/files?action=download |
√ |
× |
|
Delete a file from a device |
/connect-service/v2.1/files?action=delete |
√ |
× |
|
Create tasks to sned commands to a batch of devices. |
/connect-service/v2.5/commands?action=createJob |
√ |
× |
|
Search tasks to send commands to a batch of devices based on filtering criteria. |
/connect-service/v2.5/commands?action=searchJob |
√ |
× |
|
Search the details of tasks to send commands to a batch of devices. |
/connect-service/v2.5/commands?action=getJob |
√ |
× |
|
Delete tasks to send commands to a batch of devices. |
/connect-service/v2.5/commands?action=deleteJob |
√ |
× |
|
Query the data analysis information of tasks to issue commands to a batch of devices. |
/connect-service/v2.5/commands?action=queryStatistics |
√ |
× |
|
Get tasks to send commands to a single device. |
/connect-service//v2.5/commands?action=getTask |
√ |
× |
|
Search for the details, execution progress, and status of a task to send commands to a single device. |
/connect-service/v2.5/commands?action=searchTask |
√ |
× |
|
Retry tasks to send commands to a single device. |
/connect-service/v2.5/commands?action=retryTask |
√ |
× |
|
Cancel tasks to send commands to a single device. |
/connect-service/v2.5/commands?action=cancelTask |
√ |
× |
HTTP Message Integration¶
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Upload the attribute data of a device, including file-type data |
/connect-service/v2.1/integration?action=postAttribute |
√ |
× |
|
Upload the measurement point data of a device, including file-type data |
/connect-service/v2.1/integration?action=postMeasurepoint |
√ |
√ |
Firmware Management¶
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Create a firmware file for a product |
/connect-service/v2.1/ota-firmwares?action=create |
√ |
× |
|
Get the file of the specified firmware |
/connect-service/v2.1/ota-firmwares?action=get |
√ |
× |
|
List the firmware versions of all devices under the specified product |
/connect-service/v2.1/ota-firmwares?action=listVersion |
√ |
× |
|
Search for firmware files under an OU based on the search criteria |
/connect-service/v2.1/ota-firmwares?action=search |
√ |
× |
|
Search for the firmware and upgrade status of the device based on the search criteria |
/connect-service/v2.1/ota-firmwares?action=searchDeviceUpgrade |
√ |
× |
|
Delete a firmware |
/connect-service/v2.1/ota-firmwares?action=delete |
√ |
× |
|
Download firmware files |
/connect-service/v2.5/files?action=downloadFirmwareFile |
√ |
× |
Firmware OTA Upgrade Management¶
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Create a batch of firmware OTA verification or upgrade tasks. |
/connect-service/v2.1/ota-jobs?action=create |
√ |
× |
|
Get the details of a batch firmware OTA upgrade tasks. |
/connect-service/v2.1/ota-jobs?action=get |
√ |
× |
|
Search for information on batch firmware OTA upgrade tasks. |
/connect-service/v2.1/ota-jobs?action=search |
√ |
× |
|
Search for the details, execution progress, and status of a specific OTA task executed by a device. |
/connect-service/v2.1/ota-jobs?action=searchTask |
√ |
× |
|
Start a batch of firmware OTA upgrade tasks. |
/connect-service/v2.1/ota-jobs?action=start |
√ |
× |
|
Stop a batch of firmware OTA upgrade tasks. |
/connect-service/v2.1/ota-jobs?action=stop |
√ |
× |
|
Delete a batch of firmware OTA upgrade tasks. |
/connect-service/v2.1/ota-jobs?action=delete |
√ |
× |
|
Cancel the OTA upgrade task for a specified device. |
/connect-service/v2.1/ota-jobs?action=cancelTask |
√ |
× |
|
Retry the OTA upgrade task for a specified device. |
/connect-service/v2.1/ota-jobs?action=retryTask |
√ |
× |
Decrypting Product/Device Secret¶
Product/Device secrets obtained from V2.4 APIs are encrypted. For how to decrypt, see Decrypting Product/Device Secret.
SDK Samples¶
You can access the SDK samples for Connection Service on GitHub: