×

Notice

The forum is in read only mode.

No data from /flights API

3 years 7 months ago #1435 by 0lek
Hey,

I'm trying to receive ANY data from the flights API. Unfortunatelly nithing work... almost.

So my tests:
  1. Get vectors from /states/all, then pick a icao24 address and plug that into /flights/aircrafts -- 404
  2. Look at the website, pick an icao24 address and plug that into the API -- 404
  3. Use the example from the API doc --> here I get a response

Any thing I might be missing? I'm authenticated properly.
3 years 7 months ago #1438 by strohmeier
Without your problematic queries we can't tell. :) If the example queries work, then everything is in order and you should build on that.
3 years 7 months ago #1439 by 0lek
Replied by 0lek on topic No data from /flights API
Yeah, fair. Stupid way of asking. Sorry.

So let's get more detailed:

curl -s "https://USERNAME:PASSWORD@opensky-network.org/api/flights/aircraft?icao24=3c675a&begin=1517184000&end=1517270400" | python -m json.tool

Works, I get a response. So I look at /states/all and see that there's a plane, a41b89. So I try the following:

curl -s "https://U:P@opensky-network.org/api/flights/aircraft?icao24=a41b89a&begin=1616532498&end=1616532502" | python -m json.tool

I get [] (and see it's a 404 if I -v the curl).

Maybe I don't understand how the data works :)
3 years 7 months ago #1440 by strohmeier
Flights are only created after the aircraft has landed, in a batch process at night. So, you shouldn't get a 404 (I don't, for opensky-network.org/api/flights/aircraft...32498&end=1616532502) but it should be empty.
3 years 7 months ago #1441 by 0lek
Replied by 0lek on topic No data from /flights API
OK, that makes sense. I thought I'd have something to do with timings. The API works fine then. Thanks.

What I want to do is to write a script that displays data about a plane flying above my house. Ideally callsign, from/to etc. Now if the flights are created overnight, that wouldn't help. What other options do I have?

Thanks!
3 years 7 months ago #1442 by strohmeier
From/to doesn't work live - it is simply not in the ADS-B data sent to the ground by aircraft. Callsign etc. are all available in the state vectors, you can filter via bounding box around your house.
3 years 7 months ago #1443 by 0lek
Replied by 0lek on topic No data from /flights API
Understood. One last question: On the website there's certain flights that I can click and I do see to/from. In the console I see that it goes to /routes or /tracks, but they 404...
I gather then that this is from some different data?

Thanks again!
3 years 7 months ago #1477 by alanphil
Replied by alanphil on topic No data from /flights API
I'm also looking to build a similar application for flights above my Country and would really like to know how to get where a flight is coming from and to using the icao24 field returned from the /states endpoint.
Powered by Kunena Forum
This website uses cookies to offer you the best experience of our services. By using this website you agree to our privacy policy!