Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
From version 3.6 (2013-10-18), we introduced a basic semi-RESTful API which I'll (@barryo) refer to as APIv1 (or poor man's API).
API Calls for Administrators / SUPERUSERS
API Calls for Customer / Member Users
Public / Test API Calls
- Hello World:
Getting Your API Key(s)
All API interactions are secured via per-user API keys that are only sent over HTTPS.
You can create / delete your key(s) by using the menu option My Account -> API Keys.
This API is semi-RESTful in that it supports GET/POST requests and responds via HTTP status codes but it does not implement a full RESTful interface for all data objects.
The current primary motivators for this API are:
- reduce reliance on the CLI based
ixptool.phpcommand as it often affects services on other machines requiring the use of ssh / RANCID / etc;
- provide additional features for customers / members such as access to traffic graphs and statistics via a simple URL.
The API logic is implemented via a Zend Framework module called
apiv1 (in retrospect, this is also how the CLI controller should have been implemented).
Shared functionality between the API, CLI and web frontend controllers are implemented as traits.
You can see the additional of the API functionality as well as a proof of concept conversion of mailing list management from just CLI to both CLI and API by diffing between the tags
If you want to reference files for the mailing list API, then look at:
- application/modules/apiv1/controllers/MailingListController.php - the API controller;
- library/IXP/Controller/Trait/MailingList.php - shared functionality between CLI and API actions;
- application/controllers/MailingListCliController.php - the resultant CLI controller that is sharing the above trait with the API.