Topic: Update your Digital New Zealand search source!
Digital New Zealand is turning off support for V1 or their API, this topic will tell you how to update you DNZ search source to V3 so that it continues to work.
The Kete software has been a long time user of the Digitial New Zealand API. In fact the external search sources functionality, which is based on open standards and can be used for many things beside DNZ, was originally funded by DNZ. A great collaboratoon!
However, as is common with software newer versions replace older versions of software. We have reached the time that any Kete site that was using V1 of the Digital New Zealand API must upgrade or their search of DNZ will stop working.
Thanks to the fact that Kete opted to base its use of DNZ around the RSS open standard, this is just a matter of changing a few URLs for each Kete site.
Here's how to update your Digital New Zealand settings
- login as a tech administrator to your Kete site
- scroll down on any page to the Administrator's Toolbox
- click search sources from the list of links in the toolbox
- click Edit from the "Results via Digital NZ" row in the table
under base url, you will find a value like this:
copy what you find between "api_key=" and "&search_text=", you'll need this in the next step, so paste it someplace so you can retrieve in a moment (if you have anything after "&search_text=", also save that, you'll want to add that back in below as well)
replace the base url value with the line below, but substituting your api key (what you just copied for safe keeping above) for "your_api_key" in the text below (and if you had anything that you had after "&search_text=" it now needs to comply with format outlined in V3 Developer guide, if it is for excluding your content provider, use add "&without[content_provider]=your_content_provider" after "your_api_key", but before "&text="):
Here's an example that will skip results from Kete Horowhenua (as our local search on Kete Howhenua covers them already):
next replace the more results url with the line below (if you have custom text after "search_text=" in the previous value, you'll need to do additional steps accordingly):
- click update
- now scroll down to the Administrator's Toolbox again
- click reconfigure site
- on the next page, click "Restart Server"
After the server restarts, your changes should take effect and you'll be using V3 of the Digital New Zealand API. Congratulations!