UNAPI

UNAPI lets you request a record in any number of formats in a machine readable way. So a harvesting engine could read a koha detail page, and it would know how to grab a dublin core version of that record, or a marcxml or mods version. It requires that you fill out the OPACBaseURL syspref and that you are running Zebra.

It adds two bits of code to the detail page in the OPAC

1. the link rel tells an application where to look to retrieve unapi information, it is present on all opac pages

 <link rel="unapi-server" type="application/xml" title="unAPI" href="/cgi-bin/koha/unapi" />

2. on the detail page on the OPAC, the following code tells an unapi application how to request information about this specific record:

 
 <!-- unAPI <abbr/> tag -->
 <p><span class="label">ISBN: </span><abbr class="unapi-id" title="koha:isbn:0399234160">0399234160</abbr></p>
     

For example:

 /cgi-bin/koha/unapi - lists the available formats and the syntax
 
 http://opac.liblime.com/cgi-bin/koha/unapi?id=koha:isbn:0380973464&format=marcxml (give me the following isbn in the marcxml format)
 
 http://opac.liblime.com/cgi-bin/koha/unapi?id=koha:isbn:0380973464&format=dc (give me the following isbn in the dublin core format)
 
 
en/development/unapi.txt · Last modified: 2008/04/07 11:50 by kados
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki