Fetching Installed GSQL queries

Is there a way to read content of an installed GSQL query using any of the restpp/gsql end point ?

@kapilsaini in your GraphStudio go to

Write Query -> your Installed query and click the highlighted link icon in the screeshot below

you will get the CURL Example :slightly_smiling_face:

If I’m reading the question right. As a User you would like to fetch the GSQL query code of each query you have installed via a REST endpoint. Is that correct? @kapilsaini

Yes @Jon_Herke . Exactly this is what i am looking for.

Got it. There is a built in endpoint that you can fetch all the installed queries.

GET /endpoints/{graphname}

However, there isn’t an endpoint that fetches the GSQL body… With that being said it’s still possible to do. You need to hit the /gsql endpoint (which allows users to pass GSQL code to the DB)

I’ve built a mini demo. This demo uses the pyTigerGraph connector that includes a GSQL Driver under the hood. You could install the GSQL_Client to do this on your laptop… but it’s super simple to show and share this example.