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
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}
https://docs.tigergraph.com/dev/restpp-api/built-in-endpoints#list-all-endpoints
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.
https://colab.research.google.com/drive/1n8g81AMIKAwOmQUl2DaFGRDLpgoUYAKi?usp=sharing