Contributor(s): Than Grove
To find out the XML metadata for a single image, locate the image in MMS and add ".xml" to the URL. This will produce an XML file that contains information about the image along with the different URLs to the various sizes. These URLs can be used when a particular size is needed to be displayed. For example, the URL http://mms.thlib.org/media_objects/604.xml produces the following XML:
<picture> <id>604</id> <copyright id="604"> <copyright_holder title="ILCS" website="http://www.rub.edu.bt" id="3"/> <reproduction_type title="only private uses permitted" website="" id="4"/> </copyright> <associated_category title="Ritual Documentation" id="3816"/> <associated_category title="Namkha Lhakhang Tang Rabney" id="4030"/> <associated_feature fid="18104" title="Namkha"/> <image thumbnail="compact" height="95" url="http://mms.thlib.org/images/0000/1795/604_compact.jpg" size="3015" width="95"/> <image thumbnail="essay" height="225" url="http://mms.thlib.org/images/0000/1795/604_essay.jpg" size="21428" width="300"/> <image thumbnail="huge" height="300" url="http://mms.thlib.org/images/0000/1795/604_huge.jpg" size="56051" width="400"/> <image thumbnail="large" height="300" url="http://mms.thlib.org/images/0000/1795/604_large.jpg" size="35325" width="400"/> <image thumbnail="normal" height="300" url="http://mms.thlib.org/images/0000/1795/604_normal.jpg" size="35325" width="400"/> <image thumbnail="search" height="113" url="http://mms.thlib.org/images/0000/1795/604_search.jpg" size="5398" width="150"/> <image thumbnail="thumb" height="120" url="http://mms.thlib.org/images/0000/1795/604_thumb.jpg" size="4404" width="120"/> </picture>
The API will provide the following tags (if data is available in the database):
If one wants the information about a specific collection of images, such as those with a parameter "?keyword_id=…", append the parameter "&format=xml" to the end of the URL. This will provide an "array" of XML nodes with information about each image in that group. These nodes do not however contain the URL for each individual version of each picture. Instead, the idea for that image must be used as described above to find the individual image locations. An example of this is:
http://mms.thlib.org/media_objects?keyword_id=32&format=xml
One can perform a search on MMS through the URL by using GET parameters, namely by calling http://mms.thlib.org/media_searches? followed by a list of key=value pairs. The most common search parameters are:
An example is: http://mms.thlib.org/media_searches?media_search_title=+mountain&media_search_type=boolean