Basic implementation
Now that you are familiar with queries and API you might want to know how to execute them in your preferred programming language.
Our GraphQL endpoint is located at https://api.tubular.io/graphql
.
Send POST
request to endpoint with your API key in Authorization
header
and as body send JSON object with query
property matching your query and optionally variables
map.
Note
If you are not familiar with variables check this article. They are easy way to pass parameters to your query.
Calling API using curl
curl -X POST \ -H "Authorization: $API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"{viewer{fullName}}"}' \ https://api.tubular.io/graphql