{"id":33,"date":"2014-04-18T15:23:46","date_gmt":"2014-04-18T15:23:46","guid":{"rendered":"http:\/\/www.autorouter.eu\/wiki\/?page_id=33"},"modified":"2026-07-28T18:44:15","modified_gmt":"2026-07-28T18:44:15","slug":"api","status":"publish","type":"page","link":"https:\/\/www.autorouter.aero\/wiki\/api\/","title":{"rendered":"Application Programming Interface"},"content":{"rendered":"<h1>Introduction<\/h1>\n<p>The autorouter web interface is built on top of a RESTful API exporting the complete autorouter functionality. This application programming interface (API) is also available to 3rd party applications.<\/p>\n<p>Clients issue HTTPS requests to the autorouter server, making use of the HTTP request types GET, POST, PUT and DELETE with request specific URLs and passing input data as either HTTP parameters or JSON formatted messages in the request body. Responses can be HTTP status codes or JSON messages in the body.<\/p>\n<h1>Structure<\/h1>\n<p>The API is structured around the following principal entities:<\/p>\n<ul>\n<li><a title=\"User\" href=\"\/wiki\/api\/user\/\">Users<\/a><\/li>\n<li><a title=\"Aircraft\" href=\"\/wiki\/api\/aircraft\/\">Aircraft<\/a><\/li>\n<li><a title=\"Routes\" href=\"\/wiki\/api\/routes\/\">Routes<\/a><\/li>\n<li><a title=\"Flightplan\" href=\"\/wiki\/api\/flightplan\/\">Flightplans<\/a><\/li>\n<li><a title=\"Navdata\" href=\"\/wiki\/api\/navdata\">Navdata<\/a><\/li>\n<li><a href=\"\/wiki\/api\/weather\">Weather<\/a><\/li>\n<li><a href=\"\/wiki\/api\/briefing\/\">Briefing<\/a><\/li>\n<li><a href=\"\/wiki\/api\/documents\">Documents<\/a><\/li>\n<li><a href=\"\/wiki\/api\/notams\">NOTAMs<\/a><\/li>\n<li><a title=\"Messages\" href=\"\/wiki\/api\/message-queue\/\">Messages<\/a><\/li>\n<\/ul>\n<p>Typically, operations are performed on these entities where GET retrieves information, POST creates an entity or performs an operation, PUT updates\/replaces an entity and DELETE removes an entity.<\/p>\n<h1>Authentication<\/h1>\n<p>The web frontend to autorouter contains an email \/ password authentication and uses session cookies to authenticate individual API calls during the lifetime of the session. This is typically not practical for API users which is why an additional method is offered.<\/p>\n<p>You will find more information on how to perform the authentication here: <a title=\"Authentication\" href=\"\/wiki\/api\/authentication\/\">Authentication via OAuth 2.0<\/a><\/p>\n<h1>API invocation<\/h1>\n<p>The RESTful API is located at<\/p>\n<pre>https:\/\/api.autorouter.aero\/v1.0\/&lt;group&gt;\/&lt;request&gt;<\/pre>\n<p>for example a HTTP POST to<\/p>\n<pre>https:\/\/api.autorouter.aero\/v1.0\/router<\/pre>\n<p>to create a new route.<\/p>\n<h1>Error Handling<\/h1>\n<p>API requests return a HTTP status code and optionally an error structure with more information. See the <a href=\"\/wiki\/api\/api-error-handling\/\">dedicated section for a summary of all possible error conditions<\/a>.<\/p>\n<h1>Versioning<\/h1>\n<p>The API is guaranteed to remain interface compatible in line with the <a href=\"http:\/\/semver.org\/spec\/v2.0.0.html\">Semantic Versioning<\/a> specification in which a version is comprised of 3 numbers in the format MAJOR.MINOR.PATCH where an increment of each component has the following meaning:<\/p>\n<ul>\n<li><strong>MAJOR<\/strong><br \/>\nWhen incompatible API changes are made.<\/li>\n<li><strong>MINOR<\/strong><br \/>\nWhen functionality is added in a backwards-compatible manner.<\/li>\n<li><strong>PATCH<\/strong><br \/>\nWhen backwards-compatible bug fixes are applied.<\/li>\n<\/ul>\n<p>Some APIs are documented as &#8220;<strong>unstable<\/strong>&#8220;. For these APIs, the above interface stability guarantee does not apply. They may see incompatible changes between minor version updates. If you rely on an unstable API, please contact us to discuss your needs and how we can promote it to stable API. Some APIs are not documented at all and we strongly advise against inspecting the web frontend data exchange to determine the use of these undocumented APIs as we regularly perform incompatible changes to such APIs. Again, if you believe such functionality is relevant to you, contact us and ask for a stable and documented interface.<\/p>\n<p>To query the current version of the API, perform the following request<\/p>\n<pre>HTTP GET https:\/\/api.autorouter.aero\/v1.0\/system\/version<\/pre>\n<p>This returns a JSON structure containing the major and minor version number.<\/p>\n<pre>{\n   \"major\": 1,\n   \"minor\": <span>0<\/span>,\n   \"patch\": 19,\n   \/* whether this is a production system (false for test\/sandbox system) *\/\n   \"production\": true,\n   \/* the minimum version of the API supported by the server *\/\n   \"minVersion\":\n   {\n      \"major\": 1,\n      \"minor\": 0\n   },\n   \/* whether the system considers the call to be authenticated *\/\n   \"auth\": false\n}<\/pre>\n<p>All invocations of the API contain the major and minor number as part of the URL (https:\/\/api.autorouter.aero\/v1.0). This allows the platform to introduce changes to the API but maintain backwards compatibility by continuing to provide the previous version of the API which requires knowing which version of the API the client expects. If you omit the version number, the server will assume the latest version of the API. It is beneficial to check back regularly for the latest API revision and adapt your application to make use of it. This will both give you access to added capabilities and keep you close to development so that when a major update happens and a previous version is finally retired from service, you most likely won&#8217;t have to make any changes or only small changes to your application. The API changes for each version number are documented in the <a title=\"Changelog\" href=\"\/wiki\/api\/changelog\/\">API changelog<\/a>.<\/p>\n<h1>Messages<\/h1>\n<p>Certain events trigger messages that clients can subscribe to using the <a href=\"\/wiki\/api\/message-queue\/\">message queue facility<\/a>.<\/p>\n<h1>Samples<\/h1>\n<ul>\n<li><a title=\"PHP API sample with cURL\" href=\"\/wiki\/php-api-sample-with-curl\/\">Simple PHP sample with OAuth 2.0 using cURL<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction The autorouter web interface is built on top of a RESTful API exporting the complete autorouter functionality. This application programming interface (API) is also available to 3rd party applications. Clients issue HTTPS requests to the autorouter server, making use of the HTTP request types GET, POST, PUT and DELETE with request specific URLs and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-33","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/pages\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/comments?post=33"}],"version-history":[{"count":38,"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/pages\/33\/revisions"}],"predecessor-version":[{"id":1076,"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/pages\/33\/revisions\/1076"}],"wp:attachment":[{"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/media?parent=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}