Alternative REST APIIn this I will propose an alternative REST api to the one in the Fedora Documentation. General principles
Object-Centric methodsCreate new object with given pidPUT /objects/{pid} Return: Nothing or pid of the new object Creates a new, empty object Create new object with autogenerated pidPOST /objects/ Return: pid of the new object (/objects/demo:newObject2) Creates a new, empty object Present ObjectGET /objects/{pid} Return: XML that presents the object.... Undetailed Purge objectDELETE /objects/{pid} Get the object propertiesGET /objects/{pid}/properties Provides a list of property names that can be queried Get a specific object propertyGET /objects/{pid}/properties/{property} Give the value of the specific property, or 404 if property not found Example: /objects/demo:myPid2/properties/label Write a specific propertyPUT /objects/{pid}/properties/{property} Get content models for a objectGET /objects/{pid}/contentmodels Get a list of the content models of this object Add a content model to this objectPUT /objects/{pid}/contentmodels/{cmpid} Add cmpid to the list of content model for this object Get all the relations of an objectGET /objects/{pid}/relations Get a specific relation from an objectGET /objects/{pid}/relations/{rel-name} Add a relation to an objectPUT /objects/{pid}/relations/{rel-name}/to/{objpid} Purge a relation to an objectDELETE /objects/{pid}/relations/{rel-name}/to/{objpid} Add a literal relationPUT /objects/{pid}/relations/{rel-name}/toLiteral/{value}[/withType/{type}] Delete a literal relationPUT /objects/{pid}/relations/{rel-name}/toLiteral/{value} Datastream-Centric methodsMethod-Centric methods |