Live API v2 Updates

Hey everyone!

We’ve made some updates to the Live API (v2) based on feedback.

[New] Flight Route endpoint

GET https://api.infiniteflight.com/public/v2/flight/{flightId}/route

We’ve added the ability to get data about the route a flight has flown (formerly known as FlightDetails.aspx in v1 of the API).

Please note, this is currently only supported on the Expert Server and Training Server.

Example Response
{
  "errorCode": 0,
  "result": [
    {
      "latitude": 25.52992361245416,
      "longitude": -80.33701239710909,
      "altitude": 18429.91132829714,
      "track": 75.00002,
      "groundSpeed": 194.6716372048416,
      "date": "2021-01-06T16:20:27.3275657Z"
    },
    {
      "latitude": 25.59595843191219,
      "longitude": -79.96882929194611,
      "altitude": 27448.993829140254,
      "track": 77.0936,
      "groundSpeed": 229.58654094765924,
      "date": "2021-01-06T16:23:27.4572883Z"
    },
    {
      "latitude": 25.621774462118506,
      "longitude": -79.56246802075516,
      "altitude": 30999.01751208178,
      "track": 110.30767,
      "groundSpeed": 235.4484678810845,
      "date": "2021-01-06T16:26:27.5268907Z"
    }
  ]
}

See docs →


New Flight Plan endpoint

GET https://api.infiniteflight.com/public/v2/flight/{flightId}/flightplan

You can now request individual flight plans for flights, rather than one large request for all flight plans. Along with this, we’ve added more information about the flight plan, including the coordinates of waypoints and procedure information.

Please note, the “get all flightplans” endpoint has been deprecated and will be disabled soon. Please switch to this endpoint when possible.

Example Response
{
  "errorCode": 0,
  "result": {
      "flightPlanId": "4a57de08-a3b1-48ba-a081-adeff0a5b503",
      "flightId": "0b8cc273-d97d-4223-afac-907d09d8ca8b",
      "waypoints": [
        "AMAHE",
        "L12R"
      ],
      "lastUpdate": "2021-01-06 15:35:04Z",
      "flightPlanItems": [
        {
          "name": "AMAHE",
          "type": 0,
          "children": null,
          "identifier": null,
          "altitude": -1,
          "location": {
            "altitude": 0,
            "latitude": 26.92723722,
            "longitude": -77.47139889
          }
        },
        {
          "name": "L12R",
          "type": 2,
          "children": [
            {
              "name": "ZESTY",
              "type": 0,
              "children": null,
              "identifier": "ZESTY",
              "altitude": 4000,
              "location": {
                "altitude": 0,
                "latitude": 44.97196917,
                "longitude": -93.429735
              }
            },
            {
              "name": "RW12R",
              "type": 0,
              "children": null,
              "identifier": "RW12R",
              "altitude": -1,
              "location": {
                "altitude": 0,
                "latitude": 44.887794494628906,
                "longitude": -93.23413848876953
              }
            }
          ],
          "identifier": "L12R",
          "altitude": 0,
          "location": {
            "altitude": 0,
            "latitude": 0,
            "longitude": 0
          }
        }
      ]
    }
}

See docs →


[New] ATIS endpoint

GET https://api.infiniteflight.com/public/v2/airport/{airportIcao}/atis/{serverId}

The D-ATIS can be requested for individual airports on different servers. You can check if the airport has an active ATIS frequency on a particular server with the Get Active ATC Frequencies endpoint.

Example Response
{
    "errorCode":0,
    "result":"Manchester  airport, ATIS information DELTA, time 2355 ZULU, Wind 350 at 6 Visibility 21, Temperature 2, Dew Point 0, QNH 1024. Remarks, no pattern work allowed, no light aircraft accepted at this time. Landing Runways 05L and 05R, Departing Runways 05L and 05R. Advise on initial contact, you have information DELTA."
}

See docs →


[New] Oceanic Tracks endpoint

GET https://api.infiniteflight.com/public/v2/tracks

This retrieves a list of Oceanic Tracks active in Infinite Flight multiplayer sessions.

Example Response
{
  "errorCode": 0,
  "result": [
    {
      "name": "A",
      "path": [
        "DINIM",
        "51/20",
        "51/30",
        "50/40",
        "49/50",
        "JOOPY"
      ],
      "eastLevels": null,
      "westLevels": [
        350,
        370,
        390
      ],
      "type": "North Atlantic Tracks",
      "lastSeen": "2021-01-06T18:49:33.6300772Z"
    },
    {
      "name": "Z",
      "path": [
        "RIKAL",
        "53/50",
        "55/40",
        "56/30",
        "55/20",
        "RESNO",
        "NETKI"
      ],
      "eastLevels": [
        320,
        340,
        360,
        380,
        400
      ],
      "westLevels": null,
      "type": "North Atlantic Tracks",
      "lastSeen": "2021-01-06T18:49:33.6302219Z"
    }
  ]
}

See docs →


[Improved] More fields in the User Grade and Stats endpoints

The User Grade and User Stats endpoint have been updated with the latest criteria and stats.

  • Ability to search User Stats by hash and discourseUsername
  • Added violationCountByLevel to break down the count of violations
  • Added the roles key. **This replaces the group key which has been deprecated and will be removed in a future version.
     
Example Response
{
  "errorCode": 0,
  "result": [
    {
      "onlineFlights": 4649,
      "violations": 22,
      "xp": 1997093,
      "landingCount": 2253,
      "flightTime": 168797,
      "atcOperations": 17101,
      "atcRank": 5,
      "grade": 3,
      "hash": "5009DDA8",
      "violationCountByLevel": {
        "level1": 22,
        "level2": 0,
        "level3": 0
      },
      "roles": [
        64
      ],
      "userId": "15c2c4d6-8a12-40f0-a6d4-40c130fda0c1",
      "virtualOrganization": "Delta Virtual Air Lines [DLVA]",
      "discourseUsername": "MrMrMan",
      "groups": [
        "df0f6341-5f6a-40ef-8b73-087a0ec255b5"
      ],
      "errorCode": 0
    }
  ]
}

See docs →

13 Likes