Bitstorage API

To add files to DOMS, three things will need to happen:

Uploading the file to bitstorage must be done with the following API:

(WORK IN PROGRESS! WE NEED TO WRAP THIS IN A WEBSERVICE!)

The interface is command line based, and the client must have ssh access to halley.statsbiblioteket.dk.

The interface is as follows $ ssh doms@halley <<command>> <<filename>>

Commands are one of

        save-md5) : save a file and get md5sum back
        get-md5) : get md5sum of a file
        approve) : approve a file
        delete) : delete a file not appoved
        get) : get a file
        getmd5s) : report md5 sums of stored files
        space-left) : report space left

Files are exchanged using stdin and stdout. Errors are reported to stderr.

To upload a file, use save-md5, and check that the checksum is as expected. Otherwise delete and retry.

Once all Fedora objects referring to the file are validated, use approve to publish the file.

Preferrably, use space-left first as sanity check.

Examples

Adding a file to a fedora metadata object: