Deleting Kafka Messages
Function
This API is used to delete Kafka messages.
URI
POST /v2/{project_id}/kafka/instances/{instance_id}/topics/{topic}/messages/delete
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
| instance_id | Yes | String | Instance ID. |
| topic | Yes | String | Topic name. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| partitions | No | Array of PartitionOffsetEntity objects | Partition offset details. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| partitions | Array of PartitionResp objects | Partition response information. |
Example Requests
Deleting Kafka messages
POST https://{endpoint}/v2/{project_id}/kafka/instances/{instance_id}/topics/{topic}/messages/delete
{
"partitions" : [ {
"partition" : 0,
"offset" : 1
} ]
} Example Responses
Status code: 200
Messages deleted.
{
"partitions" : [ {
"partition" : 0,
"result" : "success",
"error_code" : 0
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Messages deleted. |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot