Updated on 2023-10-18 GMT+08:00

Using HTTPS For Access

Overview

Hypertext Transfer Protocol Secure (HTTPS) is a secure communication protocol that uses the SSL encryption over the HTTP protocol. It is supported by IoTDA.

Constraints

Item

Limit

Supported HTTP version

HTTP 1.0

HTTP 1.1

Supported HTTPS

The IoT platform supports only the HTTPS protocol. For details about how to download a certificate, see Certificates.

Supported TLS version

TLS 1.2

Maximum body length

1 MB

API specifications

For details, see Specifications.

Maximum number of child devices of which properties can be reported by a gateway at a time

50

API Calling

For details about the platform endpoint, see Platform Connection Information.

Use the endpoint of IoTDA and the HTTPS port number 443.

Communication Between HTTPS Devices and the Platform

When a device connects to the platform through HTTPS, HTTPS APIs are used for their communication. These APIs can be used for device authentication as well as message and property reporting.

Message Type

Description

Device authentication

Devices obtain access tokens.

Device reporting properties

Devices report property data in the format defined in the product model.

Device reporting messages

Devices report custom data to IoTDA, which then forwards reported messages to an application or other Huawei Cloud services for storage and processing.

Gateway reporting device properties in batches

A gateway reports property data of multiple child devices to the platform.

Service Flow

  1. Create a product on the IoTDA console or by calling the API Creating a Product.
  2. Register a device on the IoTDA console or calling the API Creating a Device.
  3. Call the device authentication API to obtain the access token of the device.
    Figure 1 Obtaining the access token
  4. The obtained access token can be used by devices to report messages and properties. The access token is in the message header. The following uses property reporting as an example.
    Figure 2 Reporting properties
    Figure 3 Reporting properties

HTTP APIs

The following table describes the platform APIs.

API Category

Function

API

Device authentication API

Authenticating a device

/v5/device-auth

Device message reporting API

Reporting a device message

/v5/devices/{device_id}/sys/messages/up

Device property reporting APIs

Reporting device properties

/v5/devices/{device_id}/sys/properties/report

Gateway reporting child device properties

/v5/devices/{device_id}/sys/gateway/sub-devices/properties/report