Jump to content

Ryan Bentley

VATSIM Developer
  • Content Count

    45
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Ryan Bentley

  1. VATSIM API Update 31/03/2021

     

    • Authorised users (those of you that use tokens) can now see a users e-mail address in all ratings endpoints.
  2. VATSIM API Update 01/12/2020

     

    • Added the ability to filter atcsessions by "date", facility type (including sector splits), and to specify a "start" parameter to view all sessions after a certain date.

    You can now view by facility type, eg: https://api.vatsim.net/api/ratings/1240411/atcsessions/EGLL_APP/ - this will show things like EGLL_N_APP, EGLL_S_APP, EGLL_APP

    You can also just query by type: https://api.vatsim.net/api/ratings/1240411/atcsessions/APP/

    You can add either the "date" or "start" parameter to the query.

    https://api.vatsim.net/api/ratings/1240411/atcsessions/EGLL_APP/?date=2020-09-18 - this will show any EGLL_APP position controlled on that date
    https://api.vatsim.net/api/ratings/1240411/atcsessions/EGLL_APP/?start=2020-09-18 - this will show any EGLL_APP position controlled on or after that date.

  3. On 11/4/2020 at 12:26 PM, Wenlue Zhang said:

    For sure we won't put the token in our front end code 😂 But currently there are some endpoints (e.g. /rating/{cid}/rating_times) which are accessible without a token. Just assuming they are open to public and does not require the token... Isn't it intended?

    Yes, certain endpoints are public and do not require token authentication.

  4. On 5/5/2020 at 7:45 PM, Keanu Czirjak said:

    Been a couple of weeks, the search index still hasn't been re-built. Really annoying when I want to find that one topic but can't because of the new topic URL - would you pleeease be able to implement some sort of redirect solution or something? Thanks

    I've rebuilt the search index for you. Can you see if it works for you now?

  5. On 7/21/2020 at 2:39 PM, Mike Welten said:

    Hello Ryan.

    Can you already give me an expected date when you think this feature (previous rating, before I1/I3/SUP/ADM as a replacement of idstatusprev) will be implemented? 

    Thanks a lot and best regards

    Mike

     

    This task is not possible until we are fully off the old system, as it requires rearchitecting some backend stuff. We are slowly moving towards this goal, I can see this feature being possible within 2-3 months. Will keep you updated on this thread.

    • Thanks 1
  6. Viewing all of the ATC Sessions of a member
    Issue a GET request to one of these URLS:

    https://api.vatsim.net/api/ratings/<cid>/atcsessions/

    You can search for different callsign or position types too like this:

    https://api.vatsim.net/api/ratings/<cid>/atcsessions/TWR/
    https://api.vatsim.net/api/ratings/<cid>/atcsessions/EGKK/

    Examples:

    https://api.vatsim.net/api/ratings/1375048/atcsessions/LSGG/

    You can now view by facility type, eg: https://api.vatsim.net/api/ratings/1240411/atcsessions/EGLL_APP/ - this will show things like EGLL_N_APP, EGLL_S_APP, EGLL_APP

    You can also just query by type: https://api.vatsim.net/api/ratings/1240411/atcsessions/APP/

    You can add either the "date" or "start" parameter to the query.

    https://api.vatsim.net/api/ratings/1240411/atcsessions/EGLL_APP/?date=2020-09-18 - this will show any EGLL_APP position controlled on that date
    https://api.vatsim.net/api/ratings/1240411/atcsessions/EGLL_APP/?start=2020-09-18 - this will show any EGLL_APP position controlled on or after that date.

    Use ?page_size=N to manage the length of each page returned. IE: https://api.vatsim.net/api/ratings/1375048/atcsessions/LSGG/?page_size=10?page_size=10

    This is a public endpoint that does not require an authentication token

    Returned Response:

    JSON object containing the following fields: id, rating, pilotrating, name_first, name_last, age, countystate, country, susp_date, reg_date, region, division, subdivision

    Example:

    curl -H 'Accept: application/json; indent=4' "https://api.vatsim.net/api/ratings/1115151/atcsessions/"

    Example Response:

    {
        "count": 24,
        "next": "https://api.vatsim.net/api/ratings/1115151/atcsessions/?page=2&page_size=10",
        "previous": null,
        "results": [
            {
                "connection_id": 24311588,
                "start": "2010-06-27T20:50:23",
                "end": "2010-06-28T00:13:37",
                "server": "USA-N",
                "vatsim_id": "1115151",
                "type": 2,
                "rating": 3,
                "callsign": "CYWG_GND",
                "times_held_callsign": 1,
                "minutes_on_callsign": "203.233333",
                "total_minutes_on_callsign": 740.25,
                "aircrafttracked": 0,
                "aircraftseen": 60,
                "flightsamended": 0,
                "handoffsinitiated": 0,
                "handoffsreceived": 0,
                "handoffsrefused": 0,
                "squawksassigned": 0,
                "cruisealtsmodified": 0,
                "tempaltsmodified": 0,
                "scratchpadmods": 0
            },
            {
                "connection_id": 24246771,
                "start": "2010-06-21T01:52:25",
                "end": "2010-06-21T02:24:05",
                "server": "USA-N",
                "vatsim_id": "1115151",
                "type": 2,
                "rating": 3,
                "callsign": "CYWG_GND",
                "times_held_callsign": 1,
                "minutes_on_callsign": "31.666667",
                "total_minutes_on_callsign": 740.25,
                "aircrafttracked": 0,
                "aircraftseen": 18,
                "flightsamended": 0,
                "handoffsinitiated": 0,
                "handoffsreceived": 0,
                "handoffsrefused": 0,
                "squawksassigned": 0,
                "cruisealtsmodified": 0,
                "tempaltsmodified": 0,
                "scratchpadmods": 0
            },
            {
                "connection_id": 23859859,
                "start": "2010-05-14T14:22:20",
                "end": "2010-05-14T14:33:30",
                "server": "USA-E",
                "vatsim_id": "1115151",
                "type": 2,
                "rating": 3,
                "callsign": "CYWG_GND",
                "times_held_callsign": 1,
                "minutes_on_callsign": "11.166667",
                "total_minutes_on_callsign": 740.25,
                "aircrafttracked": 0,
                "aircraftseen": 2,
                "flightsamended": 0,
                "handoffsinitiated": 0,
                "handoffsreceived": 0,
                "handoffsrefused": 0,
                "squawksassigned": 0,
                "cruisealtsmodified": 0,
                "tempaltsmodified": 0,
                "scratchpadmods": 0
            },
            {
                "connection_id": 23846258,
                "start": "2010-05-13T00:03:24",
                "end": "2010-05-13T00:47:08",
                "server": "USA-E",
                "vatsim_id": "1115151",
                "type": 2,
                "rating": 3,
                "callsign": "CYWG_GND",
                "times_held_callsign": 1,
                "minutes_on_callsign": "43.733333",
                "total_minutes_on_callsign": 740.25,
                "aircrafttracked": 0,
                "aircraftseen": 4,
                "flightsamended": 8,
                "handoffsinitiated": 0,
                "handoffsreceived": 0,
                "handoffsrefused": 0,
                "squawksassigned": 4,
                "cruisealtsmodified": 2,
                "tempaltsmodified": 0,
                "scratchpadmods": 0
            },
            {
                "connection_id": 23846215,
                "start": "2010-05-12T23:58:58",
                "end": "2010-05-13T00:03:22",
                "server": "USA-E",
                "vatsim_id": "1115151",
                "type": 2,
                "rating": 3,
                "callsign": "CYWG_GND",
                "times_held_callsign": 1,
                "minutes_on_callsign": "4.4",
                "total_minutes_on_callsign": 740.25,
                "aircrafttracked": 0,
                "aircraftseen": 4,
                "flightsamended": 2,
                "handoffsinitiated": 0,
                "handoffsreceived": 0,
                "handoffsrefused": 0,
                "squawksassigned": 0,
                "cruisealtsmodified": 1,
                "tempaltsmodified": 0,
                "scratchpadmods": 0
            },
            {
                "connection_id": 23846158,
                "start": "2010-05-12T23:50:40",
                "end": "2010-05-12T23:58:55",
                "server": "USA-E",
                "vatsim_id": "1115151",
                "type": 2,
                "rating": 3,
                "callsign": "CYWG_GND",
                "times_held_callsign": 1,
                "minutes_on_callsign": "8.25",
                "total_minutes_on_callsign": 740.25,
                "aircrafttracked": 0,
                "aircraftseen": 1,
                "flightsamended": 0,
                "handoffsinitiated": 0,
                "handoffsreceived": 0,
                "handoffsrefused": 0,
                "squawksassigned": 0,
                "cruisealtsmodified": 0,
                "tempaltsmodified": 0,
                "scratchpadmods": 0
            },
            {
                "connection_id": 23846036,
                "start": "2010-05-12T23:34:29",
                "end": "2010-05-12T23:50:37",
                "server": "USA-E",
                "vatsim_id": "1115151",
                "type": 2,
                "rating": 3,
                "callsign": "CYWG_GND",
                "times_held_callsign": 1,
                "minutes_on_callsign": "16.133333",
                "total_minutes_on_callsign": 740.25,
                "aircrafttracked": 0,
                "aircraftseen": 4,
                "flightsamended": 0,
                "handoffsinitiated": 0,
                "handoffsreceived": 0,
                "handoffsrefused": 0,
                "squawksassigned": 0,
                "cruisealtsmodified": 0,
                "tempaltsmodified": 1,
                "scratchpadmods": 0
            },
            {
                "connection_id": 23837439,
                "start": "2010-05-11T23:58:03",
                "end": "2010-05-12T00:49:13",
                "server": "USA-E",
                "vatsim_id": "1115151",
                "type": 2,
                "rating": 3,
                "callsign": "CYWG_GND",
                "times_held_callsign": 1,
                "minutes_on_callsign": "51.166667",
                "total_minutes_on_callsign": 740.25,
                "aircrafttracked": 0,
                "aircraftseen": 3,
                "flightsamended": 0,
                "handoffsinitiated": 0,
                "handoffsreceived": 0,
                "handoffsrefused": 0,
                "squawksassigned": 1,
                "cruisealtsmodified": 0,
                "tempaltsmodified": 0,
                "scratchpadmods": 0
            },
            {
                "connection_id": 23767272,
                "start": "2010-05-04T23:35:06",
                "end": "2010-05-05T01:37:16",
                "server": "USA-W2",
                "vatsim_id": "1115151",
                "type": 2,
                "rating": 3,
                "callsign": "CYWG_GND",
                "times_held_callsign": 1,
                "minutes_on_callsign": "122.166667",
                "total_minutes_on_callsign": 740.25,
                "aircrafttracked": 0,
                "aircraftseen": 4,
                "flightsamended": 3,
                "handoffsinitiated": 0,
                "handoffsreceived": 0,
                "handoffsrefused": 0,
                "squawksassigned": 6,
                "cruisealtsmodified": 1,
                "tempaltsmodified": 0,
                "scratchpadmods": 0
            },
            {
                "connection_id": 23766943,
                "start": "2010-05-04T22:49:12",
                "end": "2010-05-04T23:21:13",
                "server": "USA-W2",
                "vatsim_id": "1115151",
                "type": 2,
                "rating": 3,
                "callsign": "CYWG_GND",
                "times_held_callsign": 1,
                "minutes_on_callsign": "32.016667",
                "total_minutes_on_callsign": 740.25,
                "aircrafttracked": 0,
                "aircraftseen": 3,
                "flightsamended": 0,
                "handoffsinitiated": 0,
                "handoffsreceived": 0,
                "handoffsrefused": 0,
                "squawksassigned": 0,
                "cruisealtsmodified": 0,
                "tempaltsmodified": 0,
                "scratchpadmods": 0
            }
        ]
    }

    This endpoint will only return JSON.

  7. VATSIM API Update 24/06/2020

     

    Check out the Swagger browser to see everything!

  8. 8 hours ago, Mike Welten said:

    @Ryan Bentley Dear Ryan, can you already tell me when we can expect the update regarding the "previous rating before service rating" ? 

    I would also highly appreciate if you could implement a inactive/active key instead of modifying the rating - If that is not a too big change to implement. Thank you very much!

    Also highly appreciated - this will make the update process much easier! Thank you! Hope we get the token soon so I can implement this as well.

    So you want to have a flag for active/not-active instead of rating 0? Things like this are not possible at the moment due to not being able to alter the database schema until we've fully migrated from the old stuff.

  9. On 4/30/2020 at 8:55 AM, Mike Welten said:

    @Ryan Bentley I would also appreciate if the subdivisions could access a memberlist. That would really help to keep an up to date database.

    I was also wondering if we could split the activity from the atc-rating so, even if the user is inactive, he‘s still listed with the correct former rating. Maybe implementing a new field inactive since (like suspensions) would be an idea.

    Thank you for considering!

     

    Subdivisions can now access a memberlist, you have to have authorization from the subdivision director to have a token for this. You can ask them to send me an e-mail (in my signature) for this.

    • Thanks 1
×
×
  • Create New...