Queries the consumer groups in a Message Queue for Apache Kafka 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

Parameter Type Required Example Description
Action String Yes GetConsumerList

The operation that you want to perform. Set the value to GetConsumerList.

InstanceId String Yes alikafka_post-cn-v0h18sav****

The ID of the instance to which the consumer group belongs.

RegionId String Yes cn-hangzhou

The ID of the region in which the instance of the consumer group is deployed.

ConsumerId String No kafka-test

The ID of the consumer group. If you do not specify this parameter, all consumer groups are queried.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code. The HTTP status code 200 indicates that the request is successful.

Message String operation success.

The returned message.

RequestId String 808F042B-CB9A-4FBC-9009-00E7DDB6****

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

ConsumerList Array of ConsumerVO

The information about the consumer groups.

ConsumerVO
ConsumerId String kafka-test

The name of the consumer group.

InstanceId String alikafka_post-cn-v0h18sav****

The ID of the instance.

Remark String test

The description of the consumer group.

RegionId String cn-hangzhou

The ID of the region.

Tags Array of TagVO

The tags of the consumer group.

TagVO
Key String test

The key of the tag.

Value String test

The value of the tag.

Examples

Sample requests

http(s)://alikafka.cn-hangzhou.aliyuncs.com/?Action=GetConsumerList
&InstanceId=alikafka_post-cn-v0h18sav****
&RegionId=cn-hangzhou
&ConsumerId=kafka-test
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetConsumerListResponse>
    <Code>200</Code>
    <Message>operation success.</Message>
    <RequestId>808F042B-CB9A-4FBC-9009-00E7DDB6****</RequestId>
    <Success>true</Success>
    <ConsumerList>
        <ConsumerId>kafka-test</ConsumerId>
        <InstanceId>alikafka_post-cn-v0h18sav****</InstanceId>
        <Remark>test</Remark>
        <RegionId>cn-hangzhou</RegionId>
        <Tags>
            <Key>test</Key>
            <Value>test</Value>
        </Tags>
    </ConsumerList>
</GetConsumerListResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Code" : 200,
  "Message" : "operation success.",
  "RequestId" : "808F042B-CB9A-4FBC-9009-00E7DDB6****",
  "Success" : true,
  "ConsumerList" : [ {
    "ConsumerId" : "kafka-test",
    "InstanceId" : "alikafka_post-cn-v0h18sav****",
    "Remark" : "test",
    "RegionId" : "cn-hangzhou",
    "Tags" : [ {
      "Key" : "test",
      "Value" : "test"
    } ]
  } ]
}

Error codes

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