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 Product

Create a product

/connect-service/v2.1/products?action=create

×

Delete Product

Delete a product

/connect-service/v2.1/products?action=delete

×

Get Product

Get the details of a product via its productKey

  • V2.4: /connect-service/v2.4/products?action=get

  • V2.1: /connect-service/v2.1/products?action=get

×

Search Product

Search for products based on the search criteria

  • V2.4: /connect-service/v2.4/products?action=search

  • V2.1: /connect-service/v2.1/products?action=search

×

Update Product

Update a product

/connect-service/v2.1/products?action=update

×

Device


Operation Name

Description

URL

EnOS Cloud

EnOS Edge

Create Device

Create a device

  • V2.4: /connect-service/v2.4/devices?action=create

  • V2.1: /connect-service/v2.1/devices?action=create

×

Batch Create Devices

Batch create devices

  • V2.4: /connect-service/v2.4/devices?action=batchCreate

  • V2.0: /connect-service/v2.0/devices?action=batchCreate

×

Delete Device

Delete a device

/connect-service/v2.1/devices?action=delete

×

Disable Device

Disable a device

/connect-service/v2.1/devices?action=disable

×

Enable Device

Enable a device

/connect-service/v2.1/devices?action=enable

×

Get Device

Get the information of a device

  • V2.4: /connect-service/v2.4/devices?action=get

  • V2.1: /connect-service/v2.1/devices?action=get

Replace Device

Replace the deviceKey of a device without changing its assetId

  • V2.4: /connect-service/v2.4/devices?action=replaceDevice

  • V2.1: /connect-service/v2.1/devices?action=replaceDevice

×

Search Device

Search for devices based on the search criteria

  • V2.4: /connect-service/v2.4/devices?action=search

  • V2.1: /connect-service/v2.1/devices?action=search

Update Device

Update a device

/connect-service/v2.1/devices?action=update

×

Get Device Statistics

Get the device statistics of an organization or product

/connect-service/v2.1/devices?action=getStats

×

Report Device Firmware Version

Report the device firmware version

/connect-service/v2.5/devices?action=reportFirmwareVersion

×

Modify Device Status

Modify the device status

/connect-service/v2.4/devices?action=modifyDeviceStatus

×

Certificate


Operation Name

Description

URL

EnOS Cloud

EnOS Edge

Apply Certificate

Apply for a certificate and bind it to a device

/connect-service/v2.0/certificates?action=apply

×

Renew Certificate

Update a certificate and bind it to a device

/connect-service/v2.0/certificates?action=renew

×

Revoke Certificate

Revoke a certificate bound to a device

/connect-service/v2.0/certificates?action=revoke

×

List Certificate

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 Sub-Device

Add new sub-devices to the gateway device

/connect-service/v2.1/device-topos?action=addSubDevice

×

Get Gateway

Get the gateway information based on the specified sub-device

  • V2.4: /connect-service/v2.4/device-topos?action=getGateway

  • V2.1: /connect-service/v2.1/device-topos?action=getGateway

×

Remove Sub-Device

Remove sub-devices from the gateway

/connect-service/v2.1/device-topos?action=removeSubDevice

×

Search Sub-Device

Search for sub-devices under the specified gateway

  • V2.4: /connect-service/v2.4/device-topos?action=searchSubDevice

  • V2.1: /connect-service/v2.1/device-topos?action=searchSubDevice

×

Device Data


Operation Name

Description

URL

EnOS Cloud

EnOS Edge

Cancel Command

Cancel cached commands

/connect-service/v2.1/commands?action=cancel

×

Get Command

Get the details of a command

/connect-service/v2.1/commands?action=get

×

Get Latest Measurement Points

Obtain the latest measurement point data uploaded from a device

/connect-service/v2.1/measurepoints?action=queryLatest

Invoke Service

Service invocation for the device

/connect-service/v2.1/commands?action=invokeService

×

Search Command

Search for commands

/connect-service/v2.1/commands?action=search

×

Set Measurement Point

Measurement point setting for the device

/connect-service/v2.1/commands?action=setMeasurepoint

Get File

Get the information of a file

/connect-service/v2.1/files?action=getFileInfo

×

Download File

Download a file from a device

/connect-service/v2.1/files?action=download

×

Delete File

Delete a file from a device

/connect-service/v2.1/files?action=delete

×

Create Command Jobs

Create tasks to sned commands to a batch of devices.

/connect-service/v2.5/commands?action=createJob

×

Search Command Jobs

Search tasks to send commands to a batch of devices based on filtering criteria.

/connect-service/v2.5/commands?action=searchJob

×

Get Command Jobs

Search the details of tasks to send commands to a batch of devices.

/connect-service/v2.5/commands?action=getJob

×

Delete Command Jobs

Delete tasks to send commands to a batch of devices.

/connect-service/v2.5/commands?action=deleteJob

×

Query Command Job Statistics

Query the data analysis information of tasks to issue commands to a batch of devices.

/connect-service/v2.5/commands?action=queryStatistics

×

Get Command Tasks

Get tasks to send commands to a single device.

/connect-service//v2.5/commands?action=getTask

×

Search Command Tasks

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 Command Task

Retry tasks to send commands to a single device.

/connect-service/v2.5/commands?action=retryTask

×

Cancel Command Tasks

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 Attributes

Upload the attribute data of a device, including file-type data

/connect-service/v2.1/integration?action=postAttribute

×

Upload Measurement Points

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 Firmware File

Create a firmware file for a product

/connect-service/v2.1/ota-firmwares?action=create

×

Get Firmware File

Get the file of the specified firmware

/connect-service/v2.1/ota-firmwares?action=get

×

List Device Current Firmware

List the firmware versions of all devices under the specified product

/connect-service/v2.1/ota-firmwares?action=listVersion

×

Search Firmware File

Search for firmware files under an OU based on the search criteria

/connect-service/v2.1/ota-firmwares?action=search

×

Search Device Upgrade

Search for the firmware and upgrade status of the device based on the search criteria

/connect-service/v2.1/ota-firmwares?action=searchDeviceUpgrade

×

Delete Firmware

Delete a firmware

/connect-service/v2.1/ota-firmwares?action=delete

×

Download Firmware File

Download firmware files

/connect-service/v2.5/files?action=downloadFirmwareFile

×

Firmware OTA Upgrade Management


Operation Name

Description

URL

EnOS Cloud

EnOS Edge

Create OTA Job

Create a batch of firmware OTA verification or upgrade tasks.

/connect-service/v2.1/ota-jobs?action=create

×

Get OTA Job

Get the details of a batch firmware OTA upgrade tasks.

/connect-service/v2.1/ota-jobs?action=get

×

Search OTA Job

Search for information on batch firmware OTA upgrade tasks.

/connect-service/v2.1/ota-jobs?action=search

×

Search OTA Task

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 OTA Job

Start a batch of firmware OTA upgrade tasks.

/connect-service/v2.1/ota-jobs?action=start

×

Stop OTA Job

Stop a batch of firmware OTA upgrade tasks.

/connect-service/v2.1/ota-jobs?action=stop

×

Delete OTA Job

Delete a batch of firmware OTA upgrade tasks.

/connect-service/v2.1/ota-jobs?action=delete

×

Cancel OTA Task

Cancel the OTA upgrade task for a specified device.

/connect-service/v2.1/ota-jobs?action=cancelTask

×

Retry OTA Task

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: