Many popular social networking sites, including facebook, twitter, flickr and YouTube, provide a public application programming interface, or API. APIs allow developers to access the data maintained by these sites to build their own applications and get data. The API structure allows third parties to interface with these systems without providing full access to sensitive information like user passwords. I thought it’d be great if online museum collections provided their own public APIs to allow outside developers to access images or collection data (or even create their own educational applications) while operating within certain restrictions that could be set by the museum.
With this in mind, we’re releasing an alpha build of Open API, a program that allows you to create a public API into your collection (or any other MySQL) database. An external config file allows users to set parameters for which data can and cannot be accessed by the API. To prevent complex queries from tying up the server on which the database is hosted, the program also features a way for the user to limit query length and has a built-in time out option.
Open API will be an integral part of Open Exhibits core and we plan to integrate this tool with our Collection Viewer module to allow users to pull images & data from Omeka into a multitouch viewing application. However, unlike the other Open Exhibits modules & software, this software does not require Flash. It will interface with any MySQL database as long as you have the database username and password.
Getting into the nerdy nitty-gritty, the software is built using Sinatra, which is a Ruby-based web development framework, and will run on any Rack-compatible stack. Ask your system administrator if you’re not sure about what kind of database or stack you’re using. This early build is compatible with MySQL databases only. It can interface with Omeka, Insight + LUNA, MimsyXG + Mobius, WordPress and any other MySQL-compatible software. We plan to release support for other types of databases in the future.
This is an alpha build, which means it’s basically a prototype. We’re still adding features (you can’t query for dates yet, for example) and it hasn’t undergone extensive testing or debugging; however, it’d be great if you’d let us know what you think and how it can be improved. You can reach us on twitter or at firstname.lastname@example.org.
by James Kassemi on October 25, 2010