Produce a message to a topic in IBM Event Streams.
POST /v2/topics/{topic_name}/records
Produce a message to a topic in IBM Event Streams. Messages can include headers, keys and values. If required, an Avro schema can be specified for keys and values.
Request
Request Body
The details of the message to be produced to the topic.
Path Parameters
topic_name
Required *
string
The name of the topic you want to produce the messages to.
Query Parameters
serializer
string
The type of third party serializer to be used. This must be specified when using schemas. Supported value is "confluent".
Response
200 - Message successfully sent to IBM Event Streams.
topic_name
string
The name of the topic the message was produced to. example: "topic_name": "test-topic"
timestamp
string
The timestamp of the message. example: "timestamp": "2022-01-24T06:43:39.079206553Z"
partition_id
integer
The partition the message was sent to. example: "partition_id": 0
offset
integer
The offset the message was sent to. example: "offset": 12
key
ProduceResponseSchemaMetadata
The key object returned as a part of response object on successful request. example: "key": { "type": "avro", "schema_id": 100, "schema_artifact_id": "com.eventstreams.info.sample-key" }
value
ProduceResponseSchemaMetadata
The value object returned as a part of response object on successful request. example: "value": { "type": "avro", "schema_id": 101, "schema_artifact_id": "com.eventstreams.info.sample-value" }