Skip to main content

Overview

note

Before you can start exploring the API, you need to authenticate yourself. This is done by obtaining an authorization token. This token is used to verify your identity and ensure that you have the necessary permissions to access the API.

For testing, you can run requests to the GraphQL endpoint with your preferred tools. We recommend:

  • Altair - a free feature packed GraphQL IDE
  • Banana Cake Pop - a GraphQL IDE with a focus on usability and performance
  • GraphiQL - an in-browser IDE for exploring GraphQL
  • Postman - the widely used collaboration platform for API development, with built-int GraphQL support
  • Insomnia - a powerful REST and GraphQL client
  • cURL - a widely used command line tool for transferring data using a variety of network protocols

The general form of a GraphQL query is as follows:

  • the request is a POST
  • the content type is application/json
  • the body is a JSON with the form shown below, where the value of query is a serialized JSON (properly escaped) and variables is a JSON object. The variables property can be skipped or could be set to null if there are no GraphQL variables in the query.
{
"query": "...",
"variables": { ... }
}

The following snippet shows a query example:

{
"query": "query GetBudgets ($pageSize: Int)\n{\n budgets(pageSize: $pageSize)\n{\n companyId\n id\n}\n}",
"variables": {"pageSize": 100},
"operationName": "GetBudgets"
}

In this example, you can also see the property operationName that contains the name of the operation (that follows the query or mutation keyword).