You can call this operation to query all Group IDs of the specified instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesListGroupId

The operation that you want to perform. Value: ListGroupId

InstanceIdStringYesmqtt-cn-0pp1ldu automatic snapshot policies *

The ID of the instance to which the Group ID you want to query belongs.

Note For more information about these parameters, see Common parameters and Make API requests.

Response parameters

ParameterTypeExampleDescription
DataArray

The details of the Group ID to be queried.

CreateTimeLong1564577317000

The time when the Group ID was created.

GroupIdStringGID_test1

The Group IDs of the queried instances.

IndependentNamingBooleanTrue

Indicates whether the instance has a separate namespace. Valid values:

  • True: The instance has a separate namespace. The names of resources under this instance must be unique. The resources can be duplicated across instances.
  • False the instance has no separate namespace. The names of resources in the instance must be unique and cannot be duplicated across instances.
InstanceIdStringpost-cn-45910tj automatic snapshot policies *

The ID of the instance to which the Group ID belongs.

UpdateTimeLong1564577317000

The time when the Group ID was last updated.

RequestIdString95996 EEB-D894-44FA-A87C-940F5CD97E6A

The ID of the request, which is a common parameter. Each request has a unique ID.

Examples

Sample requests

http(s)://onsmqtt.cn-hangzhou.aliyuncs.com/? Action=ListGroupId
&InstanceId=mqtt-cn-0pp1ldu static website hosting *
&<Common request parameters>

Sample success responses

XML format

<ListGroupIdResponse>
  <RequestId>95996EEB-D894-44FA-A87C-940F5CD97E6A</RequestId>
  <Data>
        <InstanceId>post-cn-45910tj****</InstanceId>
        <CreateTime>1564577317000</CreateTime>
        <UpdateTime>1564577317000</UpdateTime>
        <IndependentNaming>true</IndependentNaming>
        <GroupId>GID_test2</GroupId>
  </Data>
  <Data>
        <InstanceId>post-cn-45910tj****</InstanceId>
        <CreateTime>1563200655000</CreateTime>
        <UpdateTime>1563200655000</UpdateTime>
        <IndependentNaming>true</IndependentNaming>
        <GroupId>GID_test1</GroupId>
  </Data>
</ListGroupIdResponse>

JSON format

{
  "RequestId": "95996EEB-D894-44FA-A87C-940F5CD97E6A",
  "Data": [
    {
      "InstanceId": "post-cn-45910tj****",
      "CreateTime": 1564577317000,
      "UpdateTime": 1564577317000,
      "IndependentNaming": true,
      "GroupId": "GID_test2"
    },
    {
      "InstanceId": "post-cn-45910tj****",
      "CreateTime": 1563200655000,
      "UpdateTime": 1563200655000,
      "IndependentNaming": true,
      "GroupId": "GID_test1"
    }
  ]
}

Error codes

HTTP status codeErrorError messageDescription
400ParameterFieldCheckFailedFailed to validate the parameters. The parameters may be missing or invalid.The parameter verification fails. This parameter may be missing or invalid.
500InternalErrorAn error occurred while processing your request. Try again later.The MQTT backend service is abnormal. Please try again.
400InstancePermissionCheckFailedAn error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.The error message returned because the instance permission verification fails. Check the ownership and authorization policy of the MQTT instance.
400InstanceNotFoundFailed to find the instance. The instanceId may be invalid.Unable to find instance.
400PermissionCheckFailedAn error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.The error message returned because the resource permission verification failed. Check the instance, Topic, and Group ID for their permissions and authorization policies.

For a list of error codes, visit the API Error Center.