Skip to content
This repository has been archived by the owner on Mar 20, 2020. It is now read-only.

REST API

Esmé Cowles edited this page Oct 9, 2013 · 12 revisions

DAMS 4 REST API Implementation

See also sample responses

Status Method REST URI Parameters Response Codes Description
Not Implemented GET /client/authorize

Check client authorization.
Probably handled at container level
Working GET /client/info ip, user, format=html/json/xml 200, 500 Get client information only available server-side, such as userid and IP address. If ip and user parameters are not specified, they are taken from the request.
Working GET /collections ts, format=html/json/xml 200, 500 List all collection records.
Working GET /collections/oid ts, format=html/json/xml 200, 404, 500 List all objects in a collection.
Working GET /collections/oid/count ts, format=html/json/xml 200, 404, 500 Count the number of objects in a collection.
Not Implemented GET /collections/oid/embargo

List all objects with embargo dates set.
Working GET /collections/oid/files ts, format=html/json/xml 200, 404, 500 List all files associated with all objects in a collection.
Working GET /events es, format=html/json/xml 200, 500 List all events in the triplestore.
Working GET /events/oid es, format=nt/rdf 200, 400, 404, 500 Retrieve an event record.
Working GET /files/oid/fid/characterize
/files/oid/cid/fid/characterize
fs
Extract technical metadata from a file and display it.
Working POST /files/oid/fid/characterize
/files/oid/cid/fid/characterize
fs, ts
Extract technical metadata from a file and save it to the triplestore.
Working PUT /files/oid/fid/characterize
/files/oid/cid/fid/characterize
fs, ts
Replace existing technical metadata.
Working POST /files/oid/fid/derivatives
/files/oid/cid/fid/derivatives


Generate derivatives from a file.
Working PUT /files/oid/fid/derivatives
/files/oid/cid/fid/derivatives


Regenerate derivatives from a file.
Working GET /files/oid/fid/exists
/files/oid/cid/fid/exists
fs, format=html/json/xml 200, 404, 500 Check whether a file exists.
Working GET /files/oid/fid/fixity
/files/oid/cid/fid/fixity


Check file against checksums.
Working GET /files/oid/fid
/files/oid/cid/fid
fs, download, name
Retrieve files (third-party FileStoreServlet with local modifications).
Working POST /files/oid/fid
/files/oid/cid/fid
fs, ts, format=html/json/xml, FILE, local, srcfs 200, 201, 400, 500 Upload a new file.
FILE = uploaded data file
local = path of locally-staged file to use instead of HTTP upload
srcfs = name of a FileStore to copy the file from instead of using HTTP upload
Working PUT /files/oid/fid
/files/oid/cid/fid
fs, ts, FILE 200, 400, 403, 500, 502 Upload a modified/replacement file.
FILE = uploaded data file
Working DELETE /files/oid/fid
/files/oid/cid/fid
fs, ts, format=html/json/xml 200, 400, 403, 500 Delete a file.
Working GET /index fs, format=curator/grid, xsl, profile, v.template, SOLR 200, 500 Search the Solr index.
SOLR = standard Solr options
Working POST /index id*, fs, ts, format=html/json/xml 200, 400, 500 Bulk index objects in Solr.
id* = multiple id values for bulk indexing
Working DELETE /index id*, ts, format=html/json/xml 200, 400, 500 Bulk delete objects in Solr.
id* = multiple id values for bulk deletion
Working POST /next_id name, count, format=html/json/xml 200, 500 Generate an identifier.
Working GET /objects ts, format=html/json/xml 200, 500 List all objects in the triplestore
Working GET /objects/oid ts, format=nt/xml 200, 400, 404, 500 Non-recursive metadata retrieval. Need to implement same-predicates retrieval mode.
Working POST /objects/oid ts, adds, format=html/json/xm, FILE 200, 201, 400, 403, 500 Upload metadata for a new object.
FILE = uploaded metadata (not implemented)
Working PUT /objects/oid ts, adds, updates, delete, format=html/json/xml, mode=all, FILE 200, 400, 403, 500 Upload metadata to update an existing object.
FILE = uploaded metadata – entire object replacement mode implemented, need to implement same-predicates replacement mode.
Working DELETE /objects/oid ts, format=html/json/xml 200, 400, 500 Delete an object.
Working GET /objects/oid/exists ts, format=html/json/xml 200, 404, 500 Check whether there are any triples describing an object.
Working GET /objects/oid/export ts, format=nt/xml 200, 400, 404, 500 Recursive metadata retrieval.
Working GET /objects/oid/files format=html/json/xml 200, 404, 500 Get a list of all files attached to this object.
Working POST /objects/oid/index ts, format=html/json/xml 200, 400, 500 Index a single object in Solr.
Working DELETE /objects/oid/index ts, format=html/json/xml 200, 400, 500 Delete a single object in Solr.
Working DELETE /objects/oid/selective
/objects/oid/cid/selective
predicate*, ts, format=html/json/xml 200, 400, 500 Selectively delete portions of an object or component record.
id* = multiple predicate names to delete.
Working GET /objects/oid/transform xsl, ts, recursive 200, 400, 404, 500 Read-only object transform.
Working POST /objects/oid/transform xsl, dest, ts, fs, recursive 200, 400, 404, 500 Read-write object metadata transform.
If dest is specified, the output will be saved under that fileid.
Not Implemented GET /objects/oid/validate

Validate object metadata and consistency with filestore.
Working POST /queue id*, ts, format=html/json/xml 200, 400, 500 Bulk add objects to ActiveMQ queue to be updated by DAMS Solrizer.
id* = multiple id values for bulk indexing
Working DELETE /queue id*, ts, format=html/json/xml 200, 400, 500 Bulk add objects to ActiveMQ queue to be deleted by DAMS Solrizer.
id* = multiple id values for bulk deletion
Working GET /system/config format=html/json/xml 200, 500 Reload system configuration. (Doesn't work for Fedora API).
Working GET /system/filestores format=html/json/xml 200, 500 List configured filestores.
Working GET /system/info format=html/json/xml 200, 500 Display configuration parameters.
Working GET /system/predicates format=html/json/xml 200, 500 List configured predicates.
Do we need this with automatic ns translation? Everything should be using names only.
Working GET /system/triplestores format=html/json/xml 200, 500 List configured triplestores.
Working GET /system/version format=html/json/xml 200, 500 Display repository version.
Working GET /units ts, format=html/json/xml 200, 500 List all repository records.
Working GET /units/oid ts, format=html/json/xml 200, 404, 500 List all objects in a repository.
Working GET /units/oid/count ts, format=html/json/xml 200, 404, 500 Count the number of objects in a repository.
Not Implemented GET /units/oid/embargo

List all objects with embargo dates set.
Working GET /units/oid/files ts, format=html/json/xml 200, 404, 500 List all files associated with all objects in a repository.


xxxxxxxxxxxxxxxxxxxxxxxxxx


Status Codes

Code Description Notes
200 OK Success, object/file exists
201 Created File/object created successfully
400 Bad Request Missing required parameters, not multipart request
403 Forbidden Deleting non-existing file, using POST to update or PUT to create
404 Not Found Object/file does not exist
500 Internal Error Other errors
502 Unavailable Too many uploads

Fedora REST API

Status Method REST URI Description
Working GET /describe Describe repository
Not Implemented GET /objects Basic search
Working GET /objects/oid Object profile
Working POST /objects/oid Create new object
Working PUT /objects/oid Update object metadata
Working DELETE /objects/oid Delete object
Working GET /objects/oid/datastreams List files
Working GET /objects/oid/datastreams/fid File metadata
Working POST /objects/oid/datastreams/fid Create new file
Working PUT /objects/oid/datastreams/fid Update file
Working DELETE /objects/oid/datastreams/fid Delete file
Working GET /objects/oid/datastreams/fid/content Download file
Not Implemented GET /objects/oid/datastreams/fid/history File history
Not Implemented GET /objects/oid/datastreams/fid/relationships Relationship metadata
Not Implemented GET /objects/oid/export Object metadata, with links
Not Implemented GET /objects/oid/objectXML Object metadata
Not Implemented DELETE /objects/oid/relationships Delete relationship
Not Implemented POST /objects/oid/relationships/new Create new relationship
Not Implemented GET /objects/oid/validate Validate object (checksums?)
Not Implemented GET /objects/oid/versions List versions
Working POST /objects/nextPID Create new identifier
Working GET /system/config Extension to reload configuration files and recompile XSL stylesheets
Clone this wiki locally