Introduction IBM Event Streams for IBM Cloud is a high-throughput message bus built with Apache Kafka. It is optimized for event ingestion into IBM Cloud and event stream distribution between your services and applications. Event Streams provides a REST API to help connect your existing systems to your Event Streams Kafka cluster. Using the API, you can integrate Event Streams with any system that supports RESTful APIs. You can downloadhttps://cloud.ibm.com/apidocs/event-streams/adminrest.json the OpenAPI specification compliant descriptors for this REST interface. Alternatively, click the three vertical dots next to the IBM Event Streams Admin REST API title in the top left corner of this app, then click the Download OpenAPI definition link that appears. Other Event Streams APIs IBM Event Streams also provides the following APIs: Event Streams REST Producer API Referencehttps://cloud.ibm.com/apidocs/event-streams/restproducer Event Streams REST Producer v2 endpoint API Referencehttps://cloud.ibm.com/apidocs/event-streams/restproducerv2 SDKs Event Streams is based on the open source Apache Kafka, and as such, all SDKs client libraries are provided for the open source community, covering the core runtimes listed. For the most up-to-date information about these libraries, refer to the project homepages. For more information on what is supported, see support summary for all recommended clientshttps://cloud.ibm.com/docs/services/EventStreams?topic=eventstreams-kafkausingclientsummary. SDK language support This Admin REST API supports the four core languages and the SDKs are available as follows. | Language | Repository | |-|-| | Go | https://github.com/IBM/eventstreams-go-sdk | | Python | https://github.com/IBM/eventstreams-python-sdk | | Node | https://github.com/IBM/eventstreams-node-sdk | | Java | https://github.com/IBM/eventstreams-java-sdk | Endpoint URLs Administration API endpoint is the kafkaadminurl property in the service key for the service instance. You can use this command to retrieve the kafkaadminurl property property. bash $ ibmcloud resource service-key "${serviceinstancekeyname}" --output json | jq -r '.|.credentials.kafkaadminurl' In addition, the Content-type header must be set to application/json. Error handling This API uses standard HTTP response codes to indicate whether a method completed successfully. A 200 response code indicates success. A 400 response code indicates a failure, and a 500 response code indicates an internal system error. | HTTP error code | Description | Recovery | |-----------------|-------------|----------| | 200 | OK | Message successfully sent to Event Streams. | | 202 | Request accepted| Kafka accepted the request and processes the request. | | 400 | Bad request | Not a valid request. | | 401 | Unauthorized | The authentication header is not set or provided information is not valid. | | 403 | Not authorized to perform the operation | The API key used is missing a certain role. For more details on what role can perform what operation, see Managing access to your Event Streams resourceshttps://cloud.ibm.com/docs/services/EventStreams?topic=eventstreams-security.| | 404 | Not found | Unable to find the topic with the topic name you specified. | | 408 | Request timeout | The request timed out producing to Event Streams. | | 422 | Semantically invalid request| You have a malformed request. | | 500 | Internal server error | The request failed due to an internal server error. | | 503 | Service unavailable | The request failed due to Event Streams brokers being unavailable. | Error responses carry a JSON body, such as the following: json {"errorcode":50301,"message":"Unknown Kafka Error", "incidentid": "17afe715-0ff5-4c49-9acc-a4204244a331"} Error codes have the format HHHKK, where HHH is the HTTP status code and KK is the Kafka protocol error. For end-to-end debugging purposes, the transaction ID of every request is returned in the HTTP header X-Global-Transaction-Id. If the header is set on the request, it is honored. If not, it is generated. In the event of a non-200 error code, the transaction ID is also returned in the JSON error response as incidentid. Authentication Use one of the following methods to authenticate: To authenticate using Basic Auth:
| Method | Path | Summary |
|---|---|---|
| POST | /admin/topics | Create a new topic. |
| GET | /admin/topics | Get a list of topics. |
| GET | /admin/topics/{topic_name} | Get detailed information on a topic. |
| DELETE | /admin/topics/{topic_name} | Delete a topic. |
| PATCH | /admin/topics/{topic_name} | Increase the number of partitions and/or update one or more topic configuration parameters. |
| DELETE | /admin/topics/{topic_name}/records | Delete records before the given offset on a topic. |
| POST | /admin/quotas/{entity_name} | Create a new quota. |
| PATCH | /admin/quotas/{entity_name} | Update a quota. |
| DELETE | /admin/quotas/{entity_name} | Delete a quota. |
| GET | /admin/quotas/{entity_name} | Get quota information for an entity. |
| GET | /admin/quotas | List each entity's quota information. |
| GET | /admin/brokers | Get a list of brokers in the cluster. |
| GET | /admin/brokers/{broker_id} | Get detailed information for a single broker. |
| GET | /admin/brokers/{broker_id}/configs | Get all configuration parameters for a single broker. |
| GET | /admin/cluster | Get information about the cluster. |
| GET | /admin/consumergroups | Get a list of consumer group IDs. |
| GET | /admin/consumergroups/{group_id} | Get detailed information on a consumer group. |
| DELETE | /admin/consumergroups/{group_id} | Delete a consumer group. |
| PATCH | /admin/consumergroups/{group_id} | Update the offsets of a consumer group. |
| GET | /admin/mirroring/topic-selection | Get current topic selection for mirroring. |
| POST | /admin/mirroring/topic-selection | Replace topic selection for mirroring. |
| GET | /admin/mirroring/active-topics | Get topics that are being actively mirrored. |
| GET | /admin/status | Get the status of the instance. |