Deleting a Kafka Message
Function
This API is used to delete a Kafka message.
This API is out-of-date and may not be maintained in the future. Please use the API described in Deleting a Kafka Message.
URI
DELETE /v2/{project_id}/kafka/instances/{instance_id}/topics/{topic}/messages
| 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
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| partitions | No | Array of PartitionOffsetEntity objects | Details of the partition consumer offset. |
Response
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| partitions | Array of PartitionResp objects | Partition response information. |
Example Request
DELETE https://{endpoint}/v2/{project_id}/kafka/instances/{instance_id}/topics/{topic}/messages
{
"partitions" : [ {
"partition" : 0,
"offset" : 1
} ]
} Example Response
Status code: 200
Message deleted.
{
"partitions" : [ {
"partition" : 0,
"result" : "success",
"error_code" : 0
} ]
} Status Code
| Code | Description |
|---|---|
| 200 | Message deleted. |
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.