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 |
Project ID. |
instance_id |
Yes |
String |
Instance ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
group |
No |
String |
Consumer group name. |
limit |
No |
Integer |
Number of records to query. Default: 10 |
offset |
No |
Integer |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. Default: 0 |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Number |
Total number of consumer groups. |
groups |
Array of ConsumerGroup objects |
Consumer group list. |
max |
Number |
Maximum number of consumer groups that can be created. |
remaining |
Number |
Number of consumer groups that can still be created. |
next_offset |
Number |
Offset of the next page. |
previous_offset |
Number |
Offset of the previous page. |
Parameter |
Type |
Description |
---|---|---|
enabled |
Boolean |
Enabled or not. |
broadcast |
Boolean |
Whether to broadcast. |
brokers |
Array of strings |
List of associated brokers. |
name |
String |
Consumer group name. |
retry_max_time |
Number |
Maximum number of retries. |
from_beginning |
Boolean |
Whether consumption starts from the beginning. |
Example Requests
Querying the consumer group list
GET https://{endpoint}/v2/{project_id}/instances/{instance_id}/groups
Example Responses
Status code: 200
Consumer groups queried successfully.
{ "total" : 1, "groups" : [ { "enabled" : true, "broadcast" : false, "brokers" : [ "broker-0" ], "name" : "aaaaa", "retry_max_time" : 16, "from_beginning" : false } ], "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.