-
Notifications
You must be signed in to change notification settings - Fork 1
Api
{toc}
For a detailed api docu – install regal and navigate to http://api.localhost/
The regal-api provides a HTTP-based webfriendly interface to the storage system – currently fedora commons. The api works on typed resources that are connected via relationships such as “hasPart”, “isPartOf”. Each node contains data, and metadata. Resources are connected to certain transformation services which provide on-the-fly access to different representations of their data and metadata.
In general the regal-api supports the HTTP-Methods GET,PUT,DELETE, and HEAD on each object part. Clients can create new resources by PUTing a namespaced:UUID and a type to the api. The data and metadata of a resource can be accessed through /data, and /metadata. A GET to the actual resource will result in a 303 redirect to a .rdf, .json, .html, or .regal representation manifested in one of the following mediatypes.
application/rdf+xml
application/json
text/html
The rdf and json representations are read-only and can not be manipulated. They just provide an aggregated view to the resource using OAI-ORE.
Though only a small set of formats is fully supported by Regal, you are free to put any kind of /data or /metadata to a resource. The metadata must be stored as RDF N-Triples.
Every resource has a stable URI and a well defined set of components and operations. All nodes resides at http://{api.host}/resource. A node is identified by an id like http://{host}/resource/example:40fd0608-09b0-4917-80e6-135270cf388e .
Common Pathes:
PUT,GET,DELETE http://{host}/resource/example:123[.regal]
GET,PUT,DELETE http://{host}/resource/example:123/data
GET,PUT,DELETE http://{host}/resource/example:123/metadata
GET,DELETE http://{host}/resource[?type={type}]
GET http://{host}/resource/example:123.rdf|.json|.html
Regal resources must not have a type. But the api provides listings based on types.
Currently used types are:
monograph, journal, volume, webpage, version, file
The following relationships are supported
hasPart, isPartOf
The regal-api requires and uses namespaces. Each object is in a certain namespace. Namespaces are explicitly defined by the client as a colon separated prefix, e.g. edoweb:123.
Regal supports pdf, zip and warc files with additional services, such as fulltext-extraction, technical metadata etc.
Regal reuses a set of rdf-properties and supports metadata transformations to oai_dc and epicur.