Topic: Update your Digital New Zealand search source!

Topic type:

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

  1. login as a tech administrator to your Kete site
  2. scroll down on any page to the Administrator's Toolbox
  3. click search sources from the list of links in the toolbox
  4. click Edit from the "Results via Digital NZ" row in the table
  5. under base url, you will find a value like this:

    http://api.digitalnz.org/records/v1.rss/?api_key=your_api_key&search_text=
    

    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)

  6. 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="):

    http://api.digitalnz.org/v3/records.rss?api_key=your_api_key&text=

    Here's an example that will skip results from Kete Horowhenua (as our local search on Kete Howhenua covers them already):

    http://api.digitalnz.org/v3/records.rss?api_key=your_api_key&without[content_partner][]=Kete+Horowhenua&text=
  7. 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):

    http://www.digitalnz.org/records?text=
  8. click update
  9. now scroll down to the Administrator's Toolbox again
  10. click reconfigure site
  11. 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!

Discuss This Topic

There are 0 comments in this discussion.

join this discussion