Documentation/ATLAS API


This page is only available on desktop.

ATLAS API
Article

Creating an API Key

Creating an API Key in the ATLAS Crew Center.

Overview

In order to use the ATLAS API, each app must have it's own API Key. These API Keys are made on a per VA basis. These means that an API Key generated for Airline ABC won't work for Airline XYZ.



Generating the API Key

To create an API Key, a pilot with the MANAGE_VA_API permission is required. The pilot needs to go to Administration/API, then click Create new API Key. At this time, there is no way to restrict the access of an API Key.





After pressing the button they will then be greeted by a message containing the api key.



Article

Using an API Key

How to include an API Key to authenticate your requests.

Overview

Once an API Key has been generated, your app will need to use it.



Adding the Key to the header

ATLAS expects the API Key to be in the authentication header of the request. The authentication should be a bearer token.


                            const request = require('request');
                            
                            const options = {
                                method: 'GET',
                                url: 'https://atlas.va-center.com/api/external/members/all',
                                headers: {Authorization: 'Bearer APIDOCUMENTATIONTEST'}
                            };
                            
                            request(options, function (error, response, body) {
                                if (error) throw new Error(error);
                            
                                console.log(body);
                            });
                        


This authentication is standard across all API requests.

Endpoint

Retrieve Members

Get a list of members for the VA.

Overview

ATLAS allows your app to get a list of current members of a VA. This information includes things like their rank, callsign, join date, and more.


URL


GET /api/external/members/all



Response


200
member[]
OK
The request was successful.
Content-Type: application/json

401
UNAUTHORIZED
The request was denied due to a missing or invalid API Key.
Endpoint

Retrieve Member

Get information for a specific member of a VA.

Overview

ATLAS allows your app to get information for specific members of a VA. This information includes things like their rank, callsign, join date, and more.


URL


GET /api/external/members/specific



Query String


Parts


id
(Required) The membership ID for the target user.



Response


200
member
OK
The request was successful.
Content-Type: application/json

401
UNAUTHORIZED
The request was denied due to a missing or invalid API Key.

400
BAD REQUEST
The request was denied due to a missing member ID.

404
NOT FOUND
The request was denied due to the member ID not matching any user.
Endpoint

Retrieve PIREPs

Get a list of PIREPs for the VA.

Overview

ATLAS allows your app to get a list of current PIREPs of a VA.


URL


GET /api/external/pireps/all



Response


200
pirep[]
OK
The request was successful.
Content-Type: application/json

401
UNAUTHORIZED
The request was denied due to a missing or invalid API Key.
Endpoint

Retrieve PIREP

Get information for a specific PIREP.

Overview

ATLAS allows your app to get information for a specific PIREP.


URL


GET /api/external/pireps/specific



Query String


Parts


id
(Required) The PIREP ID for the target pirep.



Response


200
PIREP
OK
The request was successful.
Content-Type: application/json

401
UNAUTHORIZED
The request was denied due to a missing or invalid API Key.

400
BAD REQUEST
The request was denied due to a missing PIREP ID.

404
NOT FOUND
The request was denied due to the PIREP ID not matching any PIREP.
Endpoint

Retrieve Events

Get a list of events for the VA.

Overview

ATLAS allows your app to get a list of current events for a VA.


URL


GET /api/external/events/all



Response


200
event[]
OK
The request was successful.
Content-Type: application/json

401
UNAUTHORIZED
The request was denied due to a missing or invalid API Key.
Endpoint

Retrieve Routes

Get a list of routes for the VA.

Overview

ATLAS allows your app to get a list of current routes for a VA.


URL


GET /api/external/routes/all



Response


200
route[]
OK
The request was successful.
Content-Type: application/json

401
UNAUTHORIZED
The request was denied due to a missing or invalid API Key.
Endpoint

Retrieve Route

Get information for a specific route.

Overview

ATLAS allows your app to get information for a specific route.


URL


GET /api/external/routes/specific



Query String


Parts


id
(Required) The Route ID for the target pirep.



Response


200
Route
OK
The request was successful.
Content-Type: application/json

401
UNAUTHORIZED
The request was denied due to a missing or invalid API Key.

400
BAD REQUEST
The request was denied due to a missing Route ID.

404
NOT FOUND
The request was denied due to the Route ID not matching any Route.
Endpoint

Retrieve Ranks

Get a list of ranks for the VA.

Overview

ATLAS allows your app to get a list of current ranks for a VA.


URL


GET /api/external/ranks/all



Response


200
rank[]
OK
The request was successful.
Content-Type: application/json

401
UNAUTHORIZED
The request was denied due to a missing or invalid API Key.
Endpoint

Retrieve VA Statistics

Get key VA statistics to use in your app.

Overview

ATLAS allows your app to get information about the VA. This information includes things like the most used aircraft, total hours, best pilot and more.


URL


GET /api/external/stats/all

Response


200
see below
OK
The request was successful.
Content-Type: application/json

401
UNAUTHORIZED
The request was denied due to the API Key being invalid.

200 Output



                                {
                                    errorCode: 200,
                                    errorMessage: null,
                                    customMessage: null,
                                    data: {
                                        newPIREPs: 0, //int of approved pireps in the last 60 days
                                        totalPIREPs: 0, //int of all approved pireps
                                        topCraft: {}, // aircraft | null
                                        newPassengers: 0, // int of the amount of pax carrier in last 60 days
                                        totalPilots: 0, // int of all pilots
                                        newPilots: 0, // int of pilots who joined in the last 60 days,
                                        newFT: 0 // Flight time of the last 60 days in minutes
                                    }
                                }
                            
Endpoint

Retrieve VA Route of the Week

Get ROTW for a VA to use in your app.

Overview

ATLAS allows your app to get information about the VA. This information includes the ROTW.


URL


GET /api/external/rotw

Response


200
see below
OK
The request was successful.
Content-Type: application/json

401
UNAUTHORIZED
The request was denied due to the API Key being invalid.

200 Output



                                {
                                    errorCode: 200,
                                    errorMessage: null,
                                    customMessage: null,
                                    data: [] // array of routeDay
                                }
                            

routeDay



                                {
                                    id: 1 // int,
                                    vaID: 1 // id of the VA,
                                    route: {} // the route obj,
                                    day: 1 // int (0-6 for each day of week starting sunday)
                                }
                            
Schema

Member Schema

Returned data for a specific member.

Overview


                                {
                                    "id": 5,
                                    "userID": "abc123_@/ab",
                                    "virtualAirlineID": "abc-123",
                                    "virtualAirline": {},
                                    "role": "PILOT",
                                    "permissions": 0,
                                    "manualRank": false,
                                    "rankID": 4
                                    "rank": {},
                                    "callsign": "VACV001",
                                    "flightTime": 60,
                                    "pireps": [],
                                    "leavesOfAbsence": [],
                                    "joinDate": "2021-06-01T00:00:00.000Z",
                                }
                            


Properties

id
Int
An integer that uniquely identifies that member.

userID
string
A string that uniquely identifies the user associated with the member. One user per membership, One VA per membership.

virtualAirlineID
Int
An integer that uniquely identifies the virtual airline associated with the member. One user per membership, One VA per membership.

virtualAirline
virtualAirline
An object containing the data of the virtual airline associated with the member. This object may or may not be included depending on the request.

role
string
No documented purpose.

permissions
int
An integer which contains the Bitwise permission flags for the member. This controls what they can do in the VA. See Member permission bitwise for more information.

manualRank
boolean
A boolean which indicates if the member's rank is manually set. If true this means that their rank will not adjust based on hours.

rankID
int (nullable)
An integer containing the unique ID of the rank the member is assigned. If null the member holds no rank.

rank
rank (nullable)
An object containing the data of the rank associated with the member. If null the member holds no rank. This object may or may not be included depending on the request.

callsign
string (nullable)
A string containing the callsign of the member. This should include the VA Code. If null, the member has no callsign and should be reffered to as "Unknown".

flightTime
int
An integer contains the total flight time of the member in minutes.

pireps
pirep[]
An array containing all the pireps of the member. This object may or may not be included depending on the request.

leavesOfAbsence
leaveOfAbsence[]
An array containing all the LOAs of the member. This object may or may not be included depending on the request.

joinDate
string
A string containing the join date of the member. This is in the ISO format.
Schema

Rank Schema

Returned data for a specific rank.

Overview


                                {   
                                    "id": 2,
                                    "name": "Cadet",
                                    "manual": false,
                                    "minHours": 0,
                                    "holders": [],
                                    "vaID": "abc-123",
                                    "va": {}
                                }
                            


Properties

id
integer
An integer containing the rank's unique ID

name
string
A string containing the name of the rank.

manual
boolean
A boolean that states if the rank has been set to manual. This means that the rank can not be granted to pilot's by their flight time count, instead it must be manually given by a staff member.

minHours
float (nullable)
A floating point number containing the minimum number of flight hours required to achieve the rank. In a manual rank this is set to null.

holders
member[]
An array containing all the members who hold this rank. This object may or may not be included depending on the request.

virtualAirlineID
Int
An integer that uniquely identifies the virtual airline associated with the rank. One va per rank, many ranks per va.

virtualAirline
virtualAirline
An object containing the data of the virtual airline associated with the rank. This object may or may not be included depending on the request.
Schema

PIREP Schema

Returned data for a specific PIREP.

Overview


                                {
                                    "id": 6,
                                    "depICAO": "YMML",
                                    "arrICAO": "YSSY",
                                    "pilotID": 5,
                                    "pilot": {},
                                    "aircraftID": 10,
                                    "aircraft": {},
                                    "operator": "VACenter Virtual",
                                    "flightNumber": "VACV000",
                                    "flightTime": 60,
                                    "state": "PENDING",
                                    "comments": "Test the API",
                                    "fuel": 123,
                                    "reportDate": "2021-06-01T00:00:00.000Z",
                                    "flightDate": "2021-06-01T00:00:00.000Z",
                                    "multiplierID": 8,
                                    "multiplier": {},
                                    "flightType": "PASSENGER",
                                    "flightLoad": 120,
                                    "routeID": 9,
                                    "route": {},
                                    "vaID": "abc-123",
                                    "va": {},
                                    "pirepImage": "abc123"
                                }
                            


Properties

id
integer
An integer containing the PIREP's unique ID

depICAO
string
A string containing the ICAO code of the departure airport.

arrICAO
string
A string containing the ICAO code of the arrival airport.

pilotID
Int
An integer that uniquely identifies the member associated with the PIREP. One member per PIREP, many PIREPs per member.

pilot
member
An object containing the data of the member associated with the PIREP. This object may or may not be included depending on the request.

aircraftID
Int
An integer that uniquely identifies the aircraft associated with the PIREP. One aircraft per PIREP, many PIREPs per aircraft.

aircraft
aircraft
An object containing the data of the aircraft associated with the PIREP. This object may or may not be included depending on the request.

operator
string
A string containing the operator of the flight.

flightNumber
string
A string containing the flight number of the route flown. This may not match a route.

flightTime
integer
An integer containing the flight time in minutes.

state
PENDING|APPROVED|DENIED
A string containing the state of the pirep, this can be PENDING, APPROVED or DENIED.

comments
string
A string containing any comments from the pilot about the flight.

fuel
integer
The amount of fuel that was used in the flight. Represented in kilograms.

reportDate
string
A string containing the date the report was filed. This is in the ISO format.

flightDate
string
A string containing the date the flight was flown. This is in the ISO format.

multiplierID
Int (nullable)
An integer that uniquely identifies the multiplier associated with the PIREP. One multiplier per PIREP, many PIREPs per multiplier. If null, the PIREP has no multiplier.

multiplier
multiplier (nullable)
An object containing the data of the multiplier associated with the PIREP. This object may or may not be included depending on the request.

flightType
PASSENGER|CARGO
A string containing the type of flight. This can be PASSENGER or CARGO.

flightLoad
integer
An integer representing the amount for the flightType. If the route is a passenger flight, this value is how many passengers were onboard. If the route is a cargo flight, this value is the weight of the payload in kilograms.

routeID
Int (nullable)
An integer that uniquely identifies the aircraft associated with the PIREP. If null, this PIREP is not associated with any particular route. One route per PIREP, many PIREPs per route.

route
route (nullable)
An object containing the data of the route associated with the PIREP. If null, this PIREP is not associated with any particular route. This object may or may not be included depending on the request.

vaID
Int
An integer that uniquely identifies the virtual airline associated with the PIREP. One VA per PIREP, many PIREPs per VA.

va
va
An object containing the data of the virtual airline associated with the PIREP. This object may or may not be included depending on the request.

pirepImage
String (nullable)
A string that holds the ID of the PIREP image. If null, the PIREP has no image.
Schema

Virtual Airline Schema

Returned data for a specific Virtual Airline.

Overview


                                {   
                                    "id": "abc-123",
                                    "name": "VACenter Virtual",
                                    "code": "VACV",
                                    "subscriptionTier": 3,
                                    "subscriptionToCancel": false,
                                    "subscriptionActive": true,
                                    "hasBanner": true,
                                    "hasPIREPImages": true,
                                    "liveMap": "https://ifvarb.org/livemap",
                                    "inactivityThreshold": 30
                                }
                            


Properties

id
string
An string containing the VA's unique ID

name
string
A string containing the name of the VA.

code
string
A 3-4 character string containing the code of the VA.

subscriptionTier
0|1|2|3
An integer that represents the subscription tier of the VA. This can be 0 (Free), 1 (Pro), 2 (Max) or 3 (Ultra).

subscriptionToCancel
boolean
A boolean that states if the VA has a subscription that is due to be cancelled at the end of the billing period.

subscriptionActive
boolean
A boolean that states if the VA has an active subscription. This is because the VA may have selected their subscription tier, but not paid for it.

hasBanner
boolean
A boolean that states if the VA has a banner image.

hasPIREPImages
boolean
A boolean that states if the VA has enabled PIREP images.

liveMap
string (nullable)
A string that contains the URL for the VA's live map provided by IFVARB. This can be null if the VA has not set their live map.

inactivityThreshold
integer
An integer that represents how many days a member can go without filing a PIREP before they are marked as inactive.
Schema

Leave of Absence Schema

Returned data for a specific LOA.

Overview


                                {
                                    "id": 9,
                                    "pilotID": 5,
                                    "vaID": "abc-123",
                                    "startDate": "2023-05-15T00:00:00.000Z",
                                    "endDate": "2023-05-22T00:00:00.000Z",
                                    "reason": "test",
                                    "state": "APPROVED"
                                }
                            


Properties

id
integer
An integer containing the LOA's unique ID

pilotID
Int
An integer that uniquely identifies the member associated with the LOA. One member per LOA, many LOAs per member.

pilot
member
An object containing the data of the member associated with the LOA. This object may or may not be included depending on the request.

vaID
Int
An integer that uniquely identifies the virtual airline associated with the LOA. One VA per LOA, many LOAs per VA.

va
va
An object containing the data of the virtual airline associated with the LOA. This object may or may not be included depending on the request.

startDate
string
A string containing the date the LOA is due to start. This is in the ISO format.

endDate
string
A string containing the date the LOA is due to end. This is in the ISO format.

reason
string
A string containing the member provided reason for the LOA.

state
PENDING|APPROVED|DENIED
A string containing the state of the LOA, this can be PENDING, APPROVED or DENIED.
Schema

Aircraft Schema

Returned data for a specific aircraft in the fleet.

Overview


                                {
                                    "id": 12,
                                    "vaID": "ce31303b-9d07-4df3-80ea-977b1ed4d5e0",
                                    "liveryID": "85cc6e33-5e99-4bfe-8c80-a55cb5e70b3d",
                                    "minimumHours": 0,
                                    "livery": {
                                        "liveryID": "85cc6e33-5e99-4bfe-8c80-a55cb5e70b3d",
                                        "liveryName": "Finnair",
                                        "aircraftID": "6af2c9f8-abd8-4872-a9bc-4e79fd84fe77",
                                        "aircraftName": "Airbus A330-300"
                                    }
                                }
                            


Properties

id
integer
An integer containing the aircraft's unique ID

vaID
Int
An integer that uniquely identifies the virtual airline associated with the aircraft. One VA per aircraft, many aircraft per VA.

va
va
An object containing the data of the virtual airline associated with the aircraft. This object may or may not be included depending on the request.

minimumHours
float
A floating point number containing the minimum number of flight hours required to gain acces to the aircraft. If a user has a rank which can only be assigned manually, they gain access to all aircraft.

liveryID
string
A string containing the unique liveryID for the aircraft. It corresponds to the Infinite Flight liveryID.

livery
IF Aircraft
An object containing the data of the Infinite Flight associated livery. This object is included with every request.
Schema

IF Aircraft Schema

Returned data for a specific Infinite Flight associated livery.

Overview


                                {
                                    "liveryID": "85cc6e33-5e99-4bfe-8c80-a55cb5e70b3d",
                                    "liveryName": "Finnair",
                                    "aircraftID": "6af2c9f8-abd8-4872-a9bc-4e79fd84fe77",
                                    "aircraftName": "Airbus A330-300"
                                }
                            


Properties

liveryID
string
A string containing the livery's unique ID. (This is not the same as the aircraftID)

liveryName
string
A string which contains the name of the livery. (This is not the same as the aircraftName)

aircraftID
string
A string containing the aircraft's unique ID. (This is not the same as the liveryID, multiple liveries will have the same aircraftID)

aircraftName
string
A string which contains the name of the aircraft. (This is not the same as the liveryName, multiple liveries will have the same aircraftName)
Schema

Route Schema

Returned data for a specific route.

Overview


                                {
                                    "id": 1,
                                    "routeNumber": "VACV0001",
                                    "vaID": "121330c0-91b0-42a7-878c-884dfede4e61",
                                    "depICAO": "YMML",
                                    "arrICAO": "YSSY",
                                    "routeType": "PASSENGER",
                                    "notes": "123",
                                    "estFlightTime": 62,
                                    "minimumHours": 0,
                                    "active": true,
                                    "shareable": true,
                                    "servicedBy": []
                                }
                            


Properties

id
integer
An integer containing the route's unique ID

routeNumber
string
A string containing the public number for the route, this will include the VA's 4 letter/digit code.

vaID
Int
An integer that uniquely identifies the virtual airline associated with the route. One VA per route, many routes per VA.

va
virtualAirline
An object containing the data of the virtual airline associated with the route. This object may or may not be included depending on the request.

depICAO
string
A 3/4 letter string containing the ICAO code of the departure airport.

arrICAO
string
A 3/4 letter string containing the ICAO code of the arrival airport.

routeType
PASSENGER|CARGO
A string of either PASSENGER or CARGO to say what type of route it is.

notes
string
A string containing the notes for the route as set by the VA.

estFlightTime
integer
An integer number containing the estimated flight time for the route in minutes.

minimumHours
float
A floating point number containing the minimum number of flight hours required to fly this route. If the user has a rank which can only be assigned manually, they gain access to all routes.

active
boolean
A boolean to say if the route is active or not. Deleted routes will remain in the database, but will be marked as inactive. The ATLAS API will not return inactive routes.

shareable
boolean
A boolean to say if the route is able to be shared. Routes which have been recieved via codeshare will be marked as unshareable as they cannot be shared to another VA.

servicedBy
aircraft[]
An array containing all aircraft from the VA's fleet which have been assigned to the route. This object may or may not be included depending on the request.
Schema

Multiplier Schema

Returned data for a specific multiplier.

Overview


                                {   
                                    "id": 1,
                                    "vaID": "121330c0-91b0-42a7-878c-884dfede4e61",
                                    "multiplierCode": "abc123",
                                    "multiplierValue": 1.5,
                                    "valid": true
                                }
                            


Properties

id
integer
An integer containing the multiplier's unique ID

vaID
Int
An integer that uniquely identifies the virtual airline associated with the multiplier. One VA per multi, many multis per va.

va
virtualAirline
An object containing the data of the virtual airline associated with the multiplier. This object may or may not be included depending on the request.

multiplierCode
string
A string containing the code used to access the multiplier.

mutliplierValue
float
A floating point number containing the amount that the multiplier will multiply the flight time by.

valid
boolean
A boolean to say if the multiplier is valid or not. Deleted multipliers will remain in the database, but will be marked as inactive.
Schema

Event Schema

Returned data for a specific event.

Overview


                                {
                                    "id": 1,
                                    "vaID": "121330c0-91b0-42a7-878c-884dfede4e61",
                                    "title": "Hello Developers!",
                                    "description": "Devs rule!",
                                    "startDate": "2023-06-27T02:11:00.000Z",
                                    "endDate": "2023-06-28T02:12:00.000Z",
                                    "server": "EXPERT",
                                    "depICAO": "YMML",
                                    "arrICAO": "YSSY"
                                }
                            


Properties

id
integer
An integer containing the event's unique ID

vaID
Int
An integer that uniquely identifies the virtual airline associated with the event. One VA per event, many events per VA.

va
virtualAirline
An object containing the data of the virtual airline associated with the event. This object may or may not be included depending on the request.

title
string
A string containing the title of the event.

description
string
A string containing the description of the event.

startDate
string
A string containing the date that the event starts. This is in ISO format.

endDate
string
A string containing the date that the event ends. This is in ISO format.

server
CASUAL|TRAINING|EXPERT
A string containing the server that the event will be held on.

depICAO
string
A 3/4 letter string containing the ICAO code of the departure airport for the event.

arrICAO
string
A 3/4 letter string containing the ICAO code of the arrival airport for the event.