Produce Records
POST/kafka/v3/clusters/:cluster_id/topics/:topic_name/records
Produce records to the given topic, returning delivery reports for each record produced. This API can be used in streaming mode by setting "Transfer-Encoding: chunked" header. For as long as the connection is kept open, the server will keep accepting records. Records are streamed to and from the server as Concatenated JSON. For each record sent to the server, the server will asynchronously send back a delivery report, in the same order, each with its own error_code. An error_code of 200 indicates success. The HTTP status code will be HTTP 200 OK as long as the connection is successfully established. To identify records that have encountered an error, check the error_code of each delivery report.
Note that the cluster_id is validated only when running in Confluent Cloud.
This API currently does not support Schema Registry integration. Sending schemas is not supported. Only BINARY, JSON, and STRING formats are supported.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 413
- 415
- 422
- 429
- 5XX
The response containing a delivery report for a record produced to a topic. In streaming mode, for each record sent, a separate delivery report will be returned, in the same order, each with its own error_code.
Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure.
Indicates a client authentication error. Kafka authentication failures will contain error code 40101 in the response body.
Indicates a client authorization error. Kafka authorization failures will contain error code 40301 in the response body.
Indicates attempted access to an unreachable or non-existing resource like e.g. an unknown topic or partition. GET requests to endpoints not allowed in the accesslists will also result in this response.
This implies the client is sending a request payload that is larger than the maximum message size the server can accept.
This implies the client is sending the request payload format in an unsupported format.
Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure.
Indicates that a rate limit threshold has been reached, and the client should retry again later.
A server-side problem that might not be addressable from the client side. Retriable Kafka errors will contain error code 50003 in the response body.