REST API Index
- Introspect query status (/status endpoint)
- Introspect server status (/info endpoint)
- Execute a statement (/ksql endpoint)
- Run a query (/query endpoint)
- Run push and pull queries (/query-stream endpoint)
- Terminate a cluster (/ksql/terminate endpoint)
The default HTTP API endpoint is
Change the server configuration that controls the HTTP API endpoint by
listeners parameter in the ksqlDB server config file. For
more info, see listeners.
To configure the endpoint to use HTTPS, see
Configure ksqlDB for HTTPS.
The ksqlDB HTTP API uses content types for requests and responses to indicate the serialization format of the data and the API version.
Your request should specify this serialization
format and version in the
Accept header, for example:
The less specific
application/json content type is also permitted.
However, this is only for compatibility and ease of use, and you should
use the versioned value if possible.
The server also supports content negotiation, so you may include multiple, weighted preferences:
For example, content negotiation is useful when a new version of the API is preferred, but you are not sure if it is available yet.
Here's an example request that returns the results from the
LIST STREAMS command:
1 2 3 4 5 6
Here's an example request that retrieves streaming data from
1 2 3 4 5 6
All API endpoints use a standard error message format for any requests that return an HTTP status indicating an error (any 4xx or 5xx statuses):
1 2 3 4 5 6 7
Some endpoints may include additional fields that provide more context for handling the error.