Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.
PLEASE READ - Webmaster Support Forum
This forum will be retired in the near future. Please direct all queries to our dedicated GitHub support page https://github.com/vatsimnetwork/developer-info/discussions 
Here you can find documentation on our services and we are continuing to migrate pertinent information into the Wiki pages https://github.com/vatsimnetwork/developer-info/wiki

Missing controller sessions in atcsessions API call


Kurt Ernstsen
 Share

Recommended Posts

Kurt Ernstsen
Posted
Posted

I've started testing the use of the VATSIM atcsessions API call on our website to replace us querying for vatsim-data.txt and parsing/aggregating the data ourselves.  I'm loving the simplicity of the new API.  One things I'm seeing is a slight difference it total controller hours per month when comparing the API totals to VATSIM Stats Center totals.  I'm find that a few of the sessions listed in stats center are not included in the API results.

For example, when I query the API for CID 1496314, I am not seeing sessions starting on 10/10/2020 3:10 or 10/10/2020 3:30, amongst a few others, that ARE listed on the VATSIM Stats Center for that same user.  When looking at VATSIM Stats Center, the missing (from API results) sessions do not have the "ATC Session Details" link in that line.

What does it mean when there is no "ATC Session Details" link for that session?  And why is that session included in the Stats Center total time, but those sessions are not included in the API results?

Thanks.

Link to comment
Share on other sites

Jordan Jolenaar
Posted
Posted (edited)
On 10/28/2020 at 7:58 PM, Kurt Ernstsen said:

I've started testing the use of the VATSIM atcsessions API call on our website to replace us querying for vatsim-data.txt and parsing/aggregating the data ourselves.  I'm loving the simplicity of the new API.  One things I'm seeing is a slight difference it total controller hours per month when comparing the API totals to VATSIM Stats Center totals.  I'm find that a few of the sessions listed in stats center are not included in the API results.

For example, when I query the API for CID 1496314, I am not seeing sessions starting on 10/10/2020 3:10 or 10/10/2020 3:30, amongst a few others, that ARE listed on the VATSIM Stats Center for that same user.  When looking at VATSIM Stats Center, the missing (from API results) sessions do not have the "ATC Session Details" link in that line.

What does it mean when there is no "ATC Session Details" link for that session?  And why is that session included in the Stats Center total time, but those sessions are not included in the API results?

Thanks.

Hi,

As far as the connections go that you are getting from the API that data is provided by FSD, and you may see mixed results in the statistics center. Sometimes you will see a session be "split" where the client didn't logout, but sometimes it shows as 2 sessions. Perhaps someone with more info about that could shed some light on it.

I'd recommend you trust the data being provided from the API. As I mentioned earlier the data that is being provided in the API is using the data provided by FSD. Stats is very old, and it's possible that there is a bug on the stats side.

As far as ATC Session data (I'm assuming you are referring to tracked aircraft, amended FPs, etc) that is being served up by the API. It should be on "api/ratings/{cid}/atcsessions"

 

Edit: Looks like the API does return the ATC Session data for the atcsessions endpoint.

Edited by Jordan Jolenaar
Jordan Jolenaar 
VATSIM Senior Developer     
VATSIM Network Supervisor  
##  [email protected]
## www.vatsim.net
   
MeyrHZn.jpg
Link to comment
Share on other sites

  • 4 weeks later...
Kurt Ernstsen
Posted
Posted (edited)

Here's another one that caught my attention.  This controller logged 1 hour and 23 minutes on Nov 1st at OKC_TWR.  Our current site got the correct data by way of aggregating data from http://data.vatsim.net/vatsim-data.txt.  This controlling session can be confirmed via VATSIM Statistics Center for that user (https://stats.vatsim.net/conn_details.php?id=1366052&datecode=202011).  However, when the new website (development still in progress) pulls controller sessions form the API, that Nov 1st session is not listed.  https://api.vatsim.net/api/ratings/1366052/atcsessions  Again, there is no "details" link on the VATSIM Statistics Center page for that session like there are on most other controlling sessions.

 

I talked to the controller in question about this session.  He recalls being primed up and connected to AFV, but said there was no traffic during that session.  I would assume that the API would still return the data for the session regardless of how much traffic was seen.

Edited by Kurt Ernstsen
Link to comment
Share on other sites

Kurt Ernstsen
Posted
Posted

The above mentioned user controlled OKC_TWR again late last night, and reports seeing traffic.  That session IS being reported by https://api.vatsim.net/api/ratings/1366052/atcsessions.  I think there may be a bug in the API code that excludes atc sessions that have 0 aircraftseen, possibly???

Link to comment
Share on other sites

Ryan Bentley
Posted
Posted

It seems that this information is present in the connections table but not present in the atcsessions table which would indicate the issue lies within FSD. I will look into this further and update you.

In the mean time, you can see the connection here: https://api.vatsim.net/api/ratings/1366052/connections/

Ryan Bentley
VATSIM Senior Developer
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

  • 3 weeks later...
Kurt Ernstsen
Posted
Posted

Any updates on this issue?  We're beta testing the new site now, and hope to release it to production later this week.  However I want to make sure the controller hour query is 100% correct before we release the new site.  Thanks.

Link to comment
Share on other sites

Ryan Bentley
Posted
Posted

We do not yet have a solution but I will update you if this changes.

Ryan Bentley
VATSIM Senior Developer
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

  • 3 months later...
Raihan Shahzad
Posted
Posted

Similar issue has been brought to my attention from one of our member (1481995); some of his sessions without any traffic seen/handled are missing, such as a very recent session of him on VCBI_T_TWR 2021-04-20 19:44:12 2021-04-20 21:44:17 02:00:05 is missing and upon investigation further, i found that more session from him are missing which are not having any ATC Session Details.  Hence the API for atcsessions is not fetching data for connections which are not having any details https://api.vatsim.net/api/ratings/1481995/atcsessions/?page_size=10

Any possibility yet to include such sessions through API?

 

Raihan Shahzad
Division Director VATWA1
VATSIM West Asia
vatwa.net | director[at]vatwa.net

Link to comment
Share on other sites

 Share