You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Darius Cooper <da...@gmail.com> on 2025/02/23 14:02:15 UTC
SQL Query via REST API in Ignite 3.x
Apache Ignite v2/GridGain v8 has an api that allows SQL Queries using the
REST API. I don't see an equivalent in Apache v3. Has that been removed? I
only see management end-points. Can one submit SQL commands via HTTP? If
so, it there documentation for this somewhere? This documentation
<https://ignite.apache.org/docs/ignite3/latest/developers-guide/rest/rest-api#>
shows
a /management example only, and doesn't contain links to any OpenApi doc
Do I need to create custom REST endpoints to get the same functionality?
My LLM says this, but I don't know if that's true or if I should be digging
into docs:
---- ---- ----
* Apache Ignite v3 made significant changes to its REST API structure
compared to v2.x. The direct SQL query execution endpoint (cmd=qryexe) from
v2.x was indeed removed in v3.*
*In Ignite v3, the recommended approach for executing SQL queries over HTTP
is through:*
1. *The Ignite SQL JDBC driver*
2. *The Management API (which you've already found)*
3. *Custom REST endpoints that you implement using Ignite's extension
mechanisms*
*For direct HTTP access to execute SQL queries, you would need to either:*
- *Implement a custom REST endpoint using Ignite's extensibility
features*
- *Use the JDBC driver with a REST proxy service that you implement*
- *Consider using the PostgreSQL wire protocol support that Ignite
provides*
*Would you like me to explain any of these approaches in more detail? Or
are you specifically looking for a direct replacement for the v2.x REST
query endpoint?*
*Also, I should note that while I aim to be accurate about Ignite's
features, I recommend double-checking the official Apache Ignite
documentation for the most up-to-date information, especially since my
knowledge may not include the latest changes to v3.*
---- ---- ----
It suggested I use code that uses JDBC, and then register my custom
end-point like this. I just want to check that this asp;ect really has
changed with Ignite v3.:
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setRestEndpoints(Arrays.asList(new SqlQueryEndpoint()));
Re: SQL Query via REST API in Ignite 3.x
Posted by Pavel Tupitsyn <pt...@apache.org>.
- Ignite 3 REST API spec is here:
https://ignite.apache.org/releases/3.0.0/openapi.yaml - we'll add a link to
the docs
- SQL is not yet available via the REST API
Please don't duplicate questions:
https://stackoverflow.com/questions/79460381/qryexe-with-apache-v3-x-gridgain-9-x/79462713
On Sun, Feb 23, 2025 at 4:02 PM Darius Cooper <da...@gmail.com>
wrote:
> Apache Ignite v2/GridGain v8 has an api that allows SQL Queries using the
> REST API. I don't see an equivalent in Apache v3. Has that been removed? I
> only see management end-points. Can one submit SQL commands via HTTP? If
> so, it there documentation for this somewhere? This documentation
> <https://ignite.apache.org/docs/ignite3/latest/developers-guide/rest/rest-api#> shows
> a /management example only, and doesn't contain links to any OpenApi doc
>
> Do I need to create custom REST endpoints to get the same functionality?
>
>
> My LLM says this, but I don't know if that's true or if I should be
> digging into docs:
> ---- ---- ----
>
> * Apache Ignite v3 made significant changes to its REST API structure
> compared to v2.x. The direct SQL query execution endpoint (cmd=qryexe) from
> v2.x was indeed removed in v3.*
>
> *In Ignite v3, the recommended approach for executing SQL queries over
> HTTP is through:*
>
> 1. *The Ignite SQL JDBC driver*
> 2. *The Management API (which you've already found)*
> 3. *Custom REST endpoints that you implement using Ignite's extension
> mechanisms*
>
> *For direct HTTP access to execute SQL queries, you would need to either:*
>
> - *Implement a custom REST endpoint using Ignite's extensibility
> features*
> - *Use the JDBC driver with a REST proxy service that you implement*
> - *Consider using the PostgreSQL wire protocol support that Ignite
> provides*
>
> *Would you like me to explain any of these approaches in more detail? Or
> are you specifically looking for a direct replacement for the v2.x REST
> query endpoint?*
>
> *Also, I should note that while I aim to be accurate about Ignite's
> features, I recommend double-checking the official Apache Ignite
> documentation for the most up-to-date information, especially since my
> knowledge may not include the latest changes to v3.*
>
> ---- ---- ----
>
> It suggested I use code that uses JDBC, and then register my custom
> end-point like this. I just want to check that this asp;ect really has
> changed with Ignite v3.:
>
>
> IgniteConfiguration cfg = new IgniteConfiguration();
>
> cfg.setRestEndpoints(Arrays.asList(new SqlQueryEndpoint()));
>
>