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

REST API

escowles edited this page Jan 2, 2013 · 12 revisions

DAMS 4 REST API Implementation

Status Method URI Pattern Name Parameters Response Codes Notes
Working GET /objects/bb1234567x objectShow ts, format=nt/xml 200, 400, 404, 500 Non-recursive metadata retrieval. Need to implement same-predicates retrieval mode.
Working GET /objects/bb1234567x/export objectShow ts, format=nt/xml 200, 400, 404, 500 Recursive metadata retrieval.
Working GET /objects/bb1234567x/exists objectExists ts, format=html/json/xml 200, 404, 500 Check whether there are any triples describing an object.
Working GET /objects/bb1234567x/files objectListFiles format=html/json/xml 200, 404, 500 Get a list of all files attached to this object.
Working GET /objects/bb1234567x/transform objectTransform xsl, ts, recursive 200, 400, 404, 500 Read-only object transform.
Working GET /files/bb1234567x/1.tif
/files/bb1234567x/1/2.tif
fileShow fs, download, name
Retrieve files (third-party FileStoreServlet with local modifications).
Working GET /files/bb1234567x/1.tif/exists
/files/bb1234567x/1/2.tif/exists
fileExists fs, format=html/json/xml 200, 404, 500 Check whether a file exists.
Working GET /client/info clientInfo 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 POST /next_id identifierCreate name, count, format=html/json/xml 200, 500 Generate an identifier.
Working POST /files/bb1234567x/1.tif
/files/bb1234567x/1/2.tif
fileUpload fs, ts, format=html/json/xml, FILE 200, 201, 400, 500 Upload a new file.
FILE = uploaded data file
Working POST /objects/bb1234567x objectCreate 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/bb1234567x objectUpdate 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 PUT /objects/bb1234567x/1.tif
/objects/bb1234567x/1/2.tif
fileUpload fs, ts, FILE 200, 400, 403, 500, 502 Upload a modified/replacement file.
FILE = uploaded data file
Working DELETE /objects/bb1234567x objectDelete ts, format=html/json/xml 200, 400, 500 Delete an object.
Working DELETE /files/bb1234567x/1.tif
/files/bb1234567x/1/2.tif
fileDelete fs, ts, format=html/json/xml 200, 400, 403, 500 Delete a file.
Working GET /index indexSearch fs, format=curator/grid, xsl, profile, v.template, SOLR 200, 500 Search the Solr index.
SOLR = standard Solr options
Working POST /index indexUpdate id*, fs, ts, format=html/json/xml 200, 400, 500 Bulk index objects in Solr.
id* = multiple id values for bulk indexing
Working POST /objects/bb1234567x/index indexUpdate ts, format=html/json/xml 200, 400, 500 Index a single object in Solr.
Working DELETE /objects/bb1234567x/index indexDelete ts, format=html/json/xml 200, 400, 500 Delete a single object in Solr.
Working DELETE /index indexDelete id*, ts, format=html/json/xml 200, 400, 500 Bulk delete objects in Solr.
id* = multiple id values for bulk deletion
Working GET /repositories repositoryListAll ts, format=html/json/xml 200, 500 List all repository records.
Working GET /repositories/bb1234567x repositoryListObjects ts, format=html/json/xml 200, 404, 500 List all objects in a repository.
Working GET /repositories/bb1234567x/count repositoryCount ts, format=html/json/xml 200, 404, 500 Count the number of objects in a repository.
Not Implemented GET /respositories/bb1234567x/embargo repositoryEmbargo

List all objects with embargo dates set.
Working GET /respositories/bb1234567x/files repositoryFiles ts, format=html/json/xml 200, 404, 500 List all files associated with all objects in a repository.
Working GET /collections collectionListAll ts, format=html/json/xml 200, 500 List all collection records.
Working GET /collections/bb1234567x collectionListObjects ts, format=html/json/xml 200, 404, 500 List all objects in a collection.
Working GET /collections/bb1234567x/count collectionCount ts, format=html/json/xml 200, 404, 500 Count the number of objects in a collection.
Not Implemented GET /collections/bb1234567x/embargo collectionEmbargo

List all objects with embargo dates set.
Working GET /collections/bb1234567x/files collectionFiles ts, format=html/json/xml 200, 404, 500 List all files associated with all objects in a collection.
Working POST /objects/bb1234567x/transform objectTransform 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.
Working GET /system/info systemInfo format=html/json/xml 200, 500 Display configuration parameters.
Working GET /system/filestores list format=html/json/xml 200, 500 List configured filestores.
Working GET /system/predicates predicateList 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 list format=html/json/xml 200, 500 List configured triplestores.
Not Implemented GET /objects/bb1234567x/validate objectValidate

Validate object metadata and consistency with filestore.
Working GET /files/bb1234567x/1.tif/fixity
/files/bb1234567x/1/2.tif/fixity
fileFixity

Check file against checksums.
Working POST /files/bb1234567x/1.tif/characterize
/files/bb1234567x/1/2.tif/characterize
fileCharacterize fs, ts
Extract technical metadata from a file and save it to the triplestore.
Working GET /files/bb1234567x/1.tif/characterize
/files/bb1234567x/1/2.tif/characterize
fileCharacterize fs
Extract technical metadata from a file and display it.
Working POST /files/bb1234567x/1.tif/derivatives
/files/bb1234567x/1/2.tif/derivatives
fileDerivatives

Generate derivatives from a file.
Not Implemented GET /client/authorize clientAuthorize

Check client authorization.
Probably handled at container level

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
Not Implemented GET /objects/oid/export Object metadata, with links
Not Implemented GET /objects/oid/objectXML Object metadata
Not Implemented GET /objects/oid/validate Validate object (checksums?)
Not Implemented GET /objects/oid/versions List versions
Working GET /objects/oid/datastreams List files
Working GET /objects/oid/datastreams/fid File metadata
Not Implemented GET /objects/oid/datastreams/fid/history File history
Working GET /objects/oid/datastreams/fid/content Download file
Not Implemented GET /objects/oid/datastreams/fid/relationships Relationship metadata
Working POST /objects/nextPID Create new identifier
Working POST /objects/oid Create new object
Working POST /objects/oid/datastreams/fid Create new file
Not Implemented POST /objects/oid/relationships/new Create new relationship
Working PUT /objects/oid Update object metadata
Working PUT /objects/oid/datastreams/fid Update file
Working DELETE /objects/oid Delete object
Working DELETE /objects/oid/datastreams/fid Delete file
Not Implemented DELETE /objects/oid/relationships Delete relationship

Clone this wiki locally