All Products
Search
Document Center

ApsaraMQ for MQTT:BatchQuerySessionByClientIds

Last Updated:Mar 25, 2024

Queries the status of multiple ApsaraMQ for MQTT clients by client ID.

Operation description

  • You can call the BatchQuerySessionByClientIds operation up to 100 times per second. For more information, see Limits on QPS.
  • You can call the BatchQuerySessionByClientIds operation to query the status of up to 10 ApsaraMQ for MQTT clients in a single query.
  • Each successful call to the BatchQuerySessionByClientIds operation increases the messaging transactions per second (TPS) by one. This affects the billing of your instance. For more information, see Billing rules.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the ApsaraMQ for MQTT instance. The ID must be consistent with the ID of the instance that the ApsaraMQ for MQTT client uses. You can obtain the instance ID on the Instance Details page that corresponds to the instance in the ApsaraMQ for MQTT console.

post-cn-0pp12gl****
ClientIdListarrayYes

The ApsaraMQ for MQTT clients.

stringYes

The serial number of the ApsaraMQ for MQTT client. The value N indicates the Nth ApsaraMQ for MQTT client.

Note You can query the status of up to 10 ApsaraMQ for MQTT clients in a single query. The value range of N is 1 to 10.
ClientIdList.1
Note For information about other parameters, see Common parameters and Endpoints .

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID. This parameter is a common parameter.

63309FDB-ED6C-46AE-B31C-A172FBA0****
OnlineStatusListobject []

The status list of all queried ApsaraMQ for MQTT clients.

OnlineStatusboolean

Indicates whether the ApsaraMQ for MQTT client is online. Valid values:

  • true
  • false
true
ClientIdstring

The ID of the ApsaraMQ for MQTT client. For more information about client IDs, see Terms .

GID_test@0001

Examples

Sample success responses

JSONformat

{
  "RequestId": "63309FDB-ED6C-46AE-B31C-A172FBA0****",
  "OnlineStatusList": [
    {
      "OnlineStatus": true,
      "ClientId": "GID_test@0001"
    }
  ]
}

Error codes

HTTP status codeError codeError message
400CheckAccountInfoFailedAn error occurred while checking the account information by the STS token.
400InstancePermissionCheckFailedAn error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.
400ParameterCheckFailedAn error occurred while validating the parameters. The parameters may be missing or invalid.
400PermissionCheckFailedAn error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.
400InvalidParameter.%sAn error occurred while validating the parameter. The parameter may be missing or invalid.
404ApiNotSupportThe specified API is not supported.
500InternalErrorAn error occurred while processing your request. Try again later.
500SystemOverFlowAn error occurred while processing your request. Please try again.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history