Creating a Consumer Group
Function
This API is used to create a consumer group.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/kafka/instances/{instance_id}/group
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details about how to obtain it, see Obtaining a Project ID. |
| instance_id | Yes | String | Instance ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| group_name | Yes | String | Definition Consumer group name. Constraints 3 to 64 characters Range N/A Default Value N/A |
| group_desc | No | String | Definition Consumer group description. Constraints A maximum of 200 characters Range N/A Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| - | String | Creation result. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Example Requests
Creating a consumer group named test
POST https://{endpoint}/v2/{project_id}/kafka/instances/{instance_id}/group
{
"group_name" : "test"
} Example Responses
Status code: 200
Creation succeeded.
success
Status Codes
| Status Code | Description |
|---|---|
| 200 | Creation succeeded. |
| 400 | Creation failed. |
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.