Tray Embedded APIs (GraphQL)
Number of APIs: 10
Reference documentation for the Tray Embedded GraphQL APIs
Please visit our Tray Embedded Documentation to familiarize yourself with Tray Embedded and learn how it can help you put the automation power of Tray.ai in the hands of your End Users.
To interact with this collection you can select your preferred language and use the example queries and mutations to test out scripts using different input/filter criteria (e.g. 'Get User by Id' or 'Get Solution Instances by owner')
You can also click 'Run in Qodex' to import and run the collection in your local Qodex app. However we strongly recommend that you use our Insomnia Http Client collection as a local testing environment.
Insomnia has several advantages over Qodex as a local GraphQL client, including auto-import of the Tray.io Embedded schema (which allows auto-complete of available fields and input criteria), easy navigation, dynamically updated user tokens, and the use of GraphQL 'fragments' to quickly test queries with different criteria.
When interacting with GraphQL APIs, depending on the call, you will need to use
A master token obtained from the Tray Embedded UI (required for calls such as 'Get Users')
A user token obtained with Create User Access Token (required for calls such as 'Get Soluton Instances')
Note: The Tray GraphQL API is a backend API only and calls must be invoked server-side. Client-side Javascript calls to the API should not be made as they will be blocked by CORS. Our demo app is a good illustration of how you can create a UI which presents an End User with their available Solutions while making all API calls server-side - using a button to hand over the Solution Instance configuration to our End User Config Wizard in a pop-up or iframe.
-
Users-Queries - Get Users (master token) POST https://{{base_url}}/graphql
-
Users-Mutations - Delete User (master token) POST https://{{base_url}}/graphql
-
Authentications-Queries - Get User Authentications (user/master token) POST https://{{base_url}}/graphql
-
Authentications-Mutations - Delete User Auth (user/master token) POST https://{{base_url}}/graphql
-
Solutions - Get Solutions (master Token) POST https://{{base_url}}/graphql
-
Solution Instances-Queries - Get Solution Instances (user/master token) POST https://{{base_url}}/graphql
-
Solution Instances-Mutations - Delete Solution Instance
(user token) POST https://tray.io/graphql -
Projects - Export Project (master token) POST https://{{base_url}}/graphql
-
Workflows - Export Workflow (master token) POST https://{{base_url}}/graphql
-
Call Connector POST https://{{base_url}}/graphql