You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@gramian We try to keep the API strict to the minimum, to simplify things. So whatever you can do with SQL (or any supported language), it's better to use it instead of creating one API per command.
About /health, you could use /server to return if the server is ok. If runs distributed, it returns the cluster configuration, otherwise just {}
@lvca
I have a brief follow-up question on the server endpoint: Using a GET request I get an empty response, but when using a POST request with empty payload, I get the empty JSON {} returned. Am I doing something wrong, is this working correctly, or should the server endpoint actually be a POST endpoint? I tested this using curl.
@gramian you're totally right, the command handler is registered as a POST, but by looking at the code there are zero not-idempotent requests to the databases or server, so it could totally be a GET.
I guess the first idea was to put there some commands to manipulate the server/cluster.
I'm going to modify the current POST into a GET, updated the docs, and in the case we're going to provide new methods to change server settings, we could have a proper POST. It's going to be into 22.9.1 which will be released this week.
Activity
lvca commentedon Sep 22, 2022
@gramian We try to keep the API strict to the minimum, to simplify things. So whatever you can do with SQL (or any supported language), it's better to use it instead of creating one API per command.
About
/health, you could use/serverto return if the server is ok. If runs distributed, it returns the cluster configuration, otherwise just{}gramian commentedon Sep 22, 2022
OK, I understand this approach.
Thanks for clarifying the use of
/server.gramian commentedon Sep 25, 2022
@lvca
I have a brief follow-up question on the
serverendpoint: Using aGETrequest I get an empty response, but when using aPOSTrequest with empty payload, I get the empty JSON{}returned. Am I doing something wrong, is this working correctly, or should theserverendpoint actually be aPOSTendpoint? I tested this usingcurl.lvca commentedon Sep 26, 2022
@gramian you're totally right, the command handler is registered as a POST, but by looking at the code there are zero not-idempotent requests to the databases or server, so it could totally be a GET.
I guess the first idea was to put there some commands to manipulate the server/cluster.
I'm going to modify the current POST into a GET, updated the docs, and in the case we're going to provide new methods to change server settings, we could have a proper POST. It's going to be into 22.9.1 which will be released this week.
Transformed POST /server command into a GET
lvca commentedon Sep 26, 2022
Done, it's in the main branch.
Transformed POST /server command into a GET
build(deps): bump org.apache.maven.plugins:maven-jar-plugin from 3.5.…