iframe header
  • Join FlightAware (Why Join?)
  • Login
  • US Flag 
12:36AM EDT

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: e_filed JSON response format
PostPosted: Mon Aug 13, 2012 2:12 am 
Offline

Joined: Fri Apr 27, 2012 1:10 am
Posts: 6
Greetings,

Can somebody please mention the JSON response format return for the event code 'e_filed' i.e when a flight plan is filed?
I have searched and found it for event code 'arrival' posted by bovineone.
https://discussions.flightaware.com/flightxml/pushed-delivery-of-flightxml-requests-now-available-t13788.html

Also can you please mention the name of 'Query String' that is return from flightaware server when Push API Notification for e_filed event occurs?
Example : www.abc.com/xyz.aspx?pqr=response
I am asking for 'pqr', what is it return from flightaware server? Is it going to be same for all the alerts?
OR do we have to register URL 'www.abc.com/xyz.aspx?pqr=' liike this and you will just return the response?

It would be a great help if somebody response to the post..

Thanks,
Danny


Top
 Profile  
 
 Post subject: Re: e_filed JSON response format
PostPosted: Tue Aug 14, 2012 11:07 am 
Offline
FlightAware Staff
bovineone - FlightAware user avatar

Joined: Wed Jul 27, 2005 3:00 am
Posts: 234
Location: FlightAware WHQ
The JSON for a "filed" alert will look something like this:

Code:
{
    "long_desc": "Southwest #1435 (B737) has just filed a flight plan. It is scheduled to depart from Long Island Mac Arthur (KISP) at 11:40AM EDT heading for Baltimore/Washington Intl (KBWI) for an estimated arrival at 12:52PM EDT.\n\nOrigin (Long Island Mac Arthur / ISP): Gate A5\n\nExpected route: BEADS EMJAY J174 ZIZZI ATR V308 BILIT",
    "short_desc": "SWA1435 (B737) filed to depart KISP @ 11:40AM EDT for KBWI @ ETA 12:52PM EDT (BEADS EMJAY J174 ZIZZI ATR V308 BILIT)",
    "summary": "SWA1435 filed a flight plan KISP -> KBWI",
    "eventcode": "filed",
    "alert_id": 1947191,
    "flight": {
        "ident": "SWA1435",
        "aircrafttype": "B737",
        "origin": "KISP",
        "destination": "KBWI",
        "filed_ete": "00:57:00",
        "route": "BEADS EMJAY J174 ZIZZI ATR V308 BILIT",
        "faFlightID": "SWA1435-1344749626-airline-0456",
        "filed_altitude": 280,
        "filed_airspeed_kts": 411,
        "filed_time": 1344959297,
        "filed_departuretime": 1344958800,
        "estimatedarrivaltime": 1344962392,
        "actualarrivaltime": 0,
        "actualdeparturetime": 1344959280,
        "estimated_blockin_time": 1344963300,
        "filed_blockin_time": 1344963000,
        "actual_blockin_time": 0,
        "estimated_blockout_time": 1344959100,
        "filed_blockout_time": 1344958800,
        "actual_blockout_time": 1344959280,
        "filed_arrivaltime": 1344962220
    }
}


When a pushed alert is posted to your script, the above JSON as sent as the entire POST body of the request and the Content-type is "application/json; charset=utf-8". There is no query variable name, since it is not application/x-www-form-urlencoded

If you are using PHP, then you can do this to access it:
Code:
$body = @file_get_contents('php://input');


Top
 Profile  
 
 Post subject: Re: e_filed JSON response format
PostPosted: Tue Aug 14, 2012 11:45 am 
Offline
FlightAware Staff
bovineone - FlightAware user avatar

Joined: Wed Jul 27, 2005 3:00 am
Posts: 234
Location: FlightAware WHQ
In ASP.NET, you might be able to use Request.InputStream or Request.SaveAs to access the raw request body. Let us know what method works for you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
iframe sidebar


 

Airport Tracker/Info


-or-