更新时间:2023-04-13 GMT+08:00
分享

查询单个LoRa网关信息

接口说明

查询单个LoRa网关信息。

注意事项

应用已鉴权,在header中携带参数app_key和Authorization: Bearer {accessToken}

URI

请求方法

GET

URI

/api/v3.0/devices/lora/gateway/{deviceId}

传输协议

HTTPS

请求参数

名称

必选/可选

类型

位置

说明

app_key

必选

String

Header

已鉴权应用的appId

Authorization

必选

String

Header

请求的认证信息,值为“Bearer ******”,其中******为Auth鉴权接口返回的accessToken

deviceId

必选

String

Path

设备ID,用于唯一标识一个设备,在注册设备时由物联网平台分配获得。

ownerAppId

可选

String(36)

Query

LoRa网关所属的应用ID,当查询授权应用下的LoRa网关时需要填写。

响应参数

名称

类型

说明

deviceId

String

设备ID,用于唯一标识一个设备,在注册LoRa网关时由物联网平台分配获得。

loraServerId

String

LoRaServer接入物联网的标识,由物联网平台分配。

productId

String

LoRa网关关联的产品ID,用于唯一标识一个产品模型。

gatewayEUI

String

LoRa网关唯一标识,16位hex类型。

name

String

LoRa网关名称。

gatewaySeq

String

LoRa网关接入码,32位hex类型,结合gatewayEUI由LoRa服务商统一生成。

请求示例

GET https://{host}:{port}/api/v3.0/devices/lora/gateway/{deviceId}?ownerAppId={ownerAppId}
Content-Type: application/json
app_key: ********
Authorization: ********

响应示例

Status Code: 200 OK

Content-Type: application/json

{
  "deviceId" : "string",
  "loraServerId" : "string",
  "productId" : "string",
  "gatewayEUI" : "string",
  "name" : "string",
  "gatewaySeq" : "string"
}

错误码

HTTP状态码

HTTP状态码说明

错误码

错误码描述

200

OK

-

-

403

Forbidden

100217

The application hasn't been authorized.

100249

The operation is not allowed.The application does not have edit permission.

404

Not Found

100203

The application is not existed.

1200003

The LoRa gateway does not exist.

500

Internal server error

100001

Internal server error.

100220

Get AppKey from header failed.

分享:

    相关文档

    相关产品