Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/API/pages/built-in-endpoints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2932,6 +2932,9 @@ curl -X POST --data-binary @./<sample_file> "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[].

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tushar was working on a similar ticket. Did you know that? Have you coordinated with him?
DOC-2403



==== 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].
Expand Down
33 changes: 33 additions & 0 deletions modules/API/pages/gsql-endpoints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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<VERTEX>` 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}`
Expand Down