Chapter 6. Delivering Data Downstream: The Data Access Service (DAS)

Making records and associated digital objects catalogued with MetaToo available outside of MetaToo is done via communication through the Data Access Service, or DAS.

A client program can use DAS as a web service for retrieving records as well as for registering back informations for records and their associated digital objects.

Note: by default, this service is only accessible from localhost, if you wish to grant external access, add auth.ip to the configuration file with a space separated list of IP addresses: e.g. das.ip 127.0.0.1 192.168.1.2

This chapter describes the communication.

6.1. REST based DAS API for Retrieving Records

The DAS is called for record retrieval as http://yourserver/cgi-bin/yourapp_das?key=val&...&key=val, where the possible keys (and their values) are described below.

6.1.1. Search related

id

a single record ID or a comma separated list of record IDs.

status

a comma separated list record status

timestamp

either a unix timestamp (seconds since EPOCH) or a timestamp in the format YYYYMMDDHHMMSS or 1957-03-20T20:30:00.

type

a comma separated list of record type

where

an abitrary where clause which can be used to select records based, at this time, on the id, udate, cdate, status, grp, uid and type.

6.1.2. Format related

format

if set to 'short', the record XML is not returned

gzip

if equal to 1, the result will be compressed with gzip

pad

if equal to 1, the XML returned will be indented

raw

if equal to 1, the records returned will be extractly like in the database and will not include, among other things, authority text mapping

6.1.3. Others

firstRecord

the number of the first record to be returned, starting from 1 (default: 1).

key

the authentication key, which must match configuration option das.key, if it is defined

maxRecords

the maximum number of records returned (default: 100000).

6.1.4. Changes done to database records

The following changes are done to the database record when not using the raw argument:

Adding of fit namespace to admin fields

All fields and attributes under /<root>/admin are modified to use the fit namespace.

Change update timestamps

All Unix timestamps under //admin/cataloguer/timestamp are changed to ISO8601 dates in local time without timezone.

Adding release dates

The first date of cataloguer publication under a new status is added as admin/released, with the attribute status giving the status code and the body being an ISO8601 date as described above.

Change of authority attribute to fit namespace

All attributes with the name authority or authority_* are moved to the fit namespace.

Modifications done through the export configuration in Metatoo

Metatoo can be configured to modified records upon export. If you have a file 'export.cat_doc.xml' in your application xml directory, changes defined in the file will be applied to your record in DAS.