**QuerySessionByClientId**介面一般用於線上追蹤單個裝置的運行狀態,再根據查詢到的資訊排查問題。輸入Client ID即可查到對應裝置是否線上、裝置地址等資訊。
介面說明
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
mq:MqttInstanceAccess |
get |
*Instance
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ClientId |
string |
是 |
需要查詢的目標 Client ID。 |
GID_test@@@test |
| InstanceId |
string |
是 |
雲Message QueueTT 版執行個體的 ID,一定要和用戶端實際使用的執行個體 ID 匹配。您可以在控制台執行個體詳情頁面擷取該 ID。 |
post-cn-0pp12gl**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| OnlineStatus |
boolean |
裝置是否線上,取值說明如下:
|
true |
| RequestId |
string |
公用參數,每個請求的 ID 都是唯一的。 |
E4581CCF-62AF-44D9-B5B4-D1DBBC0E**** |
樣本
正常返回樣本
JSON格式
{
"OnlineStatus": true,
"RequestId": "E4581CCF-62AF-44D9-B5B4-D1DBBC0E****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | CheckAccountInfoFailed | An error occurred while checking the account information by the STS token. | 解析STS Token帳號資訊失敗。 |
| 400 | InstancePermissionCheckFailed | An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings. | 執行個體許可權校正失敗,請確認MQTT執行個體的所屬關係以及授權策略。 |
| 400 | ParameterCheckFailed | An error occurred while validating the parameters. The parameters may be missing or invalid. | 參數校正失敗,可能缺失或者傳入值非法。 |
| 400 | PermissionCheckFailed | An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings. | 資源許可權校正失敗,請檢查執行個體、Topic和Group ID的所屬許可權和授權策略。 |
| 400 | InvalidParameter.%s | An error occurred while validating the parameter. The parameter may be missing or invalid. | 參數校正失敗,可能缺失或者傳入值非法。 |
| 500 | InternalError | An error occurred while processing your request. Try again later. | MQTT後端服務異常,請重試。 |
| 500 | SystemOverFlow | An error occurred while processing your request. Please try again. | 系統限流,請重試。 |
| 404 | ApiNotSupport | The specified API is not supported. | 當前介面不支援,請檢查。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。