調(diào)用該接口獲取網(wǎng)關(guān)信息。
調(diào)試
您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動(dòng)生成SDK代碼示例。
請(qǐng)求參數(shù)
名稱 | 類型 | 是否必選 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetGateway |
系統(tǒng)規(guī)定參數(shù)。取值:GetGateway。 |
IotInstanceId | String | 否 | iot-060a09b1 |
實(shí)例ID。 您可在物聯(lián)網(wǎng)平臺(tái)控制臺(tái)的實(shí)例概覽頁(yè)面,查看當(dāng)前實(shí)例的ID。若有ID值,必須傳入該ID值,否則調(diào)用會(huì)失敗。 說(shuō)明 如果公共實(shí)例沒(méi)有ID值,請(qǐng)參見(jiàn)如何獲取實(shí)例ID。
|
GwEui | String | 是 | 0000000000000000 |
網(wǎng)關(guān)唯一標(biāo)識(shí)。 |
返回?cái)?shù)據(jù)
名稱 | 類型 | 示例值 | 描述 |
---|---|---|---|
Success | Boolean | true |
是否成功。 |
RequestId | String | 89EF6CAA-958F-F32C-BE45-FE003C6DE097 |
請(qǐng)求ID。 |
Data | Object |
網(wǎng)關(guān)信息。 |
|
ChargeStatus | String | NORMAL |
網(wǎng)關(guān)欠費(fèi)狀態(tài)。
|
ClassBSupported | Boolean | true |
該網(wǎng)關(guān)是否支持Class B模式。 |
FreqBandPlanGroupId | Long | 123 |
網(wǎng)關(guān)頻段ID。 |
District | String | 某某區(qū) |
網(wǎng)關(guān)所在城區(qū)名稱。 |
GisCoordinateSystem | String | GCJ_02 |
網(wǎng)關(guān)經(jīng)緯度所采用的坐標(biāo)系統(tǒng),可取值:WGS_84, GCJ_02。 |
City | String | 某某市 |
網(wǎng)關(guān)所在城市名稱。 |
TimeCorrectable | Boolean | true |
該網(wǎng)關(guān)是否可以作為時(shí)間校準(zhǔn)網(wǎng)關(guān)。 |
OnlineState | String | ONLINE |
網(wǎng)關(guān)的在線、離線狀態(tài)。
|
AuthTypes | String | STANDARD |
網(wǎng)關(guān)合約類型。
|
OnlineStateChangedMillis | Long | 1514736000000 |
最近一次在線、離線狀態(tài)的變更時(shí)間。 格式為UNIX時(shí)間戳,以毫秒為單位。 |
CommunicationMode | String | HALF_DUPLEX |
網(wǎng)關(guān)通信模式。可取值為:
|
Description | String | 網(wǎng)關(guān)描述 |
自定義網(wǎng)關(guān)描述。 |
Enabled | Boolean | true |
該網(wǎng)關(guān)是否處于啟用狀態(tài)。
|
ClassBWorking | Boolean | true |
該網(wǎng)關(guān)是否正工作在Class B模式下。 |
Address | String | 詳細(xì)地址 |
網(wǎng)關(guān)所在詳細(xì)地址。 |
Longitude | Float | 123.45678 |
網(wǎng)關(guān)經(jīng)度。 |
EmbeddedNsId | String | 123 |
Hybrid網(wǎng)關(guān)id。 |
Latitude | Float | 23.45678 |
網(wǎng)關(guān)緯度。 |
Name | String | 網(wǎng)關(guān)名稱 |
自定義網(wǎng)關(guān)名稱。 |
GwEui | String | 0000000000000000 |
網(wǎng)關(guān)唯一標(biāo)識(shí)。 |
AddressCode | Long | 123 |
網(wǎng)關(guān)所在地區(qū)ID,由 |
示例
請(qǐng)求示例
http(s)://linkwan.cn-shanghai.aliyuncs.com/?Action=GetGateway
&GwEui=0000000000000000
&RegionId=cn-shanghai
&<公共請(qǐng)求參數(shù)>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetGatewayResponse>
<Data>
<City>某某市</City>
<Name>網(wǎng)關(guān)名稱</Name>
<District>某某區(qū)</District>
<OnlineState>ONLINE</OnlineState>
<TimeCorrectable>true</TimeCorrectable>
<Enabled>true</Enabled>
<Longitude>123.45678</Longitude>
<Latitude>23.45678</Latitude>
<OnlineStateChangedMillis>1514736000000</OnlineStateChangedMillis>
<ClassBSupported>true</ClassBSupported>
<Address>詳細(xì)地址</Address>
<GwEui>0000000000000000</GwEui>
<CommunicateMode>HALF_DUPLEX</CommunicateMode>
<ClassBWorking>true</ClassBWorking>
<FreqBandPlanGroupId>123</FreqBandPlanGroupId>
<AddressCode>123</AddressCode>
<GisCoordinateSystem>GCJ-02</GisCoordinateSystem>
<Description>網(wǎng)關(guān)描述</Description>
</Data>
<RequestId>89EF6CAA-958F-F32C-BE45-FE003C6DE097</RequestId>
<Success>true</Success>
</GetGatewayResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Data" : {
"TimeCorrectable" : true,
"Enabled" : true,
"Description" : "網(wǎng)關(guān)描述",
"OnlineStateChangedMillis" : 1514736000000,
"GisCoordinateSystem" : "GCJ-02",
"AddressCode" : 123,
"ClassBSupported" : true,
"City" : "某某市",
"Name" : "網(wǎng)關(guān)名稱",
"FreqBandPlanGroupId" : 123,
"District" : "某某區(qū)",
"ClassBWorking" : true,
"Address" : "詳細(xì)地址",
"Latitude" : 23.45678,
"Longitude" : 123.45678,
"OnlineState" : "ONLINE",
"CommunicateMode" : "HALF_DUPLEX",
"GwEui" : "0000000000000000"
},
"RequestId" : "89EF6CAA-958F-F32C-BE45-FE003C6DE097",
"Success" : true
}
錯(cuò)誤碼
HttpCode | 錯(cuò)誤碼 | 錯(cuò)誤信息 | 描述 |
---|---|---|---|
400 | ForbiddenByRam | User not authorized to operate on the specified resource, or this API does not support RAM. | 用戶沒(méi)有執(zhí)行該操作所需要的RAM權(quán)限。 |
400 | ForbiddenByRiskControl | This operation cannot be performed because of security risks. | 存在安全風(fēng)險(xiǎn),無(wú)法執(zhí)行該操作 |
400 | NonExistent | The specified resource does not exist. | 要操作的資源不存在。 |
400 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 內(nèi)部錯(cuò)誤。 |
400 | NotResourceOwner | You are not authorized to use this resource. | 無(wú)權(quán)訪問(wèn)此資源 |
訪問(wèn)錯(cuò)誤中心查看更多錯(cuò)誤碼。