Jump to content

Datafeed URLs


Recommended Posts

Hi there devs!

As you may have seen in the last tech blog post, the v1 data files will be removed on the 31st March 2021

This means that you will need to update your applications to use the new data format.

As with the old datafiles, we request that you do NOT harcode the datafile URLs, and instead download the file available at https://status.vatsim.net/status.json once when your application starts and then select one of the URLs available randomly each time you make a request. Even if we currently do load balancing server-side and therefore only one URL is available, this does not mean it will always stay like this. Doing it the correct way will also prevent your application from breaking if we change these URLs in the future.

All the best,
VATSIM Tech Team.

  • Like 2
Néstor Pérez
A Random Platypus
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to post
Share on other sites
  • 3 weeks later...

Hi Néstor,

According to the Q4 Tech Blog, the 'JSON-URL' will become: https://data.vatsim.net/v3/vatsim-data.json 

Is it OK to hard-code this URL in applications, or do we still need to parse the status URL, as per your message above?

If so, would it be possible to replace/add the status information in a JSON format, instead of a text file? Parsing a text file seems a bit outdated 🙂

Kind regards,

 

Martijn

 

Link to post
Share on other sites

Feel free to hardcode that one. We now do load-balancing server side. My recommendation would be to keep a constant with the (sub)domain and another with the version your code uses in case any changes are to be done in the future, but that depends on each person's coding choices 😉

EDIT: Also, just to be sure, I recommend that you allow it to follow redirects. Usually when we make changes to the URLs we put redirects in place for some time so people have time to switch.

 EDIT2: Actually, I stand corrected! In the status file you can now find a field named "json3"; please use that for the JSON v3 file and DO NOT HARDCODE IT 😂

Regarding the status JSON file: We're looking into it!

  • Like 1
Néstor Pérez
A Random Platypus
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to post
Share on other sites

Since I've got to hard-code a URL anyways, is there any chance you could just create something called data.vatsim.net/data and have it send back a 301 or 302 to the actual location? I'm not sure of the advantages of writing our own redirect logic when the HTTP spec and libraries should do it for you, unless there's something I'm missing. (How do they handle 3xx with HTTPS?)

Cheers!

Luke

  • Like 1

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to post
Share on other sites
  • 2 weeks later...
On 11/18/2020 at 7:18 PM, Nestor Perez said:

Hi there devs!

As you may have seen in the last tech blog post, the old status file and v1JSON file will be removed "on, or closely following March 1st of 2021, with a potential extension to March 31st if deemed necessary". This means that you will need to update your applications to use the new data format.

As with the old datafiles, we request that you do NOT harcode the datafile URLs, and instead download the file available at https://status.vatsim.net/status.json once when your application starts and then select one of the URLs available randomly each time you make a request. Even if we currently do load balancing server-side and therefore only one URL is available, this does not mean it will always stay like this. Doing it the correct way will also prevent your application from breaking if we change these URLs in the future.

All the best,
VATSIM Tech Team.

Thanks for the update! I found that in the new JSON format (v3), latitude and longitude are missing for both ATIS and Stations. Currently, VR Radio Helper (an X-Plane Plugin that helps VR pilots enter frequencies, https://github.com/VerticalLongboard/xplane-vhf-helper) uses the location of a station to display the currently tuned in station, reading it directly from the text datafeed. Since there are duplicates around the planet, sorting by distance is necessary. To not be forced to remove this feature in about two months: Could you please add latitude and longitude to all items in "controllers" and "atis"?

Thanks a lot,

Johannes

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...