API

The IoT platform provides a variety of APIs to make application development easier and more efficient. You can call these open APIs to quickly integrate platform functions, such as product, device, subscription, and rule management, as well as device command delivery.

  1. An application must get authenticated by Identity and Access Management (IAM) and obtain a token. For details on how to obtain a token, see Debugging the API Used to Obtain the Token for an IAM User.
  2. The application can implement functions such as product management, device management, command/property/message delivery, subscription, and push message receipt. For details on the functions, see the following description, as well as API JAVA Demo or Debugging Using Postman.

API Introduction

API Group

Scenario

Subscription Management

Applications subscribe to resources provided by the platform. If the subscribed resources change, the platform notifies the applications of the change.

Tag Management

Applications bind tags to or unbind tags from resources.

Currently, only devices support tags.

Batch Task

Applications perform batch operations on devices connected to the platform.

  • Software and firmware can be upgraded in batches, and devices can be created, deleted, frozen, or unfrozen in batches.
  • Up to 10 unfinished tasks of the same type is allowed for a single user. After the maximum number is reached, new tasks cannot be created.

Device CA Certificate Management

Applications manage device CA certificates, including uploading, verifying, and querying certificates. The platform supports device access authentication using certificates.

Device Group Management

Applications manage device groups, including managing device group information and devices in a device group.

Device Message

Applications transparently transmit messages to devices.

Product Management

Applications manage product models that have been imported to the platform. (A product model defines the capabilities or features of all devices under a product.)

Device Management

Applications manage basic device information and device data.

Device Shadow

Applications manage the device shadow, which is a file used to store and retrieve the status of a device.

  • Each device has only one device shadow, which is uniquely identified by the device ID.
  • The device shadow saves only the latest data reported by the device and the desired data set by an application.
  • You can use the device shadow to query and set the device status regardless of whether the device is online.

Device Command

Applications deliver commands defined in the product model to devices through the platform.

Device Property

Applications deliver properties defined in the product model to devices through the platform.

Data forwarding and Device Linkage

Applications set rules to implement service linkage or forward data to other HUAWEI CLOUD services. Device linkage and data forwarding rules are available.

  • Device linkage: You can set trigger conditions and actions. When the preset triggering conditions are met, the corresponding actions are triggered, such as delivering commands, sending notifications, reporting alarms, and clearing alarms.
  • Data forwarding: You can set forwarding data, set forwarding targets, and start rules. Data can be forwarded to Data Ingestion Service (DIS), Distributed Message Service (DMS) for Kafka, Object Storage Service (OBS), ROMA Connect, third-party application (HTTP push), and AMQP message queue.