Querying the Consumer Group List
Function
This API is used to query the consumer group list.
URI
GET /v2/{project_id}/instances/{instance_id}/groups
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. For details about how to obtain it, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
|
instance_id |
Yes |
String |
Definition Instance ID. You can call the API for querying all instances to obtain the instance ID. The instance ID is in the response body. Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
group |
No |
String |
Definition Consumer group name. Constraints N/A Range N/A Default value N/A |
|
limit |
No |
Integer |
Definition Number of records to query. Constraints N/A Range N/A Default value 10 |
|
offset |
No |
Integer |
Definition Offset where the query starts. Constraints N/A Range ≥ 0 Default value 0 |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
Number |
Definition Total number of consumer groups. Range N/A |
|
groups |
Array of ConsumerGroup objects |
Definition Consumer group list. |
|
max |
Integer |
Definition Maximum number of consumer groups that can be created. Range N/A |
|
remaining |
Integer |
Definition Remaining number of consumer groups that can be created. Range N/A |
|
next_offset |
Integer |
Definition Offset of the next page. Range N/A |
|
previous_offset |
Integer |
Definition Offset of the previous page. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
enabled |
Boolean |
Definition Whether consumption is allowed. Range
|
|
broadcast |
Boolean |
Definition Whether to broadcast. Range
|
|
brokers |
Array of strings |
Definition List of associated brokers. |
|
name |
String |
Definition Consumer group name. Range N/A |
|
group_desc |
String |
Definition Consumer group description. Range N/A |
|
retry_max_time |
Integer |
Definition Maximum number of retries. Range 1–16 |
|
created_at |
Long |
Definition Creation time. Range N/A |
|
permissions |
Array of strings |
Definition Permission set. |
|
consume_orderly |
Boolean |
Definition Whether orderly consumption is enabled. Range
|
|
group_online |
Boolean |
Definition Whether the consumer group is online. Range
|
Example Requests
Querying the consumer group list of a RocketMQ instance
GET https://{endpoint}/v2/{project_id}/instances/{instance_id}/groups
Example Responses
Status code: 200
Consumer groups queried successfully.
{
"total" : 1,
"groups" : [ {
"name" : "group-1",
"enabled" : true,
"broadcast" : false,
"brokers" : [ "broker-0" ],
"created_at" : 1709087952686,
"permissions" : [ ],
"retry_max_time" : 16,
"consume_orderly" : false,
"group_online" : false,
"group_desc" : "test"
} ],
"max" : 4000,
"remaining" : 3999,
"next_offset" : -1,
"previous_offset" : -1
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Consumer groups queried successfully. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.