Skip to main content

Leon API Documentation

GraphQL API

The GraphQL is a query language for API originally developed by Facebook. It became an API standard for modern applications. It is strongly typed, hierarchical and self-documenting.

Why does Leon use GraphQL

Leon chose GraphQL because of its flexibility for our integrators. The ability to define precisely the data you want to fetch is a great advantage over the REST API endpoints. GraphQL lets you replace multiple REST requests with a single call to fetch the exact data you specify.

Schema

  1. API reference
  2. JSON Schema

Endpoints

Production

https://yourOprId.leon.aero/api/graphql/

Development / Sandbox

It contains a copy of production data, and it is refreshed once a day (03:00 UTC)

https://yourOprId.sandbox.leon.aero/api/graphql/

What is yourOprId?

Each operator in Leon is given dedicated domain which is used to sign in to the system. For example our demo operator is given demo.leon.aero domain. The yourOprId is the first segment of the domain. So in case of demo operator oprId is demo. If you are not sure what is yourOprId just ask any user what www address it uses to sign in to the Leon.

Model Context Protocol Server (MCP server)

What is Model Context Protocol (MCP)?

The Model Context Protocol (MCP) is an open standard that allows AI agents and tools to communicate with applications in a structured and secure way. MCP servers expose data and functionality that can be accessed by clients (such as AI agents), enabling automation of workflows and seamless integration between systems.

Leon MCP server documentation.

Authentication

You can authenticate with Leon API in two different ways.

Using the manually created API key

This method can be used only in case of integrations created for single operator. Additionally applications authenticated with API key will not be visible in Addons panel.

Learn more about this method here

Using OAuth code grant

This method allows for creating integrations that will be accessible to multiple operators and will be visible in Addons panel. This method is mandatory for 3rd party software providers.

Learn more about this method here

Subscriptions (webhooks)

You can subscribe to certain events in Leon using GraphQL subscriptions. Available subscriptions can be found in our API reference.

Learn more here.

Standard workflow use cases

Flight schedule synchronization

How to synchronize flight data from Leon into an external system — covering both the initial full data load and ongoing incremental updates using change-detection queries.

Flight Support

If you provide flight support services and you would like to integrate with Leon, learn more here.

Checking your code validity against Leon's GraphQL schema

A new application version is released every two weeks. We aim to keep all changes backward compatible, but on rare occasions a breaking change may occur. To stay safe, it is recommended to establish an automated validation of your code against our staging GraphQL schema.

The staging GraphQL schema can be found at http://api-schema-doc.s3-website-eu-west-1.amazonaws.com/schema-staging.json

The schema is generated daily after 07:00 UTC, and will be applied on production during the rolling process, after the sprint is finished.

For an example on how to do it using TypeScript, click here.

Client libs and tools

There are dozens of GraphQL client libs for different programming languages. Some of them can be found at GraphQL Code. GraphQL is also famous of great tooling:

  1. 10+ Awesome Tools and Extensions For GraphQL APIs
  2. 13 GraphQL Tools and Libraries You Should Know in 2019
  3. TOP 10 TOOLS & EXTENSIONS TO PIMP YOUR GRAPHQL APIS

We actually use some of them here at Leon, and we encourage you to try using Prisma Playground which is IDE for GraphQL. It is the most convenient way to connect to our API.

Another tool we can recommend is Altair GraphQL Client.

If you use Claude as your AI coding assistant, check out Leon API Tools — a Claude plugin that helps you work with Leon's API.

FAQ

I am application developer and I want to get it integrated with Leon. What should I do?

If you are a 3rd party application developer, please follow the steps described on the page OAuth Code Grant. This method is mandatory for 3rd party applications.

If you are Leon customer developing an app for your internal use, please use manually created API Key.

Data I am looking for are missing. Can you add them to the schema?

Yes, we can. The API covers Leon's entire data model, but for specific use cases — or simply for convenience — it can still make sense to add a dedicated query or mutation. If you need one, please open a ticket at customer.leon.aero and let us know what you're missing.

What is myOprId?

Each operator in Leon is given dedicated domain which is used to sign in to the system. For example our demo operator is given demo.leon.aero domain. The oprId is the first segment of the domain. So in case on demo operator oprId is demo

Where can I find sample queries

Please visit the sample queries section.