-
Notifications
You must be signed in to change notification settings - Fork 24
HTML Snippet API Response
While Umlaut has a full XML/JSON Data API Response, for the common use case of embedding Umlaut content on an external page, it's just too much work to use the full data api.
This HTML Snippet API Response is meant for when you want Umlaut to generate the 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 and less work to use the Umlaut JQuery Content Utility, saving you even more work. The Content Utility javascript helper uses the API behind the scenes.
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