Get metadata API


Availability: From version 1
Method: GET


The get metadata for a specific record call returns the available metadata for a requested item.

URL format

http://api.digitalnz.org/records/[version]/[record_id].[response_format]?[request-parameters]

Request parameters

The following must be specified as request parameters:

e.g. http://api.digitalnz.org/records/v1/34522.xml? api_key=your_api_key

Record ID

Record IDs are identified in the metadata_url field of a results set. 34522 is an example record ID.

e.g. http://api.digitalnz.org/records/v1/34522.xml? api_key=your_api_key

Response format

Appending an extension to a resource tells the API to use the requested format. Valid extensions are xml, json, rss.

You can also specify the format in the Accept header of the HTTP request, e.g. Accept: application/json in a request to http://api.digitalnz.org/records/v1/ tells the API to use JSON format. Valid Accept headers include application/json, application/js, application/xml, application/rss+xml

e.g. http://api.digitalnz.org/records/v1/34522.xml?api_key=your_api_key e.g. http://api.digitalnz.org/records/v1/34522.json?api_key=your_api_key

Response elements

The returned metadata is provided in an XML wrapper in METS format. Its structure may vary across content providers, depending on their choice of mark-up. However, all records will have the following fields:

  • dc:title - the title of the item, or a brief description if no title exists.
  • dnz:category - the high-level DigitalNZ category(s) that the item belongs to.
  • dnz:content_partner - the organisation who provided the item
  • dnz:landing_url - the preferred URL for linking to the item.
  • dnz:thumbnail_url - the URL of a thumbnail of the item (required for Images, optional for other categories).