dmwebservices is a simple wrapper around the CONTENTdm Server API functions, with a few exceptions to improve error handling. A few additional API functions are handled by the utils controller on the CONTENTdm Website instead of by dmwebservices on the CONTENTdm Server.
dmwebservices provides an interface to the CONTENTdm Server API functions, in the form:
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=function/param1/param2/format
For CONTENTdm sites hosted by OCLC, note the following:
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL/digital/bl/dmwebservices/index.php?q=wsAPIDescribe/format
|
The version number of the API. |
http://yourCONTENTdmUR/digital/bl/dmwebservices/index.php?q=wsAPIDescribe/xml |
Signature | Example |
---|---|
http://yourCONTENTdmURL/digital/bl/dmwebservices/index.php?q=dmGetCollectionList/format
|
http://yourCONTENTdmURL/digital/bl/dmwebservices/index.php?q=dmGetCollectionList/xml |
Signature | Example |
---|---|
http://yourCONTENTdmURL/digital/bl/dmwebservices/index.php?
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php? |
Signature | Example |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetLocale/format
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetLocale/xml |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetStopWords/format
Stopwords.txt is a global file for the server, so no collection alias is required. |
A list of the stop words listed in Stopwords.txt. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetStopWords/json |
Signature | Example |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionArchivalInfo/alias/format
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionArchivalInfo/ctimes/xml |
Signature | Example |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionDisplayImageSettings/alias/format
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionDisplayImageSettings/ctimes/xml |
Signature | Example |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionFieldInfo/alias/format
In JSON, Unicode characters in the field's name are converted to decimal Unicode entities. E.g., 題名 is converted to \u984c\u540d |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionFieldInfo/ctimes/xml |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionFieldVocabulary/alias/nickname/forcedict/forcefullvoc/format
|
Returns an array of terms for the field specified by the given collection alias and field nickname. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionFieldVocabulary/ctimes/subjec/0/1/xml |
Signature | Example |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionFullResVolumeInfo/alias/volume/format
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionFullResVolumeInfo/ukr/83062/xml |
Signature | Example |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionImageSettings/alias/format
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionImageSettings/ctimes/xml |
Signature | Example |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php? |
Signature | Example |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionPDFInfo/alias/format
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionPDFInfo/ctimes/xml |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionWords/alias/fields/format
|
A list in the specified format of the indexed words for all fields or only those specified. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetCollectionWords/mycollection/title!subjec/xml |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmCheckStreamingUrl/alias/find/extension/format
|
This checks to see if an item type with no defined viewer is a streaming item as defined in stream.txt on the server. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmCheckStreamingUrl/mycollection/1.ram/ram/json returns: {"s":true,"url":"http:\/\/www.myurl.com/1.ram"} |
Signature | Example |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmEADSearchTotals/alias/searchterm^mode/id/pagecount/document_type/find/format
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmEADSearchTotals/mycollection/bridge^any/8/2/findingaid/9.cpd/json returns: {"pager":{"start":1,"maxrecs":10,"total":10},"records":[["6",39],["7",4]]} |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmFullTextTotals/alias/field^searchterm^mode/return_field/id/pagecount/document_type/format
|
This returns the total number of page matches and the page IDs with the number of matches per page. The example search below finds matches on three of six pages, with one match on the page with ID 96. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmFullTextTotals/mycollection/transc^bridge^any/transc/102/6/compobj/json Returns {"pager":{"start":0,"maxrecs":"6","total":3},"records":[[96,1],[98,5],[99,4]]} |
Returns the flat structure:
<?xml version="1.0"?>
Document
Page 1
76755.jpg
69997
Page 2
76756.jpg
69998
Page 3
76757.jpg
69999
Page 4
76758.jpg
70000
Page 5
76759.jpg
70001
Signature | Example |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php? |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?
|
This function returns the descriptive metadata and administrative metadata for an item. Elements in the descriptive metadata are determined by the collection's field configuration, and administrative metadata is added automatically by CONTENTdm. Empty fields are present in XML as empty elements and in JSON as empty arrays. If the item is not found, the function returns the following error message: -2Requested item not found This function also makes direct calls to dmItemHasOCRText and dmItemFileSize to eliminate the need for extra API calls. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php? returns: { The XML version of this record is:
|
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetItemUrl/alias/find/format
|
This function retrieves the URL of a URL item. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetItemUrl/mycollection/1.url/json returns: {"URL":"http:\/\/www.myurl.com"} |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetRecent/alias/num/fields/mode/imagesonly/format
|
A list of records produced by the query, plus a total for the number of records returned. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetRecent/mycollection/5/title/0/1/xml returns: < xml version="1.0" encoding="UTF-8"?> |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetStreamingFile/alias/find/format
|
This function will get the local file and deliver it as a streaming resource for playback or download. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmGetStreamingFile/mycollection/1.mp4/xml |
Signature | Returns | Example | Note |
---|---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmItemFileSize/alias/pointer/extension/sizeunit/format
|
An array with two items: the size in bytes (unformatted) and the formatted string based on the size unit passed in. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmItemFileSize/mycollection/7/pdf/2/json returns: Array([size] => 16831177 [formatted] => 16.05 MB) |
This function is also called directly from dmGetItemInfo to remove the need for additional API calls. |
Signature | Returns | Example | Note |
---|---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmItemHasOCRText/alias/pointer/format
|
An array with a single item, hasOCR, with a value of 1 (has OCR text) or 0 (no OCR text). |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmItemHasOCRText/mycollection/7/json returns: Array([hasOCR] => 1) |
This function is also called directly from dmGetItemInfo to remove the need for additional API calls. |
Signature | Returns |
---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmQuery/alias/searchstrings/fields/sortby/
|
This function returns a list of records produced by the query, plus a pager that contains values for start, maxrecs, and total. If facets is included, this function returns a list of facets on the indicated field(s). If suggest is "1", the suggested spelling is returned. If showunpub is "1", records from unpublished collections will be included. If denormalizeFacets is "1", and facets is not "0", but instead a !-delimited list of field nicknames, then the requested facet fields will be shown with capitalization and diacritics. |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmQueryTotalRecs/queries/format
|
The total number of records for each query. |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?q=dmQueryTotalRecs/mycollection|subject^word^all^and|subjec!title|nosort~ For each query in queries, this function executes a query with a maximum limit of one record returned. It then pulls total records of the query from the pager info in the returned data. |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?
This function is not part of the standard CONTENTdm API. It is a subset of dmGetItemInfo, designed for efficient realtime retrieval of an item's last-modified date, so a full request to dmGetItemInfo can be issued if necessary. |
The value of the dmmodified element for the requested item. If item is not found, returns the following error message:
|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php? returns: {"0":"2009-09-22"} |
Signature | Returns | Example |
---|---|---|
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php?
|
This function returns the pointer of the item that is the parent of the pointer in the URL signature. If no parent is found, this function returns "-1". |
http://yourCONTENTdmURL.com/digital/bl/dmwebservices/index.php? returns: < parent>83090</parent> |