Using CONTENTdm’s APIs to Customize Your Site and Access Your Data
Using CONTENTdm's API suite, developers can unlock the full potential of their metadata and images. In my API “cookbook,” A Cookbook of Methods for Using CONTENTdm APIs, I attempt to show how to use PHP code to harness the power of the CONTENTdm APIs.
A Cookbook of Methods for Using CONTENTdm APIs gives practical examples of programs using the CONTENTdm APIs to customize the look of your image collections. The Cookbook website gives program examples of how to use the CONTENTdm APIs to customize the look of your image collection. The test data used for the Cookbook is from the Illinois Digital Archives collections (http://www.idaillinois.org/).
CONTENTdm has a number of useful APIs for directly accessing information contained in its indexes and files. The website is intended as a practical reference guide for using many—though not all—of these APIs. The complete list of APIs can be found on OCLC’s CONTENTdm Support website.
Please tinker with the code, extend and improve it. Perhaps you might want to contribute it back to GitHub. Together, we can create the code that makes the best use of CONTENTdm’s APIs.
Here are some examples of what the Cookbook covers.
Getting field names: CONTENTdm uses nicknames for the metadata held in its records. The nicknames may or may not correspond to the actual field name. For instance, the Title field might have a nickname of “title,” but the Subject – LCSH field might be called “subjeca.” Translating the field names is a job for dmGetCollectionFieldInfo.
Searching: dmQuery is a powerful search utility with a variety of parameters. Mastering dmQuery opens up the full power of CONTENTdm.
Compound objects: The dreaded Bandersnatches of CONTENTdm API coding are compound objects because of the complexity of the data types that can be compound objects. The Cookbook discusses how best to manage a compound object collection.
Beyond the user interface: The Cookbook helps you use CONTENTdm records in WordPress and helps you craft completely customized pages, like The Pullman State Historic Site webpage.
In August, I presented at the CONTENTdm Users Group meeting in Davenport, Iowa, held jointly with the Upper Midwest Digital Collections Conference, and you can view my two presentations online. The programs presented at this conference used Perl instead of PHP—proof that any language will work with the APIs.
Explore more of the CONTENTdm API world with me when I present during an upcoming webinar on Tuesday, December, 13, 2016.
CONTENTdm Community Insight Webinar: Using CONTENTdm’s APIs to Customize Your Site
Presenter: Andrew Bullen, Illinois State Library
Date: Tuesday, December 13, 2016
Time: 3:00 PM – 4:00 PM Eastern Standard Time, North America (UTC -5)