Developers
Aviamagazine API

API Documentation

The Aviamagazine API was built to provide access to Aviamagazine.com data for use in other sides or systems. It will provide real-time information on for instance news and photo information. Requests to the REST API are made using a normal HTTP GET URL structure and responses are provided in JSON format.

The following API documentation can be applied for any major programming langauge and will present general integration guides and explanations around API endpoints, request parameters and response objects.

Get Started

For now API's can be used without restrictions. At some point we might introduce an API access key, which is linked to your Aviamagazine Account.

JSONP callbacks

The Aviamagazine APIs support JSONP Callbacks. To use the JSONP functionality, append the callback parameter to your API endpoint URL and set it to a function name of your choice. The API will return the API response wrapped inside the function name you specified.

Example request:

https://www.aviamagazine.com/api/randomphoto?callback=FUNCTION_NAME

Example response:

FUNCTION_NAME ({ 
    [ ... ]
})

API Errors

If for some reason the API call fails, the API will return a JSON error response that contains error code and message objects indicating the type of error that occurred. The API also supports HTTP status codes, for instance a 404 in case of an invalid parameter being used.

{
    "error" : {
        "code" : 404,
        "type" : "unknown_api",
        "message" : "The given API endpoint does not exist."
    }
}
                

Common API errors:

Code Type Description
401 invalid_access_key An invalid API access key was supplied.
401 missing_access_key No API access key was supplied.
404 unknown_api The given API endpoint does not exist.
404 invalid_parameters Invalid parameters were supplied in your API call. Please check documentation.

API Endpoints

WhatsNew

The API will return an overview with the latest updates on Aviamagazine.com. Do this with the API's whatsnew endpoint together with optional parameters to filter your result set.

Example request:

https://www.aviamagazine.com/api/whatsnew?count=2

HTTP GET request parameters:

Object Description
callback [Optional] Use this parameter to specify a JSONP callback function name to wrap your API response in.
count [Optional] Specifies the number of whatsnew items to retrieve. Default is 5. Example: 2

Example API response:

{
    "about" : "AviaMagazine Whatsnew",
    "support" : "http://www.aviamagazine.com/about/developer.aspx",
    "version" : "1.0",
    "count" : "2",
    "priority_sort" : "false",
    "created" : "2012-12-06T20:49:53.3854604+01:00",
    "news" : [
        {
            "title" : "Royal International Air Tattoo 2012",
            "sub_title" : "Biggest military air show at RAF Fairford",
            "body" : "The annual Royal International Air Tattoo (RIAT) is one of the biggest military air shows in the world held at RAF Fairford. Aviamagazine’s correspondent Leo Hoogerbrugge visited this year’s show on Sunday 8 July and departure, the next day.",
            "content_type" : "Show Report",
            "publish_date" : "201207180000",
            "page_link" : "http://www.aviamagazine.com/gallery/album.aspx?id=46",
            "photo_url" : "http://www.aviamagazine.com/photohandler.ashx?id=3551592708"
        },
        {
            "title" : "Moscow Tour 2011, Episode 1",
            "sub_title" : "Tour around the city and MAKS air show",
            "body" : "August 2011 we headed to Moscow for an aviation tour around the city and a visit to the MAKS air show. Since Russia isnt fully open for spotters we joined an organised tour with Aeroprints. With 15 years of experience they have lots of contacts, very useful to visit restricted areas. Although we visited both civil and military sites, the main focus of this article is on civil aviation.",
            "content_type" : "Trip Report",
            "publish_date" : "201206060000",
            "page_link" : "http://www.aviamagazine.com/reports/trip/moscow2011/index.aspx",
            "photo_url" : "http://www.aviamagazine.com/photohandler.ashx?id=3547478019"
        }
    ]
}
                

LastViewed

The API will return an array with the last viewed photo's on Aviamagazine.com. Do this with the API's lastviewed endpoint. For this endpoint there are no specific parameters.

Example request:

https://www.aviamagazine.com/api/lastviewed

HTTP GET request parameters:

Object Description
callback [Optional] Use this parameter to specify a JSONP callback function name to wrap your API response in.

Example API response:

{
  "about" : "AviaMagazine Lastviewed",
  "support" : "http://www.aviamagazine.com/about/developer.aspx",
  "version" : "1.0",
  "created" : "2020-02-02T15:15:20.9223547+01:00",
  "photos" : [
    {
      "id" : "3624040314",
      "type" : "B737",
      "serial" : "C-FIWS",
      "taken_at" : "Edmonton, Canada",
      "views" : "42",
      "page_link" : "http://www.aviamagazine.com/gallery/photoview.aspx?id=3624040314",
      "photo_url" : "http://www.aviamagazine.com/photohandler.ashx?id=3624040314"
    },
    {
      "id" : "3545660454",
      "type" : "Tu-144",
      "serial" : "CCCP-68001",
      "taken_at" : "inflight",
      "views" : "289",
      "page_link" : "http://www.aviamagazine.com/gallery/photoview.aspx?id=3545660454",
      "photo_url" : "http://www.aviamagazine.com/photohandler.ashx?id=3545660454"
    },
    {
      "id" : "3515260412",
      "type" : "MiG-29",
      "serial" : "5304",
      "taken_at" : "Cambrai AB, France",
      "views" : "140",
      "page_link" : "http://www.aviamagazine.com/gallery/photoview.aspx?id=3515260412",
      "photo_url" : "http://www.aviamagazine.com/photohandler.ashx?id=3515260412"
    },
    {
      "id" : "3697384244",
      "type" : "A320",
      "serial" : "N835VA",
      "taken_at" : "San Fransisco, CA",
      "views" : "24",
      "page_link" : "http://www.aviamagazine.com/gallery/photoview.aspx?id=3697384244",
      "photo_url" : "http://www.aviamagazine.com/photohandler.ashx?id=3697384244"
    },
    {
      "id" : "3324217529",
      "type" : "F-16",
      "serial" : "J-055",
      "taken_at" : "Woensdrecht, Netherlands",
      "views" : "372",
      "page_link" : "http://www.aviamagazine.com/gallery/photoview.aspx?id=3324217529",
      "photo_url" : "http://www.aviamagazine.com/photohandler.ashx?id=3324217529"
    }
  ]
}
                

RandomPhoto

The API will return a single random photo from the Aviamagazine.com database. Do this with the API's randomphoto endpoint together with optional parameter to filter your result.

Example request:

https://www.aviamagazine.com/api/randomphoto

HTTP GET request parameters:

Object Description
type [Optional] If supplied, the return will be a military, civil or both photo. Valid types are mil, civ, both or empty which leads to the default: both.
callback [Optional] Use this parameter to specify a JSONP callback function name to wrap your API response in.

Example API response:

{
  "about" : "AviaMagazine Random Photo",
  "support" : "http://www.aviamagazine.com/about/developer.aspx",
  "version" : "1.0",
  "aviation_type" : -1,
  "created" : "2020-02-02T15:16:31.5726839+01:00",
  "photo" : {
    "id" : "3770719375",
    "type" : "F-35A",
    "type_short" : "F-35",
    "serial" : "F-001",
    "unit_airline" : "323rd TES",
    "origin" : "Royal Netherlands Air Force",
    "taken_at" : "Volkel AB, Netherlands",
    "date" : "14 jun 2019",
    "photo_by" : "Gostar den Daas",
    "remarks" : "",
    "views" : "4",
    "page_link" : "http://www.aviamagazine.com/gallery/photoview.aspx?id=3770719375",
    "photo_url" : "http://www.aviamagazine.com/photohandler.ashx?id=3770719375"
  }
}
                
Comments
To place a comment, you need be be an Aviamagazine Member. Sign up for a free membership.