With a paid tier solution and a valid payment method, you can also access the solution through the GSQL Web Shell. The web shell allows you to run GSQL commands on your TigerGraph Cloud solution.
After logging into TigerGraph Cloud, go to My Solutions.
In the pop-up window, provide the username of the TigerGraph user you'd like to proceed with, and specify a validity period for the session. The GSQL Web Shell session will terminate after the validity period is over.
When the GSQL Web Shell opens, the shell will ask you for your password. Enter the password for the TigerGraph user whose username you just entered and press the enter key.
Find the solution you want to access, and click on the Admin Operations icon. Click GSQL Access from the dropdown menu.
Once a solution has been provisioned, there are three ways to access the solution and interact with the database:
Besides GraphStudio, another way to interact with your TigerGraph database is through our REST API. Use RESTful endpoints to send requests to TigerGraph solutions and develop applications.
On TigerGraph Cloud, RESTPP Authentication is enabled by default, and only the requests made with a valid authorization token in the request header will be accepted.
If your cluster is on GCP and it has a replication factor higher than 1, you won't be able to use ports 9000 and 14240 to access API endpoints. Instead, you can access the endpoints using HTTPS requests on port 443:
To access the endpoints that normally listen on port 9000, append/restpp
after the domain and before the endpoint. Since an HTTPS request already implies port 443, specifying the port is optional. However, you need to ensure that you are making HTTPS requests instead of HTTP requests.
Example: To access the /echo endpoint: curl "https://examplesolution.i.tgcloud.io/restpp/echo"
To access the endpoints that normally listen on port 14240, use the original endpoint address, but on port 443. Similar to port 9000 requests, specifying the port is optional.
Example: To access the health check endpoint on 14240:curl "https://examplesolution.i.tgcloud.io/api/ping"
Access to GraphStudio is not affected: opening the domain of the solution in a browser will directly take you to GraphStudio
Here is a step-by-step guide to generating and using an authorization token for RESTPP:
From GraphStudio, go to Admin Portal, and click User Management.
In the My Profile tab, find the graph you want to generate the secret for, enter an alias for your secret and click the "+" symbol at the right side of the row.
Remember to copy and save the secret to a safe location. This is the only time the secret will be exposed in full in Admin Portal, and you will not be able to see it again.
Use the /requesttoken
endpoint to generate an authorization token for your solution. You can use either a GET or POST request. In this tutorial, we will be using a GET request.
If you did not enter a subdomain when setting up your solution, a random subdomain will be automatically generated for you. Go to My Solutions, and click the solution you are trying to access, you will find the solution's domain name in the expanded view. Use this domain name as the server address when making REST requests.
/requesttoken
The endpoint takes two parameters, secret
and lifetime
, and the latter is optional. Put the parameters in the query string and send the request using your favorite REST client. The below example uses curl to request the authentication token:
The response will look like this, where the string in the response with the key token is your authorization token:
Now that you have an authorization token, you can proceed to make requests to your solution. To use the authorization token, include it in the request header as a bearer token.
Refer to our RESTful API User Guide to learn about all the endpoints available. In this tutorial, we will make a request to the List vertices endpoint on a solution with the COVID-19 starter kit and list 5 patients and the patients' age.
Response:
The TigerGraph GraphStudioâ„¢ UI (User Interface) provides an intuitive, browser-based interface that helps users get started quickly with graph-based application development tasks: designing a graph schema, creating a schema mapping, loading data, exploring the graph, and writing GSQL queries. GraphStudio is supported in the same way on TigerGraph Cloud as the on-premise version of TigerGraph.
After logging into TigerGraph Cloud, go to My Solutions.
Find the solution you want to access, and click the Applications icon in the same row, and click GraphStudios in the dropdown list.
To learn how to use GraphStudio, read our GraphStudio UI Guide.