...
In this I will propose an alternative REST api to the one in the Fedora Documentation. It is made to support CRUD (Create, Retrieve, Update, Delete) workflows more natively than the current Fedora APIs. It is based around the idea that every conceivable url should be gettable, and probably puttable. There should not be big methods with lots of parameters, but rather a bunch of small resources with very clear purpose.
For CRUB CRUD purposes, foxml is not the format of Fedora. Foxml is a very useful and welldesigned storage format, but it is intricate. There will be no ingest or exportToXML methods in this api, as the user should not have to understand foxml. Rather, the Fedora objects is decomposed into resources, available through through URLs.
...
Content | Location |
---|---|
Objects | /objects/ |
Object presentation | /objects/{pid} |
Object properties | /objects/{pid}/properties |
Object relations | /objects/{pid}/relations |
Object content models | /objects/{pid}/contentmodels |
Datastreams | /objects/{pid}/datastreams |
Datastream | /objects/{pid}/datastreams/{dsID} |
Datastream content | /objects/{pid}/datastreams/{dsID}/content |
Datastream properties | /objects/{pid}/datastreams/{dsID}/properties |
Datasteram relations | /objects/{pid}/datastreams/{dsID}/relations |
Datastream versions | /objects/{pid}/datastreams/{dsID}/versions |
Object Methods | /objects/{pid}/methods |
Method invocation | /objects/{pid}/methods/{methodNamesdef}/from/{sdefmethodName}?params |
Create methods
Object resources
...
Datastream resources
Create a new datastream
PUT /objects/\{pid}/datastreams/\{dsID}\[/withControlGroup/\{cg}\] Wiki Markup
Creates a new datastream in the object with controlgroup X or {cg} if specified. Datastream is empty.
...
GET/POST /objects/{pid}/methods/{methodNamesdef}/from/{sdefmethodName}?params
Datastream resources
...
Add cmpid to the list of content model for this object
Add a literal relation
PUT /objects/\{pid}/relations/\{rel-name}/toLiteral/\{value}\[/withType/\{type}\] Wiki Markup
Datastream resources
Update the contents of an Inline Datastream
...
Add a literal relation to the datastream
...
PUT /objects/\{pid}/datastreams/\{dsID}/relations/\{rel-name}/toLiteral/\{value}\[/withType/\{type}\]
Delete methods
Object resources
...