Statements (query/v1)

Execute SQL Statement

Changed on

Executes an arbitrary SQL query against the engine. If the query resolves in under 10 seconds and returns less than 4 MiB, the response will be an inline HTTP 200 OK. Otherwise, a 202 Accepted response redirects the client to retrieve results from a separate streamed data location. Rows are returned as JSON strings by default; set options.result_format to ARROW_STREAM to receive a base64-encoded Arrow IPC stream with native column types instead.

post/query/v1

Request

  • Base URL
    https://sql.<region>.<provider>.confluent.cloud
  • URL
    https://sql.<region>.<provider>.confluent.cloud/query/v1
  • Auth
    HTTP basic

Request body

catalog_namestring required

Confluent Cloud environment ID (e.g., env-xyz123)

database_namestring required

Kafka cluster ID (e.g., lkc-xyz123)

querystring required

SQL query to execute

client_infoobject

Free-form client metadata for telemetry and debugging (e.g., client_name, client_version, driver_version). Values are strings; not interpreted by the server.

Response

Successful synchronous response containing fully inlined metadata and data results.

api_versionstring required

APIVersion defines the schema version of this representation of a resource.

kindstring required

Kind defines the object this REST resource represents.

Changes