Consuming the API

The way you can consume API depends on your authentication route.

It is entirely up to you how you consume the API via php, javascript, python etc.

Rate Limits

API Requests made using API Tokens are limited to 120 requests per minute.
You can keep track of remaining requests using X-RateLimit-Remaining header.

Should API Rate Limit be exceeded, you will receive an error response.

Client and Grant tokens have no rate limit.

API Version

Current API version is v1.

API Token

If you are authenticating using API token, take note of the following:

Required Header Attributes

  • Name
    Authorization
    Type
    Bearer {token}
    Description
  • Name
    Accept
    Type
    application/json
    Description

API Route Prefix/Suffix

Insert 'token' and api version to the request string.

Example

Documentation listed URL: /api/[...]/aircraft
URL for you to use: /api/token/v1/aircraft

Client Token

If you are authenticating using Client token, take note of the following:

Required Header Attributes

  • Name
    Authorization
    Type
    Bearer {token}
    Description
  • Name
    DiscordServer
    Type
    Integer
    Description

    Discord Server ID is set at Virtual Airline level and is located at Orwell - Settings - Discord
    This is how API knows which Virtual Airline's information to return.

  • Name
    Accept
    Type
    application/json
    Description

API Route Prefix/Suffix

Insert 'client' and api version to the request string.

Example

Documentation listed URL: /api/[...]/aircraft
URL for you to use: /api/client/v1/aircraft

Grant Token

Work in Progress. Documentation will follow.