Gateway

Updated at:

This topic describes how to call gateway request APIs using the custom device panel software development kit (SDK).

Background information

For more information about SDK installation and API calls, see Getting Started.

Cloud API request

request

Request parameters

Parameter

Parameter type

Subparameter

Subparameter type

Description

Required

path

string

None

None

The path of the API.

Yes

options

object

version

string

The version number of the API.

Yes

protocol

string

The protocol. Use https://.

Yes

authType

string

Enter iotAuth.

No

data

object

The API parameters.

No

Example

gateway.request('/xx/xx/xx/get', {
  version: '1.0.0',
  protocol: 'https://',
  authType: 'iotAuth',
  data: {
    iotId:'xxx'
  },
}).then((res) => {
  console.log(res);
}).catch((err) => {
  console.warn(err);
});