Updated on 2024-01-26 GMT+08:00

API Overview

Before calling all the listed APIs, complete authentication by following the instructions provided in Authentication.

Product Management APIs

API

Description

Query the Product List

This API is used to query the list of product models that have been imported to the platform to learn about the brief information about the product models.

Create a Product

This API is used to create a product. It is used to create a product but not to create or install a plug-in. If you need to encode or decode data, develop and install a plug-in on the platform.

Query a Product

This API is used to query details about a specific product model that has been imported to the platform, including the services, properties, and commands of the product model.

Modify a Product

This API is used to modify a specific product model that has been imported to the platform, including the services, properties, and commands of the product model. This API is used to modify the product but not to modify or install a plug-in. If the service definition in the product is modified and the corresponding plug-in exists on the platform, modify and reinstall the plug-in.

Delete a Product

This API is used to delete a specific product model that has been imported to the platform.

Device Management APIs

API

Description

Query the Device List

This API is used to query the device list on the platform.

Create a Device

This API is used to register a device with the platform. The device can access the platform only after being registered.

Query a Device

This API is used to query the detailed information about a specific device on the platform.

Modify a Device

This API is used to modify the basic information about a specific device on the platform.

Delete a Device

This API is used to delete a specific device from the platform. If the device is connected to an indirectly connected device, you must delete the indirectly connected device first.

Reset a Device Secret

This API is used to reset a device key. If the request contains a key, the platform resets the device key to the specified key. If the request does not contain a key, the platform automatically generates a new random key and returns it.

Freeze a Device

This API is used to freeze a device. After the device is frozen, the device cannot go online. You can unfreeze the device by calling the API used to unfreeze a device. Currently, only devices that are directly connected to the platform can be frozen.

Unfreeze a Device

This API is used to unfreeze a device. After the device is unfrozen, the device can go online.

Reset a Device Fingerprint

This API is used by an application to reset a device fingerprint. A device fingerprint will be reset to the specified one. If a device fingerprint is not specified, it is left empty.

Query Device List Flexibly

This API is used by an application to query a desired device list using SQL statements.

Device Message APIs

API

Description

Deliver a Message to a Device

This API is used to query messages of a specific device. By default, the platform stores a maximum of 20 messages for each device. If the number of messages exceeds 20, the earliest messages will be overwritten by subsequent messages.

Query Device Messages

This API is used by an application to deliver a message to a specific device to control the device. After an application delivers a message to the platform, the platform returns a response to the application and then sends the message to the device.

Query a Message by Message ID

This API is used to query a message by message ID.

Device Command APIs

API

Description

Deliver a Command to a Device

The product model defines commands that the platform can deliver to devices. An application can call this API to deliver synchronous commands to a specific device to control the device.

Deliver an Asynchronous Command

The product model defines commands that the platform can deliver to devices. An application can call this API to deliver asynchronous commands to a specific device to control the device.

Query a Command with a Specific ID

This API is used to query a command by command ID.

Device Property APIs

API

Description

Query Device Properties

The product model defines properties that the platform can deliver to devices. This API is used by an application to query properties of a specific device.

Modify Device Properties

The product model defines properties that the platform can deliver to devices. This API is used by an application to query properties of a specific device. The platform sends the properties to the device in synchronous mode and returns the execution result synchronously to the application.

AMQP Queue Management APIs

API

Description

Query the AMQP List

This API is used to query the AMQP queue list on the platform.

Create an AMQP Queue

This API is used to create an AMQP queue on the platform. You can call the data transfer rule management API to push data to the AMQP queue.

Query an AMQP Queue

This API is used to query the details of a specific AMQP queue on the platform.

Delete an AMQP Queue

This API is used to delete a specific AMQP queue from the platform.

Access Credential Management APIs

API

Description

Generate an Access Credential

An access code is an authentication credential used by a client to connect to the platform through a protocol such as AMQP. A pair of new access codes will be generated when this API is called.

Data Transfer Rule Management APIs

API

Description

Query the Rule Triggering Condition List

This API is used to query the rule condition list on the platform.

Create a Rule Triggering Condition

This API is used to create a rule condition on the platform.

Query a Rule Triggering Condition

This API is used to query the configuration of a specific rule condition on the platform.

Modify a Rule Triggering Condition

This API is used to modify the configuration of a specific rule condition on the platform.

Delete a Rule Triggering Condition

This API is used to delete a specific rule condition from the platform.

Query the Rule Action List

This API is used to query the rule action list on the platform.

Create a Rule Action

This API is used to create a rule action on the platform.

Query a Rule Action

This API is used to query the configuration of a specific rule action on the platform.

Modify a Rule Action

This API is used to modify a specific rule action on the platform.

Delete a Rule Action

This API is used to delete a specific rule action from the platform.

Data Transfer APIs

API

Description

Push a Device Status Change Notification

An application has created a rule about device status change notification on the platform. When the status of a device changes, the platform calls this API to push a notification to the application.

Push a Device Property Reporting Notification

An application has created a rule about device property reporting notification on the platform. When a device reports its property data, the platform calls this API to push a notification to the application.

Push a Device Message Status Change Notification

An application has created a rule about message status change notification on the platform. When the status of a device message changes, the platform calls this API to push a notification to the application.

Push a Batch Task Status Change Notification

An application has created a rule about batch task status change notification on the platform. When the status of a batch task changes, the platform calls this API to push a notification to the application.

Push a Device Message Reporting Notification

An application has created a rule about device message reporting notification on the platform. When a device reports a message, the platform calls this API to push a notification to the application.

Push a Device Addition Notification

An application has created a rule about device addition notification on the platform. When a device is added on the platform, the platform calls this API to push a notification to the application.

Push a Device Update Notification

An application has created a rule about device update notification on the platform. When a device is updated on the platform, the platform calls this API to push a notification to the application.

Push a Device Deletion Notification

An application has created a rule about device deletion notification on the platform. When a device is deleted from the platform, the platform calls this API to push a notification to the application.

Push a Product Addition Notification

An application has created a rule about product addition notification on the platform. When a product is added on the platform, the platform calls this API to push a notification to the application.

Push a Product Update Notification

An application has created a rule about product update notification on the platform. When a product is updated on the platform, the platform calls this API to push a notification to the application.

Push a Product Deletion Notification

An application has created a rule about product deletion notification on the platform. When a product is deleted from the platform, the platform calls this API to push a notification to the application.

Push an Asynchronous Device Command Status Change Notification

An application has created a rule about command status change notifications on the platform. When the status of a command changes, the platform calls this API to push a notification to the application.

Device Linkage Rule APIs

API

Description

Query the Rule List

This API is used to query the list of device linkage rules on the platform.

Creating a Rule

This API is used to create a device linkage rule on the platform.

Query a Rule

This API is used to query the configuration of a specific rule on the platform.

Modify a Rule

This API is used to modify the configuration of a specific rule on the platform.

Delete a Rule

This API is used to delete a specific rule from the platform.

Modify the Rule Status

This API is used to modify the status of a specific rule on the platform by activating or deactivating the rule.

Device Shadow APIs

API

Description

Query a Device Shadow

This API is used to query the device shadow of a specific device, including the desired device configurations (in the desired section) and the latest configurations reported by the device (in the reported section). Only LwM2M-based devices support the device shadow function, and only properties defined by LwM2M can be modified. User-defined properties cannot be modified.

Configure Desired Properties in a Device Shadow

This API is used by an application to configure the desired data (in the desired section) of the device shadow. When the device goes online, the application delivers the data to the device. The device shadow properties are coupled with the product model. The desired properties must be defined in the product model and can be delivered only when the method has the Write property. Only LwM2M-based devices support the device shadow function, and only properties defined by LwM2M can be modified. User-defined properties cannot be modified.

Device Group Management APIs

API

Description

Query the Device Group List

This API is used to query the device group list on the platform.

Create a Device Group

This API is used to create a device group. A Huawei Cloud account can have a maximum of 1,000 groups, including parent and child groups.

Query a Device Group

This API is used to query details about a device group.

Modify a Device Group

This API is used to modify a specific device group.

Delete a Device Group

This API is used to delete a specific device group.

Manage Devices in a Device Group

This API is used to manage devices in a device group, including adding and deleting devices to and from a device group. A maximum of 20,000 devices can be added to a device group. A device can be bound to a maximum of 10 device groups.

Query Devices in a Device Group

This API is used to query the list of devices in a specific device group.

Tag Management APIs

API

Description

Bind Tags

This API is used to bind a tag to a specific resource. Currently, only devices can be bound with tags.

Unbind Tags

This API is used to unbind a tag from a specific resource. Currently, only devices can be unbound from tags.

Query Resources by Tag

This API is used to query resources bound with a specific tag.

Resource Space Management APIs

API

Description

Query the Resource Space List

A resource space corresponds to the original application of the platform. The meaning of the resource space in the platform is the same as that in the application. The only difference relies on the name. This API is used by an application to query the resource space list.

Create a Resource Space

A resource space corresponds to the original application of the platform. The meaning of the resource space in the platform is the same as that in the application. The only difference relies on the name. This API is used by an application to create a resource space.

Query a Resource Space

A resource space corresponds to the original application of the platform. The meaning of the resource space in the platform is the same as that in the application. The only difference relies on the name. This API is used by an application to query details about a specific resource space.

Delete a Resource Space

This API is used to delete a specific resource space. Deleting a resource space is a high-risk operation. After the resource space is deleted, resources such as products and devices in the space will be unavailable. Exercise caution when performing this operation.

Batch Task APIs

API

Description

Query the Batch Task List

This API is used to query the batch task list on the platform. Each task includes the task content, status, and completion statistics.

Create a Batch Task

This API is used to create a batch task to perform batch operations on multiple devices. Currently, only batch software/firmware upgrade is supported.

Query a Batch Task

This API is used to query information about a specific batch task on the platform, including the task content, status, completion statistics, and subtask list.

Delete a Batch Task

This API is used by an application to delete a completed batch task (successful, failed, partially successful, or stopped) from the platform.

Re-Execute a Batch Task

This API is used by an application server to retry a batch task. Currently, task_type can only be set to firmwareUpgrade or softwareUpgrade. If the task specified by task_id is successful, stopped, being stopped, waiting, or being initialized, this API cannot be called.

Stop a Batch Task

This API is used by an application to stop a batch task. Currently, task_type can only be set to firmwareUpgrade or softwareUpgrade. If the task specified by task_id has been completed (successful, failed, partially successful, or stopped) or is being stopped, this API cannot be called.

Query the List of Batch Task Files

This API is used to query the batch task file list.

Upload a Batch Task File

This API is used to upload a batch task file to create a batch task. Currently, only the batch files for creating devices in batches can be uploaded.

Delete a Batch Task File

This API is used to delete a batch task file.

Device CA Certificate Management APIs

API

Description

Obtain the Device CA Certificate List

This API is used to obtain the device CA certificate list.

Upload a Device CA Certificate

This API is used to upload a device CA certificate.

Delete a Device CA Certificate

This API is used to delete a device CA certificate.

Verify a Device CA Certificate

This API is used to verify the CA certificate of a device. CA certificate verification checks whether the user has the private key of the CA certificate of the device.

OTA Upgrade Package Management

API

Description

Create an OTA Upgrade Package

This API is used to create an OBS object associated with an upgrade package.

Query the OTA Upgrade Package List

This API is used to query the upgrade package associated with an OBS object.

Obtain OTA Upgrade Package Details

This API is used to query details about the upgrade package associated with an OBS object.

Delete an OTA Upgrade Package

This API is used to delete the upgrade package information associated with an OBS object. The OBS object will not be deleted.

Message Broadcasting

API

Description

Broadcasting a Message

This API is used by an application to broadcast a message to all online devices that subscribe to a specified topic.

Device Tunnel Management

API

Description

Create a Device Tunnel

This API is used by an application to create a tunnel.

Query All Tunnels of a Device

This API is used by an application to query all device tunnels.

Query Device Tunnels

This API is used by an application to query device tunnel details.

Disable a Device Tunnel

This API is used by an application to close a tunnel.

Delete a Device Tunnel

This API is used by an application to delete a tunnel.