API Domain
https://ioe-api.nextdrive.io/device-management
MQTT Configuration
① Operate device command for setting MQTT config
|
Summary |
① Operate device command for setting MQTT config
|
|
|---|---|---|
|
Path |
POST |
|
|
Description |
Through this API, you can set the MQTT connection parameters for a specific Gateway. |
|
|
Permission |
|
|
|
Request Header |
Authorization |
|
|
Request Params |
Example Value |
JSON
|
|
Schema |
JSON
|
|
|
Request Body |
Content Type |
application/json |
|
Example Value |
JSON
|
|
|
Schema |
JSON
|
|
|
Note |
MQTT settings may not take effect immediately, so async is used to design related APIs.
|
|
200
|
Response |
Status Code |
200 |
|---|---|---|
|
Description |
Successful request |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
JSON
|
400
|
Response |
Status Code |
400 |
|---|---|---|
|
Description |
Invalid parameter |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
Invalid Parameter Error |
403
|
Response |
Status Code |
403 |
|---|---|---|
|
Description |
Forbidden |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
|
404
|
Response |
Status Code |
404 |
|---|---|---|
|
Description |
Not found |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
The device is not found. |
500
|
Response |
Status Code |
500 |
|---|---|---|
|
Description |
System error |
|
|
Content Type |
application/json |
|
|
Example Value |
|
|
|
Schema |
Internal server error such as database error, redis error, …etc. |
② Get the details of setting MQTT config
|
Summary |
② Get the details of setting MQTT config
|
|
|---|---|---|
|
Path |
GET |
|
|
Description |
Through this API, you can check the execution status of the MQTT connection parameters setting of a specific Gateway. |
|
|
Permission |
|
|
|
Request Header |
Authorization |
|
|
Request Params |
Example Value |
JSON
|
|
Schema |
JSON
|
|
|
Note |
Records are retained for only 3 months. |
|
200
|
Response |
Status Code |
200 |
|---|---|---|
|
Description |
Successful request |
|
|
Content Type |
application/json |
|
|
Example Value |
No Ack, no resultJSON
Ack received, no resultJSON
Ack received, result receivedJSON
|
|
|
Schema |
JSON
|
|
|
Note |
|
操作成功,無錯誤 |
|
|
記憶體不足,無法完成操作 |
|
|
|
協議錯誤,可能是使用了不支援的 MQTT 版本 |
|
|
|
傳入的參數無效,請檢查函式呼叫的參數 |
|
|
|
客戶端尚未與 broker 建立連線 |
|
|
|
broker 拒絕連線,可能是認證失敗或設定錯誤 |
|
|
|
查無指定訊息,通常為內部用途 |
|
|
|
與 broker 的連線中斷,可能是網路問題或 broker 關閉 |
|
|
|
TLS/SSL 錯誤,可能是憑證問題或加密協議不匹配 |
|
|
|
訊息內容太大,超過 broker 或客戶端的限制 |
|
|
|
嘗試使用不被支援的功能 |
|
|
|
認證失敗,可能是使用者名稱或密碼錯誤 |
|
|
|
存取被拒,可能是存取控制列表(ACL)設定限制 |
|
|
|
發生不明錯誤,無法確定原因 |
|
|
|
發生系統層級錯誤,需查看 |
|
|
|
主機名稱查詢(DNS)失敗,無法解析主機名稱 |
|
|
|
透過代理伺服器時發生錯誤 |
|
|
|
外掛程式延遲處理,可能是等待其他操作完成 |
|
|
|
字串格式錯誤,非有效的 UTF-8 編碼 |
|
|
|
保持連線錯誤,可能是未收到預期的 PING 回應 |
|
|
|
主機名稱查詢失敗,與 |
|
|
|
連線被拒 |
|
|
|
連線逾時 |
|
|
|
網路不可達 |
|
|
|
找不到通往主機的路由 |
|
|
|
嘗試使用的本地位址已被佔用 |
400
|
Response |
Status Code |
400 |
|---|---|---|
|
Description |
Invalid parameter |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
Invalid |
403
|
Response |
Status Code |
403 |
|---|---|---|
|
Description |
Forbidden |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
No permission to operate on the device. |
404
|
Response |
Status Code |
404 |
|---|---|---|
|
Description |
Not found |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
|
500
|
Response |
Status Code |
500 |
|---|---|---|
|
Description |
System error |
|
|
Content Type |
application/json |
|
|
Example Value |
|
|
|
Schema |
Internal server error such as database error, redis error, …etc. |
③ Operate device command for getting MQTT config
|
Summary |
③ Operate device command for getting MQTT config
|
|
|---|---|---|
|
Path |
POST |
|
|
Description |
Through this API, you can get the MQTT connection parameters of a specific GW. |
|
|
Permission |
|
|
|
Request Header |
Authorization |
|
|
Request Params |
Example Value |
JSON
|
|
Schema |
JSON
|
|
|
Request Body |
Content Type |
application/json |
|
Example Value |
JSON
|
|
|
Schema |
JSON
|
|
|
Note |
After the MQTT settings are completed, they can be obtained immediately. The relevant APIs are designed in a Sync way.
|
|
200
|
Response |
Status Code |
200 |
|---|---|---|
|
Description |
Successful request |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
JSON
|
400
|
Response |
Status Code |
400 |
|---|---|---|
|
Description |
Invalid parameter |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
Invalid Parameter Error |
403
|
Response |
Status Code |
403 |
|---|---|---|
|
Description |
Forbidden |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
|
404
|
Response |
Status Code |
404 |
|---|---|---|
|
Description |
Not found |
|
|
Content Type |
application/json |
|
|
Example Value |
JSON
|
|
|
Schema |
The device is not found. |
500
|
Response |
Status Code |
500 |
|---|---|---|
|
Description |
System error |
|
|
Content Type |
application/json |
|
|
Example Value |
|
|
|
Schema |
Internal server error such as database error, redis error, …etc. |