Difference between revisions of "Umlaut partial html API"
(New page: The Umlaut partial HTML API is meant for when you want Umlaut to generate HTML, but you want to embed that HTML on an external page. The API will deliver sections of generated HTML, that y...) |
(No difference)
|
Revision as of 15:52, 2 October 2008
The Umlaut partial HTML API is meant for when you want Umlaut to generate HTML, but you want to embed that HTML on an external page. The API will deliver sections of generated HTML, that you can include elsewhere.
If you plan to include it via javascript, you will likely find it even more convenient to use the [Umlaut partial html API javascript helper], saving you even more work. The javascript helper uses the API behind the scenes.
Accessing the API
Supplied via the resolve/partial_html_sections actions. Instead of accessing the ordinary resolver base URL, you replace "resolve?" in your query with "resolve/partial_html", eg http://umlaut.university.edu/resolve/partial_html? . You send the OpenURL context object the same as you would for an ordinary resolve action, in URL or POST XML, etc.
By default, the API returns XML. To return json instead, include:
¨aut.response_format=json
To return jsonp, wrapped in a javascript procedure call:
¨aut.response_format=jsonp¨aut.jsonp=desiredJavascriptFunctionName
Response
<complete>
When accessing Umlaut over an API, it's important to realize that the initial response from Umlaut may not include all Umlaut information. Umlaut continues to run services in the background that can generate responses and enhance metadata. <complete> will contain 'true' or 'false' depending on whether background services are still executing. Further elements in the response provide information on what is still executing, and how to retrieve further information.
<in_progress>
This block will only be present when <complete> is 'false'. It provides information on completion status, and how to refresh the response for more information prepared in the background. For more information, see the documentation in [Umlaut full API#.3Cin_progress.3E], the block is the same here.