API Developers Breakfast
Technical overview, use and features available
Mike Thacker, Dominic Skinner and Steve MesserPorism Limited
9 July 2015 api.esd.org.uk
api.esd.org.uk@LGInformPlus
What is the API?
A set of RESTful web methods that feed data to front feed applications.
See:
http://webservices.esd.org.uk/
http://webservices.esd.org.uk/explain
api.esd.org.uk@LGInformPlus
What you get• Everything that drives the LGA’s own
applications for benchmarking and small area profiling
• Data (see datasets) maintained by Research and Information team
• Sound statistical analysis (see value types)
api.esd.org.uk@LGInformPlus
Applying a consistent framework
Metrics• 2,917 metric types with values• 49 million metric values available
(+ 85 million in back end)
• many data sources• consistent time periods• consistent breakdowns• large to small official statistical areas• other areas
api.esd.org.uk@LGInformPlus
How metric values are defined
Areas Time periodsMetrics
All typesId1 - Population
Population of all counties of England in 2014
All typesAll counties
All typesCalendar year 2014
api.esd.org.uk@LGInformPlus
API keys• Sign in and request a key
• Public key is for quick use• Public private key is to ‘sign’ live calls• OAuth is to recognise individual users (if you need to)
api.esd.org.uk@LGInformPlus
Some simple examplesThe following JavaScript examples use no server side code whatsoever!
Include jQuery Library
Call web service with public key using JSONP
Parse returned JSON and output data
Insert your Public Key
api.esd.org.uk@LGInformPlus
Some simple examples
Want to see the API in action? Download the examples and create your own security keys.
Replace YOUR_PUBLIC_KEY with the public key you have created. Save and open the HTML file to view.
api.esd.org.uk@LGInformPlus
Public Private Key example
This simple PHP function takes a URL (like the one shown earlier) and appends an Application Key. It then generates a signature from the URL and Private Key.
Examples can be found on File Exchange.
api.esd.org.uk@LGInformPlus
Help with metric typesSee standards pages
api.esd.org.uk@LGInformPlus
Help with web methodsUse the data tool or see ‘Explain’ in web methods tool
See example
api.esd.org.uk@LGInformPlus
Help with anything API-relatedSee API help
api.esd.org.uk@LGInformPlus
Further information
API: api.esd.org.uk
Help: help.esd.org.uk / [email protected]
[email protected] [email protected]
@DrTimAdams @MikeThacker
Mike SteveDom