diff --git a/modules/API/pages/built-in-endpoints.adoc b/modules/API/pages/built-in-endpoints.adoc index ea076105..51d947fa 100644 --- a/modules/API/pages/built-in-endpoints.adoc +++ b/modules/API/pages/built-in-endpoints.adoc @@ -2932,6 +2932,9 @@ curl -X POST --data-binary @./ "http://localhost:14240/restpp/query At the read committed level, it is guaranteed that any data read is committed at the moment it is read. By default, it is off. |=== +For a comparison of the RESTPP and GSQL endpoints for running installed queries, including differences in parameter formats and query execution, see xref:gsql-endpoints.adoc#compare-the-restpp-and-gsql-query-endpoints[]. + + ==== Query parameter Passing When using a `POST` request to run an installed query, the query parameters are passed in through the request body and xref:API:index.adoc#_formatting_data_in_json[encoded in JSON format]. diff --git a/modules/API/pages/gsql-endpoints.adoc b/modules/API/pages/gsql-endpoints.adoc index 34298ca7..b89870d7 100644 --- a/modules/API/pages/gsql-endpoints.adoc +++ b/modules/API/pages/gsql-endpoints.adoc @@ -3244,6 +3244,39 @@ Sample Response:: ''' +[[compare-restpp-gsql-query-endpoints]] +== Comparing the RESTPP and GSQL query endpoints + +TigerGraph provides two endpoints for running installed queries: + +* xref:built-in-endpoints.adoc#_run_an_installed_query_post[RESTPP endpoint] +* xref:gsql-endpoints.adoc#_run_query[GSQL endpoint] + +Both endpoints execute installed queries and return the same results. However, they differ in the format used to pass query parameters and how query requests are processed. + +[cols="2,3,3",options="header"] +|=== +|Feature +|RESTPP endpoint +|GSQL endpoint + +|Endpoint +|`/query/{graph_name}/{query_name}` +|`/gsql/v1/queries/{query_name}` + +|HTTP method +|`GET` or `POST` +|`POST` + +|`VERTEX` and `SET` parameter format +|Uses the RESTPP parameter format. See xref:built-in-endpoints.adoc#query-parameter-passing[Query parameter Passing]. +|Uses the GSQL parameter format. See xref:gsql-endpoints.adoc#format-for-parameters-of-query-being-run[Format for Parameters of Query Being Run]. + +|Query execution +|Executes the installed query directly. +|Internally invokes the RESTPP endpoint to execute the installed query. +|=== + === run query `POST /gsql/v1/queries/{queryName}`