1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20

doc

First Steps GraphQL API

Learn how to access Azion GraphQL API and the GraphQL playground.

  1. Accessing GraphQL API
  2. Accessing GraphQL playground

1. Accessing GraphQL API

To use GraphQL API with API platforms such as Postman and Insomnia, you first need authentication to ensure requests access data securely. This authentication occurs through Tokens.

To create a Token, you can follow two different paths:

  • Use Azion API platform.
  • Use Real-Time Manager (RTM).

The first option is to create a Token through the Azion API platform. You can go to Token and run your request.

The second option is to create a Personal Token through Azion configuration interface, Real-Time Manager (RTM). This option is more suitable for use with APIs due to the possibility of creating a long-lived token. See the Personal Tokens documentation page to create one.

When creating a Personal Token, you’ll have to set an expiration date. For use with APIs, it’s recommended to set a longer expiration date, such as 90 days or 1 year. In that case, make sure you take necessary precautions to ensure your project’s security.

After creating your Personal Token, head to the API platform you’ll be using and include the Azion GraphQL API endpoint in your request:

  • To use the Metrics API for aggregated data, include: https://api.azionapi.net/metrics/graphql
  • To use the Events API for raw data, include: https://api.azionapi.net/events/graphql

2. Accessing GraphQL playground

You can use Azion GraphQL built-in playground to write, validate, and test GraphQL queries. Using the playground can help you become more familiar with the API and the use of queries in a visual and quick manner.

To interact with the GraphQL playground, you first need to log in to RTM. If you haven’t created an account, see the Creating an account on Azion documentation page.

After successfully logging in to RTM, go to https://manager.azion.com/metrics/graphql or https://manager.azion.com/events/graphql and interact with the GraphQL playground.

Watch a video tutorial on GraphQL’s first steps on Azion’s YouTube channel:


Didn’t find what you were looking for? Open a support ticket.