The StreamNative Kafka REST API provides a comprehensive HTTP-based interface for interacting with your Kafka clusters. Apache Kafka itself does not come with a native REST API. This feature allows you to manage critical resources and produce/consume messages without needing native Kafka clients or complex library setups.StreamNative’s Kafka REST API implementation provides:
HTTP-based Kafka Operations: Manage topics, produce/consume messages, and administer your cluster using any language and standard tools like curl, without needing native Kafka client libraries.
Full Protocol Compatibility: Faithfully supports the Kafka protocol, ensuring seamless integration and expected behavior for all standard operations.
Built-in Security: Integrated with StreamNative’s authentication and authorization systems
Multi-tenancy Support: Native support for StreamNative’s tenant/namespace isolation model
Currently, you can’t edit a service account. If you need a service account to have Super Admin access, make sure to enable it when creating the service account. By default, service accounts do not have Super Admin enabled.
To create a service account, follow these steps.
On the left navigation pane, click Service Accounts.
Click Create Service Account.
(Optional) Select Super Admin to grant the service account with Super admin access to a namespace or tenant.
Enter a name for the service account, and then click Confirm.
If you use a Super Admin service account, you can skip this step because a Super Admin service account already has the required permissions.
You can grant permissions to the service account using RBAC. For a description of the available permissions, see the predefined roles. Granting permissions via the UI will be supported soon.
The following example shows how to list topics using the Kafka REST API. For a complete list of all available API, see the full Kafka REST API Reference.
Copy
Ask AI
curl --location --request GET 'https://<your-http-service-url-tls>/rest-kafka/admin/v1/topics' \--header 'Authorization: Bearer <your-token>'
Never hardcode authentication tokens in your applications. Instead:
Store tokens in secure environment variables or secret management systems
Implement token rotation policies to regularly refresh credentials
Use service accounts with minimal required permissions following the principle of least privilege
Always use HTTPS (TLS) endpoints to encrypt data in transit
Response
200 - A successful request returns a list of topic objects.