[Xerte-dev] Long awaited API - Advanced users only

Smith, John J.J.Smith at gcu.ac.uk
Tue Jul 2 14:25:35 BST 2013


Hi,

Sorry it's taken so long, but for those who wish to try out the API and give me some feedback, here is a zip to drop in root. Probably best to try on a non-critical server just now to make sure there are no security holes/bugs...

Simply:

Unzip and drop in root (works in xampp)
Navigate to /api/setup - this will install the 3 tables in MySQL (keys, nonces, options) and a test key/secret pair IQKbtAYlXLripLGPWd0HUA  /  GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
It also includes a testing file at /api/test.php which will build a request, sign it and show the response to allow you to test against what you have running...

It's more complicated that it needed to be but it opens up the database to I wanted to make sure it required at least signed requests... It pretty much implements an Auth 1.0 2-Legged request and uses OAuth.php to do all the heavy lifting...

If you look in the /controllers folder you'll see how the controllers are implemented. Plan it to add another called 'xxxx' (not sure yet) which will expose some of the data about the system.

Some code has been committed to trunk (but not much) to give API tabs etc but at present there is no way to generate a new 'application' entry other than SQL straight into the database, it should then show in the Workspace API tab for that user... working on the rest...

Send me any errors or comments and i'll address...

Regards,

John Smith | Learning Technologist
Room A251, Govan Mbeki Building | School of Health & Life Sciences | Glasgow Caledonian University
Cowcaddens Road | Glasgow | G4 0BA

Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: api.zip
Type: application/x-zip-compressed
Size: 18355 bytes
Desc: api.zip
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20130702/8b982f03/attachment-0001.bin>


More information about the Xerte-dev mailing list