From 01e4b46733c64c5c4940e35bec368aaba9b5e444 Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Fri, 28 Nov 2025 18:40:30 +0100 Subject: [PATCH 1/2] docs: SQL API query -> REST API query conversion --- .../apis-integrations/rest-api/reference.mdx | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/pages/product/apis-integrations/rest-api/reference.mdx b/docs/pages/product/apis-integrations/rest-api/reference.mdx index f409ad7143bae..eb63ba8526ac3 100644 --- a/docs/pages/product/apis-integrations/rest-api/reference.mdx +++ b/docs/pages/product/apis-integrations/rest-api/reference.mdx @@ -93,6 +93,32 @@ values. +## `{base_path}/v1/convert` + +Takes an API query in `input` format and converts it to the specified `output` format. +This endpoint is useful for converting queries, such as from the REST API format to the +SQL API format. + +Request parameters: + +| Parameter, type | Description | Required | +| --- | --- | --- | +| `input`, `string` | Input query format:
`sql` for [SQL API][ref-sql-api] queries. | ✅ Yes | +| `output`, `string` | Output query format:
`rest` for [REST API][ref-rest-api] queries. | ✅ Yes | +| `query`, `string` | Input query. | ✅ Yes | + +The response will contain a JSON object with the following properties: + +| Property, type | Description | +| --- | --- | +| `status`, `string` | Query conversion status, `ok` or `error` | +| `query`, `object` | Converted query | +| `error`, `string` | Error message in case of an error | + +An error will be returned if the input query can't be converted to the specified +output format, e.g., if the input SQL API query requires post-processing on top of REST API +capabilities or if the input SQL API query results in multiple REST API queries. + ## `{base_path}/v1/sql` Takes an API query and returns the SQL query that can be executed against the data source From 9a7d793a9f96ded3222c7f2a9c03e86b682ab306 Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Fri, 28 Nov 2025 18:44:48 +0100 Subject: [PATCH 2/2] . --- docs/pages/product/apis-integrations/rest-api/reference.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/product/apis-integrations/rest-api/reference.mdx b/docs/pages/product/apis-integrations/rest-api/reference.mdx index eb63ba8526ac3..76bf68b05558b 100644 --- a/docs/pages/product/apis-integrations/rest-api/reference.mdx +++ b/docs/pages/product/apis-integrations/rest-api/reference.mdx @@ -105,7 +105,7 @@ Request parameters: | --- | --- | --- | | `input`, `string` | Input query format:
`sql` for [SQL API][ref-sql-api] queries. | ✅ Yes | | `output`, `string` | Output query format:
`rest` for [REST API][ref-rest-api] queries. | ✅ Yes | -| `query`, `string` | Input query. | ✅ Yes | +| `query`, `string` | Input query | ✅ Yes | The response will contain a JSON object with the following properties: