Chapter 4. Kafka Bridge API Reference 4.1. Introduction The Kafka Bridge provides a REST API for integrating HTTP based client applications with a Kafka cluster. You can use the API to create and manage consumers and send and receive records over HTTP rather than the native Kafka protocol. 4.2. Endpoints 4.2.1. Consumers 4.2.1.1. assign POST /consumers/{groupid}/instances/{name}/assignments 4.2.1.1.1. Description Assigns one or more topic partitions to a consumer. 4.2.1.1.2. Parameters Table 4.1. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the consumer belongs. X null name Name of the consumer to assign topic partitions to. X null Table 4.2. Body Parameter Name Description Required Default Pattern Partitions List of topic partitions to assign to the consumer. Section 4.3.16, " Partitions Partitions" X 4.2.1.1.3. Return Type - 4.2.1.1.4. Content Type application/vnd.kafka.v2+json 4.2.1.1.5. Responses Table 4.3. HTTP Response Codes Code Message Datatype 204 Partitions assigned successfully. <<>> 404 The specified consumer instance was not found. Section 4.3.5, " Error Error" 409 Subscriptions to topics, partitions, and patterns are mutually exclusive. Section 4.3.5, " Error Error" 4.2.1.1.6. Samples 4.2.1.2. Example HTTP request 4.2.1.2.1. Request body { "partitions" : [ { "topic" : "topic", "partition" : 0 }, { "topic" : "topic", "partition" : 1 } ] } 4.2.1.3. Example HTTP response 4.2.1.3.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.1.3.2. Response 409 { "error_code" : 409, "message" : "Subscriptions to topics, partitions, and patterns are mutually exclusive." } 4.2.1.4. commit POST /consumers/{groupid}/instances/{name}/offsets 4.2.1.4.1. Description Commits a list of consumer offsets. To commit offsets for all records fetched by the consumer, leave the request body empty. 4.2.1.4.2. Parameters Table 4.4. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the consumer belongs. X null name Name of the consumer. X null Table 4.5. Body Parameter Name Description Required Default Pattern OffsetCommitSeekList List of consumer offsets to commit to the consumer offsets commit log. You can specify one or more topic partitions to commit offsets for. Section 4.3.9, " OffsetCommitSeekList OffsetCommitSeekList" - 4.2.1.4.3. Return Type - 4.2.1.4.4. Content Type application/vnd.kafka.v2+json 4.2.1.4.5. Responses Table 4.6. HTTP Response Codes Code Message Datatype 204 Commit made successfully. <<>> 404 The specified consumer instance was not found. Section 4.3.5, " Error Error" 4.2.1.4.6. Samples 4.2.1.5. Example HTTP request 4.2.1.5.1. Request body { "offsets" : [ { "topic" : "topic", "partition" : 0, "offset" : 15 }, { "topic" : "topic", "partition" : 1, "offset" : 42 } ] } 4.2.1.6. Example HTTP response 4.2.1.6.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.1.7. createConsumer POST /consumers/{groupid} 4.2.1.7.1. Description Creates a consumer instance in the given consumer group. You can optionally specify a consumer name and supported configuration options. It returns a base URI which must be used to construct URLs for subsequent requests against this consumer instance. 4.2.1.7.2. Parameters Table 4.7. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group in which to create the consumer. X null Table 4.8. Body Parameter Name Description Required Default Pattern Consumer Name and configuration of the consumer. The name is unique within the scope of the consumer group. If a name is not specified, a randomly generated name is assigned. All parameters are optional. The supported configuration options are shown in the following example. Section 4.3.2, " Consumer Consumer" - 4.2.1.7.3. Return Type Section 4.3.4, " CreatedConsumer CreatedConsumer" 4.2.1.7.4. Content Type application/vnd.kafka.v2+json 4.2.1.7.5. Responses Table 4.9. HTTP Response Codes Code Message Datatype 200 Consumer created successfully. Section 4.3.4, " CreatedConsumer CreatedConsumer" 409 A consumer instance with the specified name already exists in the Kafka Bridge. Section 4.3.5, " Error Error" 422 One or more consumer configuration options have invalid values. Section 4.3.5, " Error Error" 4.2.1.7.6. Samples 4.2.1.8. Example HTTP request 4.2.1.8.1. Request body { "name" : "consumer1", "format" : "binary", "auto.offset.reset" : "earliest", "enable.auto.commit" : false, "fetch.min.bytes" : 512, "consumer.request.timeout.ms" : 30000, "isolation.level" : "read_committed" } 4.2.1.9. Example HTTP response 4.2.1.9.1. Response 200 { "instance_id" : "consumer1", "base_uri" : "http://localhost:8080/consumers/my-group/instances/consumer1" } 4.2.1.9.2. Response 409 { "error_code" : 409, "message" : "A consumer instance with the specified name already exists in the Kafka Bridge." } 4.2.1.9.3. Response 422 { "error_code" : 422, "message" : "One or more consumer configuration options have invalid values." } 4.2.1.10. deleteConsumer DELETE /consumers/{groupid}/instances/{name} 4.2.1.10.1. Description Deletes a specified consumer instance. The request for this operation MUST use the base URL (including the host and port) returned in the response from the POST request to /consumers/{groupid} that was used to create this consumer. 4.2.1.10.2. Parameters Table 4.10. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the consumer belongs. X null name Name of the consumer to delete. X null 4.2.1.10.3. Return Type - 4.2.1.10.4. Content Type application/vnd.kafka.v2+json 4.2.1.10.5. Responses Table 4.11. HTTP Response Codes Code Message Datatype 204 Consumer removed successfully. <<>> 404 The specified consumer instance was not found. Section 4.3.5, " Error Error" 4.2.1.10.6. Samples 4.2.1.11. Example HTTP response 4.2.1.11.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.1.12. listSubscriptions GET /consumers/{groupid}/instances/{name}/subscription 4.2.1.12.1. Description Retrieves a list of the topics to which the consumer is subscribed. 4.2.1.12.2. Parameters Table 4.12. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the subscribed consumer belongs. X null name Name of the subscribed consumer. X null 4.2.1.12.3. Return Type Section 4.3.24, " SubscribedTopicList SubscribedTopicList" 4.2.1.12.4. Content Type application/vnd.kafka.v2+json 4.2.1.12.5. Responses Table 4.13. HTTP Response Codes Code Message Datatype 200 List of subscribed topics and partitions. Section 4.3.24, " SubscribedTopicList SubscribedTopicList" 404 The specified consumer instance was not found. Section 4.3.5, " Error Error" 4.2.1.12.6. Samples 4.2.1.13. Example HTTP response 4.2.1.13.1. Response 200 { "topics" : [ "my-topic1", "my-topic2" ], "partitions" : [ { "my-topic1" : [ 1, 2, 3 ] }, { "my-topic2" : [ 1 ] } ] } 4.2.1.13.2. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.1.14. poll GET /consumers/{groupid}/instances/{name}/records 4.2.1.14.1. Description Retrieves records for a subscribed consumer, including message values, topics, and partitions. The request for this operation MUST use the base URL (including the host and port) returned in the response from the POST request to /consumers/{groupid} that was used to create this consumer. 4.2.1.14.2. Parameters Table 4.14. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the subscribed consumer belongs. X null name Name of the subscribed consumer to retrieve records from. X null Table 4.15. Query Parameters Name Description Required Default Pattern timeout The maximum amount of time, in milliseconds, that the HTTP Bridge spends retrieving records before timing out the request. - null max_bytes The maximum size, in bytes, of unencoded keys and values that can be included in the response. Otherwise, an error response with code 422 is returned. - null 4.2.1.14.3. Return Type array[ Section 4.3.3, " ConsumerRecord ConsumerRecord" ] 4.2.1.14.4. Content Type application/vnd.kafka.json.v2+json application/vnd.kafka.binary.v2+json application/vnd.kafka.text.v2+json application/vnd.kafka.v2+json 4.2.1.14.5. Responses Table 4.16. HTTP Response Codes Code Message Datatype 200 Poll request executed successfully. List[ Section 4.3.3, " ConsumerRecord ConsumerRecord" ] 404 The specified consumer instance was not found. Section 4.3.5, " Error Error" 406 The `format` used in the consumer creation request does not match the embedded format in the Accept header of this request or the bridge got a message from the topic which is not JSON encoded. Section 4.3.5, " Error Error" 422 Response exceeds the maximum number of bytes the consumer can receive Section 4.3.5, " Error Error" 4.2.1.14.6. Samples 4.2.1.15. Example HTTP response 4.2.1.15.1. Response 200 [ { "topic" : "topic", "key" : "key1", "value" : { "foo" : "bar" }, "partition" : 0, "offset" : 2 }, { "topic" : "topic", "key" : "key2", "value" : [ "foo2", "bar2" ], "partition" : 1, "offset" : 3 } ] [ { "topic": "test", "key": "a2V5", "value": "Y29uZmx1ZW50", "partition": 1, "offset": 100, }, { "topic": "test", "key": "a2V5", "value": "a2Fma2E=", "partition": 2, "offset": 101, } ] 4.2.1.15.2. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.1.15.3. Response 406 { "error_code" : 406, "message" : "The `format` used in the consumer creation request does not match the embedded format in the Accept header of this request." } 4.2.1.15.4. Response 422 { "error_code" : 422, "message" : "Response exceeds the maximum number of bytes the consumer can receive" } 4.2.1.16. seek POST /consumers/{groupid}/instances/{name}/positions 4.2.1.16.1. Description Configures a subscribed consumer to fetch offsets from a particular offset the time it fetches a set of records from a given topic partition. This overrides the default fetch behavior for consumers. You can specify one or more topic partitions. 4.2.1.16.2. Parameters Table 4.17. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the consumer belongs. X null name Name of the subscribed consumer. X null Table 4.18. Body Parameter Name Description Required Default Pattern OffsetCommitSeekList List of partition offsets from which the subscribed consumer will fetch records. Section 4.3.9, " OffsetCommitSeekList OffsetCommitSeekList" X 4.2.1.16.3. Return Type - 4.2.1.16.4. Content Type application/vnd.kafka.v2+json 4.2.1.16.5. Responses Table 4.19. HTTP Response Codes Code Message Datatype 204 Seek performed successfully. <<>> 404 The specified consumer instance was not found, or the specified consumer instance did not have one of the specified partitions assigned. Section 4.3.5, " Error Error" 4.2.1.16.6. Samples 4.2.1.17. Example HTTP request 4.2.1.17.1. Request body { "offsets" : [ { "topic" : "topic", "partition" : 0, "offset" : 15 }, { "topic" : "topic", "partition" : 1, "offset" : 42 } ] } 4.2.1.18. Example HTTP response 4.2.1.18.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.1.19. seekToBeginning POST /consumers/{groupid}/instances/{name}/positions/beginning 4.2.1.19.1. Description Configures a subscribed consumer to seek (and subsequently read from) the first offset in one or more given topic partitions. 4.2.1.19.2. Parameters Table 4.20. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the subscribed consumer belongs. X null name Name of the subscribed consumer. X null Table 4.21. Body Parameter Name Description Required Default Pattern Partitions List of topic partitions to which the consumer is subscribed. The consumer will seek the first offset in the specified partitions. Section 4.3.16, " Partitions Partitions" X 4.2.1.19.3. Return Type - 4.2.1.19.4. Content Type application/vnd.kafka.v2+json 4.2.1.19.5. Responses Table 4.22. HTTP Response Codes Code Message Datatype 204 Seek to the beginning performed successfully. <<>> 404 The specified consumer instance was not found, or the specified consumer instance did not have one of the specified partitions assigned. Section 4.3.5, " Error Error" 4.2.1.19.6. Samples 4.2.1.20. Example HTTP request 4.2.1.20.1. Request body { "partitions" : [ { "topic" : "topic", "partition" : 0 }, { "topic" : "topic", "partition" : 1 } ] } 4.2.1.21. Example HTTP response 4.2.1.21.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.1.22. seekToEnd POST /consumers/{groupid}/instances/{name}/positions/end 4.2.1.22.1. Description Configures a subscribed consumer to seek (and subsequently read from) the offset at the end of one or more of the given topic partitions. 4.2.1.22.2. Parameters Table 4.23. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the subscribed consumer belongs. X null name Name of the subscribed consumer. X null Table 4.24. Body Parameter Name Description Required Default Pattern Partitions List of topic partitions to which the consumer is subscribed. The consumer will seek the last offset in the specified partitions. Section 4.3.16, " Partitions Partitions" X 4.2.1.22.3. Return Type - 4.2.1.22.4. Content Type application/vnd.kafka.v2+json 4.2.1.22.5. Responses Table 4.25. HTTP Response Codes Code Message Datatype 204 Seek to the end performed successfully. <<>> 404 The specified consumer instance was not found, or the specified consumer instance did not have one of the specified partitions assigned. Section 4.3.5, " Error Error" 4.2.1.22.6. Samples 4.2.1.23. Example HTTP request 4.2.1.23.1. Request body { "partitions" : [ { "topic" : "topic", "partition" : 0 }, { "topic" : "topic", "partition" : 1 } ] } 4.2.1.24. Example HTTP response 4.2.1.24.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.1.25. subscribe POST /consumers/{groupid}/instances/{name}/subscription 4.2.1.25.1. Description Subscribes a consumer to one or more topics. You can describe the topics to which the consumer will subscribe in a list (of Topics type) or as a topic_pattern field. Each call replaces the subscriptions for the subscriber. 4.2.1.25.2. Parameters Table 4.26. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the subscribed consumer belongs. X null name Name of the consumer to subscribe to topics. X null Table 4.27. Body Parameter Name Description Required Default Pattern Topics List of topics to which the consumer will subscribe. Section 4.3.26, " Topics Topics" X 4.2.1.25.3. Return Type - 4.2.1.25.4. Content Type application/vnd.kafka.v2+json 4.2.1.25.5. Responses Table 4.28. HTTP Response Codes Code Message Datatype 204 Consumer subscribed successfully. <<>> 404 The specified consumer instance was not found. Section 4.3.5, " Error Error" 409 Subscriptions to topics, partitions, and patterns are mutually exclusive. Section 4.3.5, " Error Error" 422 A list (of `Topics` type) or a `topic_pattern` must be specified. Section 4.3.5, " Error Error" 4.2.1.25.6. Samples 4.2.1.26. Example HTTP request 4.2.1.26.1. Request body { "topics" : [ "topic1", "topic2" ] } 4.2.1.27. Example HTTP response 4.2.1.27.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.1.27.2. Response 409 { "error_code" : 409, "message" : "Subscriptions to topics, partitions, and patterns are mutually exclusive." } 4.2.1.27.3. Response 422 { "error_code" : 422, "message" : "A list (of Topics type) or a topic_pattern must be specified." } 4.2.1.28. unsubscribe DELETE /consumers/{groupid}/instances/{name}/subscription 4.2.1.28.1. Description Unsubscribes a consumer from all topics. 4.2.1.28.2. Parameters Table 4.29. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the subscribed consumer belongs. X null name Name of the consumer to unsubscribe from topics. X null 4.2.1.28.3. Return Type - 4.2.1.28.4. Content Type application/json 4.2.1.28.5. Responses Table 4.30. HTTP Response Codes Code Message Datatype 204 Consumer unsubscribed successfully. <<>> 404 The specified consumer instance was not found. Section 4.3.5, " Error Error" 4.2.1.28.6. Samples 4.2.1.29. Example HTTP response 4.2.1.29.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.2. Default 4.2.2.1. healthy GET /healthy 4.2.2.1.1. Description Check if the bridge is running. This does not necessarily imply that it is ready to accept requests. 4.2.2.1.2. Parameters 4.2.2.1.3. Return Type - 4.2.2.1.4. Responses Table 4.31. HTTP Response Codes Code Message Datatype 204 The bridge is healthy <<>> 500 The bridge is not healthy <<>> 4.2.2.1.5. Samples 4.2.2.2. info GET / 4.2.2.2.1. Description Retrieves information about the Kafka Bridge instance, in JSON format. 4.2.2.2.2. Parameters 4.2.2.2.3. Return Type Section 4.3.1, " BridgeInfo BridgeInfo" 4.2.2.2.4. Content Type application/json 4.2.2.2.5. Responses Table 4.32. HTTP Response Codes Code Message Datatype 200 Information about Kafka Bridge instance. Section 4.3.1, " BridgeInfo BridgeInfo" 4.2.2.2.6. Samples 4.2.2.3. Example HTTP response 4.2.2.3.1. Response 200 { "bridge_version" : 2.9 } 4.2.2.4. metrics GET /metrics 4.2.2.4.1. Description Retrieves the bridge metrics in Prometheus format. 4.2.2.4.2. Parameters 4.2.2.4.3. Return Type String 4.2.2.4.4. Content Type text/plain 4.2.2.4.5. Responses Table 4.33. HTTP Response Codes Code Message Datatype 200 Metrics in Prometheus format retrieved successfully. String 4.2.2.4.6. Samples 4.2.2.5. openapi GET /openapi 4.2.2.5.1. Description Retrieves the OpenAPI v2 specification in JSON format. 4.2.2.5.2. Parameters 4.2.2.5.3. Return Type String 4.2.2.5.4. Content Type application/json 4.2.2.5.5. Responses Table 4.34. HTTP Response Codes Code Message Datatype 200 OpenAPI v2 specification in JSON format retrieved successfully. String 4.2.2.5.6. Samples 4.2.2.6. openapiv2 GET /openapi/v2 4.2.2.6.1. Description Retrieves the OpenAPI v2 specification in JSON format. 4.2.2.6.2. Parameters 4.2.2.6.3. Return Type String 4.2.2.6.4. Content Type application/json 4.2.2.6.5. Responses Table 4.35. HTTP Response Codes Code Message Datatype 200 OpenAPI v2 specification in JSON format retrieved successfully. String 4.2.2.6.6. Samples 4.2.2.7. openapiv3 GET /openapi/v3 4.2.2.7.1. Description Retrieves the OpenAPI v3 specification in JSON format. 4.2.2.7.2. Parameters 4.2.2.7.3. Return Type String 4.2.2.7.4. Content Type application/json 4.2.2.7.5. Responses Table 4.36. HTTP Response Codes Code Message Datatype 200 OpenAPI v3 specification in JSON format retrieved successfully. String 4.2.2.7.6. Samples 4.2.2.8. ready GET /ready 4.2.2.8.1. Description Check if the bridge is ready and can accept requests. 4.2.2.8.2. Parameters 4.2.2.8.3. Return Type - 4.2.2.8.4. Responses Table 4.37. HTTP Response Codes Code Message Datatype 204 The bridge is ready <<>> 500 The bridge is not ready <<>> 4.2.2.8.5. Samples 4.2.3. Producer 4.2.3.1. send POST /topics/{topicname} 4.2.3.1.1. Description Sends one or more records to a given topic, optionally specifying a partition, key, or both. 4.2.3.1.2. Parameters Table 4.38. Path Parameters Name Description Required Default Pattern topicname Name of the topic to send records to or retrieve metadata from. X null Table 4.39. Body Parameter Name Description Required Default Pattern ProducerRecordList Section 4.3.18, " ProducerRecordList ProducerRecordList" X Table 4.40. Query Parameters Name Description Required Default Pattern async Ignore metadata as result of the sending operation, not returning them to the client. If not specified it is false, metadata returned. - null 4.2.3.1.3. Return Type Section 4.3.11, " OffsetRecordSentList OffsetRecordSentList" 4.2.3.1.4. Content Type application/vnd.kafka.v2+json 4.2.3.1.5. Responses Table 4.41. HTTP Response Codes Code Message Datatype 200 Records sent successfully. Section 4.3.11, " OffsetRecordSentList OffsetRecordSentList" 404 The specified topic was not found. Section 4.3.5, " Error Error" 422 The record list is not valid. Section 4.3.5, " Error Error" 4.2.3.1.6. Samples 4.2.3.2. Example HTTP request 4.2.3.2.1. Request body { "records" : [ { "key" : "key1", "value" : "value1" }, { "value" : "value2", "partition" : 1 }, { "value" : "value3" } ] } 4.2.3.3. Example HTTP response 4.2.3.3.1. Response 200 { "offsets" : [ { "partition" : 2, "offset" : 0 }, { "partition" : 1, "offset" : 1 }, { "partition" : 2, "offset" : 2 } ] } 4.2.3.3.2. Response 404 { "error_code" : 404, "message" : "The specified topic was not found." } 4.2.3.3.3. Response 422 { "error_code" : 422, "message" : "The record list contains invalid records." } 4.2.3.4. sendToPartition POST /topics/{topicname}/partitions/{partitionid} 4.2.3.4.1. Description Sends one or more records to a given topic partition, optionally specifying a key. 4.2.3.4.2. Parameters Table 4.42. Path Parameters Name Description Required Default Pattern topicname Name of the topic to send records to or retrieve metadata from. X null partitionid ID of the partition to send records to or retrieve metadata from. X null Table 4.43. Body Parameter Name Description Required Default Pattern ProducerRecordToPartitionList List of records to send to a given topic partition, including a value (required) and a key (optional). Section 4.3.20, " ProducerRecordToPartitionList ProducerRecordToPartitionList" X Table 4.44. Query Parameters Name Description Required Default Pattern async Whether to return immediately upon sending records, instead of waiting for metadata. No offsets will be returned if specified. Defaults to false. - null 4.2.3.4.3. Return Type Section 4.3.11, " OffsetRecordSentList OffsetRecordSentList" 4.2.3.4.4. Content Type application/vnd.kafka.v2+json 4.2.3.4.5. Responses Table 4.45. HTTP Response Codes Code Message Datatype 200 Records sent successfully. Section 4.3.11, " OffsetRecordSentList OffsetRecordSentList" 404 The specified topic partition was not found. Section 4.3.5, " Error Error" 422 The record is not valid. Section 4.3.5, " Error Error" 4.2.3.4.6. Samples 4.2.3.5. Example HTTP request 4.2.3.5.1. Request body { "records" : [ { "key" : "key1", "value" : "value1" }, { "value" : "value2" } ] } 4.2.3.6. Example HTTP response 4.2.3.6.1. Response 200 { "offsets" : [ { "partition" : 2, "offset" : 0 }, { "partition" : 1, "offset" : 1 }, { "partition" : 2, "offset" : 2 } ] } 4.2.3.6.2. Response 404 { "error_code" : 404, "message" : "The specified topic partition was not found." } 4.2.3.6.3. Response 422 { "error_code" : 422, "message" : "The record is not valid." } 4.2.4. Seek 4.2.4.1. seek POST /consumers/{groupid}/instances/{name}/positions 4.2.4.1.1. Description Configures a subscribed consumer to fetch offsets from a particular offset the time it fetches a set of records from a given topic partition. This overrides the default fetch behavior for consumers. You can specify one or more topic partitions. 4.2.4.1.2. Parameters Table 4.46. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the consumer belongs. X null name Name of the subscribed consumer. X null Table 4.47. Body Parameter Name Description Required Default Pattern OffsetCommitSeekList List of partition offsets from which the subscribed consumer will fetch records. Section 4.3.9, " OffsetCommitSeekList OffsetCommitSeekList" X 4.2.4.1.3. Return Type - 4.2.4.1.4. Content Type application/vnd.kafka.v2+json 4.2.4.1.5. Responses Table 4.48. HTTP Response Codes Code Message Datatype 204 Seek performed successfully. <<>> 404 The specified consumer instance was not found, or the specified consumer instance did not have one of the specified partitions assigned. Section 4.3.5, " Error Error" 4.2.4.1.6. Samples 4.2.4.2. Example HTTP request 4.2.4.2.1. Request body { "offsets" : [ { "topic" : "topic", "partition" : 0, "offset" : 15 }, { "topic" : "topic", "partition" : 1, "offset" : 42 } ] } 4.2.4.3. Example HTTP response 4.2.4.3.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.4.4. seekToBeginning POST /consumers/{groupid}/instances/{name}/positions/beginning 4.2.4.4.1. Description Configures a subscribed consumer to seek (and subsequently read from) the first offset in one or more given topic partitions. 4.2.4.4.2. Parameters Table 4.49. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the subscribed consumer belongs. X null name Name of the subscribed consumer. X null Table 4.50. Body Parameter Name Description Required Default Pattern Partitions List of topic partitions to which the consumer is subscribed. The consumer will seek the first offset in the specified partitions. Section 4.3.16, " Partitions Partitions" X 4.2.4.4.3. Return Type - 4.2.4.4.4. Content Type application/vnd.kafka.v2+json 4.2.4.4.5. Responses Table 4.51. HTTP Response Codes Code Message Datatype 204 Seek to the beginning performed successfully. <<>> 404 The specified consumer instance was not found, or the specified consumer instance did not have one of the specified partitions assigned. Section 4.3.5, " Error Error" 4.2.4.4.6. Samples 4.2.4.5. Example HTTP request 4.2.4.5.1. Request body { "partitions" : [ { "topic" : "topic", "partition" : 0 }, { "topic" : "topic", "partition" : 1 } ] } 4.2.4.6. Example HTTP response 4.2.4.6.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.4.7. seekToEnd POST /consumers/{groupid}/instances/{name}/positions/end 4.2.4.7.1. Description Configures a subscribed consumer to seek (and subsequently read from) the offset at the end of one or more of the given topic partitions. 4.2.4.7.2. Parameters Table 4.52. Path Parameters Name Description Required Default Pattern groupid ID of the consumer group to which the subscribed consumer belongs. X null name Name of the subscribed consumer. X null Table 4.53. Body Parameter Name Description Required Default Pattern Partitions List of topic partitions to which the consumer is subscribed. The consumer will seek the last offset in the specified partitions. Section 4.3.16, " Partitions Partitions" X 4.2.4.7.3. Return Type - 4.2.4.7.4. Content Type application/vnd.kafka.v2+json 4.2.4.7.5. Responses Table 4.54. HTTP Response Codes Code Message Datatype 204 Seek to the end performed successfully. <<>> 404 The specified consumer instance was not found, or the specified consumer instance did not have one of the specified partitions assigned. Section 4.3.5, " Error Error" 4.2.4.7.6. Samples 4.2.4.8. Example HTTP request 4.2.4.8.1. Request body { "partitions" : [ { "topic" : "topic", "partition" : 0 }, { "topic" : "topic", "partition" : 1 } ] } 4.2.4.9. Example HTTP response 4.2.4.9.1. Response 404 { "error_code" : 404, "message" : "The specified consumer instance was not found." } 4.2.5. Topics 4.2.5.1. createTopic POST /admin/topics 4.2.5.1.1. Description Creates a topic with given name, partitions count, and replication factor. 4.2.5.1.2. Parameters Table 4.55. Body Parameter Name Description Required Default Pattern NewTopic Creates a topic with given name, partitions count, and replication factor. Section 4.3.7, " NewTopic NewTopic" X 4.2.5.1.3. Return Type - 4.2.5.1.4. Responses Table 4.56. HTTP Response Codes Code Message Datatype 201 Created <<>> 4.2.5.1.5. Samples 4.2.5.2. Example HTTP request 4.2.5.2.1. Request body { "topic_name" : "my-topic", "partitions_count" : 1, "replication_factor" : 2, } 4.2.5.3. getOffsets GET /topics/{topicname}/partitions/{partitionid}/offsets 4.2.5.3.1. Description Retrieves a summary of the offsets for the topic partition. 4.2.5.3.2. Parameters Table 4.57. Path Parameters Name Description Required Default Pattern topicname Name of the topic containing the partition. X null partitionid ID of the partition. X null 4.2.5.3.3. Return Type Section 4.3.13, " OffsetsSummary OffsetsSummary" 4.2.5.3.4. Content Type application/vnd.kafka.v2+json 4.2.5.3.5. Responses Table 4.58. HTTP Response Codes Code Message Datatype 200 A summary of the offsets of the topic partition. Section 4.3.13, " OffsetsSummary OffsetsSummary" 404 The specified topic partition was not found. Section 4.3.5, " Error Error" 4.2.5.3.6. Samples 4.2.5.4. Example HTTP response 4.2.5.4.1. Response 200 { "beginning_offset" : 10, "end_offset" : 50 } 4.2.5.4.2. Response 404 { "error_code" : 404, "message" : "The specified topic partition was not found." } 4.2.5.5. getPartition GET /topics/{topicname}/partitions/{partitionid} 4.2.5.5.1. Description Retrieves partition metadata for the topic partition. 4.2.5.5.2. Parameters Table 4.59. Path Parameters Name Description Required Default Pattern topicname Name of the topic to send records to or retrieve metadata from. X null partitionid ID of the partition to send records to or retrieve metadata from. X null 4.2.5.5.3. Return Type Section 4.3.15, " PartitionMetadata PartitionMetadata" 4.2.5.5.4. Content Type application/vnd.kafka.v2+json 4.2.5.5.5. Responses Table 4.60. HTTP Response Codes Code Message Datatype 200 Partition metadata Section 4.3.15, " PartitionMetadata PartitionMetadata" 404 The specified partition was not found. Section 4.3.5, " Error Error" 4.2.5.5.6. Samples 4.2.5.6. Example HTTP response 4.2.5.6.1. Response 200 { "partition" : 1, "leader" : 1, "replicas" : [ { "broker" : 1, "leader" : true, "in_sync" : true }, { "broker" : 2, "leader" : false, "in_sync" : true } ] } 4.2.5.6.2. Response 404 { "error_code" : 404, "message" : "The specified topic partition was not found." } 4.2.5.7. getTopic GET /topics/{topicname} 4.2.5.7.1. Description Retrieves the metadata about a given topic. 4.2.5.7.2. Parameters Table 4.61. Path Parameters Name Description Required Default Pattern topicname Name of the topic to send records to or retrieve metadata from. X null 4.2.5.7.3. Return Type Section 4.3.25, " TopicMetadata TopicMetadata" 4.2.5.7.4. Content Type application/vnd.kafka.v2+json 4.2.5.7.5. Responses Table 4.62. HTTP Response Codes Code Message Datatype 200 Topic metadata Section 4.3.25, " TopicMetadata TopicMetadata" 404 The specified topic was not found. Section 4.3.5, " Error Error" 4.2.5.7.6. Samples 4.2.5.8. Example HTTP response 4.2.5.8.1. Response 200 { "name" : "topic", "offset" : 2, "configs" : { "cleanup.policy" : "compact" }, "partitions" : [ { "partition" : 1, "leader" : 1, "replicas" : [ { "broker" : 1, "leader" : true, "in_sync" : true }, { "broker" : 2, "leader" : false, "in_sync" : true } ] }, { "partition" : 2, "leader" : 2, "replicas" : [ { "broker" : 1, "leader" : false, "in_sync" : true }, { "broker" : 2, "leader" : true, "in_sync" : true } ] } ] } 4.2.5.9. listPartitions GET /topics/{topicname}/partitions 4.2.5.9.1. Description Retrieves a list of partitions for the topic. 4.2.5.9.2. Parameters Table 4.63. Path Parameters Name Description Required Default Pattern topicname Name of the topic to send records to or retrieve metadata from. X null 4.2.5.9.3. Return Type array[ Section 4.3.15, " PartitionMetadata PartitionMetadata" ] 4.2.5.9.4. Content Type application/vnd.kafka.v2+json 4.2.5.9.5. Responses Table 4.64. HTTP Response Codes Code Message Datatype 200 List of partitions. List[ Section 4.3.15, " PartitionMetadata PartitionMetadata" ] 404 The specified topic was not found. Section 4.3.5, " Error Error" 4.2.5.9.6. Samples 4.2.5.10. Example HTTP response 4.2.5.10.1. Response 200 [ { "partition" : 1, "leader" : 1, "replicas" : [ { "broker" : 1, "leader" : true, "in_sync" : true }, { "broker" : 2, "leader" : false, "in_sync" : true } ] }, { "partition" : 2, "leader" : 2, "replicas" : [ { "broker" : 1, "leader" : false, "in_sync" : true }, { "broker" : 2, "leader" : true, "in_sync" : true } ] } ] 4.2.5.10.2. Response 404 { "error_code" : 404, "message" : "The specified topic was not found." } 4.2.5.11. listTopics GET /topics 4.2.5.11.1. Description Retrieves a list of all topics. 4.2.5.11.2. Parameters 4.2.5.11.3. Return Type List 4.2.5.11.4. Content Type application/vnd.kafka.v2+json 4.2.5.11.5. Responses Table 4.65. HTTP Response Codes Code Message Datatype 200 List of topics. List[String] 4.2.5.11.6. Samples 4.2.5.12. Example HTTP response 4.2.5.12.1. Response 200 [ "topic1", "topic2" ] 4.2.5.13. send POST /topics/{topicname} 4.2.5.13.1. Description Sends one or more records to a given topic, optionally specifying a partition, key, or both. 4.2.5.13.2. Parameters Table 4.66. Path Parameters Name Description Required Default Pattern topicname Name of the topic to send records to or retrieve metadata from. X null Table 4.67. Body Parameter Name Description Required Default Pattern ProducerRecordList Section 4.3.18, " ProducerRecordList ProducerRecordList" X Table 4.68. Query Parameters Name Description Required Default Pattern async Ignore metadata as result of the sending operation, not returning them to the client. If not specified it is false, metadata returned. - null 4.2.5.13.3. Return Type Section 4.3.11, " OffsetRecordSentList OffsetRecordSentList" 4.2.5.13.4. Content Type application/vnd.kafka.v2+json 4.2.5.13.5. Responses Table 4.69. HTTP Response Codes Code Message Datatype 200 Records sent successfully. Section 4.3.11, " OffsetRecordSentList OffsetRecordSentList" 404 The specified topic was not found. Section 4.3.5, " Error Error" 422 The record list is not valid. Section 4.3.5, " Error Error" 4.2.5.13.6. Samples 4.2.5.14. Example HTTP request 4.2.5.14.1. Request body { "records" : [ { "key" : "key1", "value" : "value1" }, { "value" : "value2", "partition" : 1 }, { "value" : "value3" } ] } 4.2.5.15. Example HTTP response 4.2.5.15.1. Response 200 { "offsets" : [ { "partition" : 2, "offset" : 0 }, { "partition" : 1, "offset" : 1 }, { "partition" : 2, "offset" : 2 } ] } 4.2.5.15.2. Response 404 { "error_code" : 404, "message" : "The specified topic was not found." } 4.2.5.15.3. Response 422 { "error_code" : 422, "message" : "The record list contains invalid records." } 4.2.5.16. sendToPartition POST /topics/{topicname}/partitions/{partitionid} 4.2.5.16.1. Description Sends one or more records to a given topic partition, optionally specifying a key. 4.2.5.16.2. Parameters Table 4.70. Path Parameters Name Description Required Default Pattern topicname Name of the topic to send records to or retrieve metadata from. X null partitionid ID of the partition to send records to or retrieve metadata from. X null Table 4.71. Body Parameter Name Description Required Default Pattern ProducerRecordToPartitionList List of records to send to a given topic partition, including a value (required) and a key (optional). Section 4.3.20, " ProducerRecordToPartitionList ProducerRecordToPartitionList" X Table 4.72. Query Parameters Name Description Required Default Pattern async Whether to return immediately upon sending records, instead of waiting for metadata. No offsets will be returned if specified. Defaults to false. - null 4.2.5.16.3. Return Type Section 4.3.11, " OffsetRecordSentList OffsetRecordSentList" 4.2.5.16.4. Content Type application/vnd.kafka.v2+json 4.2.5.16.5. Responses Table 4.73. HTTP Response Codes Code Message Datatype 200 Records sent successfully. Section 4.3.11, " OffsetRecordSentList OffsetRecordSentList" 404 The specified topic partition was not found. Section 4.3.5, " Error Error" 422 The record is not valid. Section 4.3.5, " Error Error" 4.2.5.16.6. Samples 4.2.5.17. Example HTTP request 4.2.5.17.1. Request body { "records" : [ { "key" : "key1", "value" : "value1" }, { "value" : "value2" } ] } 4.2.5.18. Example HTTP response 4.2.5.18.1. Response 200 { "offsets" : [ { "partition" : 2, "offset" : 0 }, { "partition" : 1, "offset" : 1 }, { "partition" : 2, "offset" : 2 } ] } 4.2.5.18.2. Response 404 { "error_code" : 404, "message" : "The specified topic partition was not found." } 4.2.5.18.3. Response 422 { "error_code" : 422, "message" : "The record is not valid." } 4.3. Models 4.3.1. BridgeInfo BridgeInfo Information about Kafka Bridge instance. Field Name Required Nullable Type Description Format bridge_version String 4.3.2. Consumer Consumer Field Name Required Nullable Type Description Format name String The unique name for the consumer instance. The name is unique within the scope of the consumer group. The name is used in URLs. If a name is not specified, a randomly generated name is assigned. format String The allowable message format for the consumer, which can be `binary` (default) or `json`. The messages are converted into a JSON format. auto.offset.reset String Resets the offset position for the consumer. If set to `latest` (default), messages are read from the latest offset. If set to `earliest`, messages are read from the first offset. fetch.min.bytes Integer Sets the minimum amount of data, in bytes, for the consumer to receive. The broker waits until the data to send exceeds this amount. Default is `1` byte. consumer.request.timeout.ms Integer Sets the maximum amount of time, in milliseconds, for the consumer to wait for messages for a request. If the timeout period is reached without a response, an error is returned. Default is `30000` (30 seconds). enable.auto.commit Boolean If set to `true` (default), message offsets are committed automatically for the consumer. If set to `false`, message offsets must be committed manually. isolation.level String If set to `read_uncommitted` (default), all transaction records are retrieved, indpendent of any transaction outcome. If set to `read_committed`, the records from committed transactions are retrieved. 4.3.3. ConsumerRecord ConsumerRecord Field Name Required Nullable Type Description Format key Section 4.3.21, " RecordKey RecordKey" offset Long int64 partition Integer int32 topic String value X Section 4.3.22, " RecordValue RecordValue" headers List of Section 4.3.6, " KafkaHeader KafkaHeader" timestamp Long int64 4.3.4. CreatedConsumer CreatedConsumer Field Name Required Nullable Type Description Format instance_id String Unique ID for the consumer instance in the group. base_uri String Base URI used to construct URIs for subsequent requests against this consumer instance. 4.3.5. Error Error Field Name Required Nullable Type Description Format error_code Integer int32 message String 4.3.6. KafkaHeader KafkaHeader Field Name Required Nullable Type Description Format key X String value X byte[] The header value in binary format, base64-encoded byte 4.3.7. NewTopic NewTopic Field Name Required Nullable Type Description Format topic_name X String Name of the topic to create. partitions_count X Integer Number of partitions for the topic. replication_factor X Integer Number of replicas for each partition. 4.3.8. OffsetCommitSeek OffsetCommitSeek Field Name Required Nullable Type Description Format partition X Integer int32 offset X Long int64 topic X String 4.3.9. OffsetCommitSeekList OffsetCommitSeekList Field Name Required Nullable Type Description Format offsets List of Section 4.3.8, " OffsetCommitSeek OffsetCommitSeek" 4.3.10. OffsetRecordSent OffsetRecordSent Field Name Required Nullable Type Description Format partition Integer int32 offset Long int64 4.3.11. OffsetRecordSentList OffsetRecordSentList Field Name Required Nullable Type Description Format offsets List of OffsetRecordSentList_offsets_inner 4.3.12. OffsetRecordSentListOffsetsInner Field Name Required Nullable Type Description Format partition Integer int32 offset Long int64 error_code Integer int32 message String 4.3.13. OffsetsSummary OffsetsSummary Field Name Required Nullable Type Description Format beginning_offset Long int64 end_offset Long int64 4.3.14. Partition Partition Field Name Required Nullable Type Description Format partition Integer int32 topic String 4.3.15. PartitionMetadata PartitionMetadata Field Name Required Nullable Type Description Format partition Integer int32 leader Integer int32 replicas List of Section 4.3.23, " Replica Replica" 4.3.16. Partitions Partitions Field Name Required Nullable Type Description Format partitions List of Section 4.3.14, " Partition Partition" 4.3.17. ProducerRecord ProducerRecord Field Name Required Nullable Type Description Format partition Integer int32 timestamp Long int64 value X X Section 4.3.22, " RecordValue RecordValue" key Section 4.3.21, " RecordKey RecordKey" headers List of Section 4.3.6, " KafkaHeader KafkaHeader" 4.3.18. ProducerRecordList ProducerRecordList Field Name Required Nullable Type Description Format records List of Section 4.3.17, " ProducerRecord ProducerRecord" 4.3.19. ProducerRecordToPartition ProducerRecordToPartition Field Name Required Nullable Type Description Format value X X Section 4.3.22, " RecordValue RecordValue" key Section 4.3.21, " RecordKey RecordKey" headers List of Section 4.3.6, " KafkaHeader KafkaHeader" 4.3.20. ProducerRecordToPartitionList ProducerRecordToPartitionList Field Name Required Nullable Type Description Format records List of Section 4.3.19, " ProducerRecordToPartition ProducerRecordToPartition" 4.3.21. RecordKey RecordKey Key representation for a record. It can be an array, a JSON object or a string Field Name Required Nullable Type Description Format 4.3.22. RecordValue RecordValue Value representation for a record. It can be an array, a JSON object or a string Field Name Required Nullable Type Description Format 4.3.23. Replica Replica Field Name Required Nullable Type Description Format broker Integer int32 leader Boolean in_sync Boolean 4.3.24. SubscribedTopicList SubscribedTopicList Field Name Required Nullable Type Description Format topics Section 4.3.26, " Topics Topics" partitions List of map int32 4.3.25. TopicMetadata TopicMetadata Field Name Required Nullable Type Description Format name String Name of the topic configs Map of String Per-topic configuration overrides partitions List of Section 4.3.15, " PartitionMetadata PartitionMetadata" 4.3.26. Topics Topics Field Name Required Nullable Type Description Format topics List of String topic_pattern String A regex topic pattern for matching multiple topics

Commands:
{ "partitions" : [ { "topic" : "topic", "partition" : 0 }, { "topic" : "topic", "partition" : 1 } ] }
error_code: 404
message: The specified consumer instance was not found.
error_code: 409
message: Subscriptions to topics, partitions, and patterns are mutually exclusive.
{ "offsets" : [ { "topic" : "topic", "partition" : 0, "offset" : 15 }, { "topic" : "topic", "partition" : 1, "offset" : 42 } ] }
error_code: 404
message: The specified consumer instance was not found.
name: consumer1
format: binary
auto.offset.reset: earliest
enable.auto.commit: no
fetch.min.bytes: 512
consumer.request.timeout.ms: 30000
isolation.level: read_committed
instance_id: consumer1
base_uri: http://localhost:8080/consumers/my-group/instances/consumer1
error_code: 409
message: A consumer instance with the specified name already exists in the Kafka Bridge.
error_code: 422
message: One or more consumer configuration options have invalid values.
error_code: 404
message: The specified consumer instance was not found.
{ "topics" : [ "my-topic1", "my-topic2" ], "partitions" : [ { "my-topic1" : [ 1, 2, 3 ] }, { "my-topic2" : [ 1 ] } ] }
error_code: 404
message: The specified consumer instance was not found.
[ { "topic" : "topic", "key" : "key1", "value" : { "foo" : "bar" }, "partition" : 0, "offset" : 2 }, { "topic" : "topic", "key" : "key2", "value" : [ "foo2", "bar2" ], "partition" : 1, "offset" : 3 } ]
topic: test
key: a2V5
value: Y29uZmx1ZW50
partition: 1
offset: 100
topic: test
key: a2V5
value: a2Fma2E=
partition: 2
offset: 101
error_code: 404
message: The specified consumer instance was not found.
error_code: 406
message: The `format` used in the consumer creation request does not match the embedded format in the Accept header of this request.
error_code: 422
message: Response exceeds the maximum number of bytes the consumer can receive
{ "offsets" : [ { "topic" : "topic", "partition" : 0, "offset" : 15 }, { "topic" : "topic", "partition" : 1, "offset" : 42 } ] }
error_code: 404
message: The specified consumer instance was not found.
{ "partitions" : [ { "topic" : "topic", "partition" : 0 }, { "topic" : "topic", "partition" : 1 } ] }
error_code: 404
message: The specified consumer instance was not found.
{ "partitions" : [ { "topic" : "topic", "partition" : 0 }, { "topic" : "topic", "partition" : 1 } ] }
error_code: 404
message: The specified consumer instance was not found.
{ "topics" : [ "topic1", "topic2" ] }
error_code: 404
message: The specified consumer instance was not found.
error_code: 409
message: Subscriptions to topics, partitions, and patterns are mutually exclusive.
error_code: 422
message: A list (of Topics type) or a topic_pattern must be specified.
error_code: 404
message: The specified consumer instance was not found.
bridge_version: 2.9
{ "records" : [ { "key" : "key1", "value" : "value1" }, { "value" : "value2", "partition" : 1 }, { "value" : "value3" } ] }
{ "offsets" : [ { "partition" : 2, "offset" : 0 }, { "partition" : 1, "offset" : 1 }, { "partition" : 2, "offset" : 2 } ] }
error_code: 404
message: The specified topic was not found.
error_code: 422
message: The record list contains invalid records.
{ "records" : [ { "key" : "key1", "value" : "value1" }, { "value" : "value2" } ] }
{ "offsets" : [ { "partition" : 2, "offset" : 0 }, { "partition" : 1, "offset" : 1 }, { "partition" : 2, "offset" : 2 } ] }
error_code: 404
message: The specified topic partition was not found.
error_code: 422
message: The record is not valid.
{ "offsets" : [ { "topic" : "topic", "partition" : 0, "offset" : 15 }, { "topic" : "topic", "partition" : 1, "offset" : 42 } ] }
error_code: 404
message: The specified consumer instance was not found.
{ "partitions" : [ { "topic" : "topic", "partition" : 0 }, { "topic" : "topic", "partition" : 1 } ] }
error_code: 404
message: The specified consumer instance was not found.
{ "partitions" : [ { "topic" : "topic", "partition" : 0 }, { "topic" : "topic", "partition" : 1 } ] }
error_code: 404
message: The specified consumer instance was not found.
topic_name: my-topic
partitions_count: 1
replication_factor: 2
beginning_offset: 10
end_offset: 50
error_code: 404
message: The specified topic partition was not found.
{ "partition" : 1, "leader" : 1, "replicas" : [ { "broker" : 1, "leader" : true, "in_sync" : true }, { "broker" : 2, "leader" : false, "in_sync" : true } ] }
error_code: 404
message: The specified topic partition was not found.
{ "name" : "topic", "offset" : 2, "configs" : { "cleanup.policy" : "compact" }, "partitions" : [ { "partition" : 1, "leader" : 1, "replicas" : [ { "broker" : 1, "leader" : true, "in_sync" : true }, { "broker" : 2, "leader" : false, "in_sync" : true } ] }, { "partition" : 2, "leader" : 2, "replicas" : [ { "broker" : 1, "leader" : false, "in_sync" : true }, { "broker" : 2, "leader" : true, "in_sync" : true } ] } ] }
[ { "partition" : 1, "leader" : 1, "replicas" : [ { "broker" : 1, "leader" : true, "in_sync" : true }, { "broker" : 2, "leader" : false, "in_sync" : true } ] }, { "partition" : 2, "leader" : 2, "replicas" : [ { "broker" : 1, "leader" : false, "in_sync" : true }, { "broker" : 2, "leader" : true, "in_sync" : true } ] } ]
error_code: 404
message: The specified topic was not found.
topic1, topic2
{ "records" : [ { "key" : "key1", "value" : "value1" }, { "value" : "value2", "partition" : 1 }, { "value" : "value3" } ] }
{ "offsets" : [ { "partition" : 2, "offset" : 0 }, { "partition" : 1, "offset" : 1 }, { "partition" : 2, "offset" : 2 } ] }
error_code: 404
message: The specified topic was not found.
error_code: 422
message: The record list contains invalid records.
{ "records" : [ { "key" : "key1", "value" : "value1" }, { "value" : "value2" } ] }
{ "offsets" : [ { "partition" : 2, "offset" : 0 }, { "partition" : 1, "offset" : 1 }, { "partition" : 2, "offset" : 2 } ] }
error_code: 404
message: The specified topic partition was not found.
error_code: 422
message: The record is not valid.