REST API docsGeneral principles
Repository ResourcesObject ResourcesGET /objects/{pid} - get object profileGET /objects/{pid}?[asOfDateTime][format]
Profile of an object, which includes key metadata fields and URLs for the object Dissemination Index and the object Item Index. Can be thought of as a default view of the object.
Examples: Example of html formatTODO Example of xml formatWithout asOfDateTime set <objectProfile pid="demo:testObject"> <objLabel>label</objLabel> <objOwnerId>fedoraAdmin</objOwnerId> <objModels> <model>info:fedora/demo:ContentModel</model> </objModels> <objCreateDate>2008-09-29T03:49:450Z</objCreateDate> <objLastModDate>2014-09-19T01:18:330Z</objLastModDate> <objDissIndexViewURL>http://localhost:8080/fedora/get/demo:testObject/fedora-system:3/viewMethodIndex</objDissIndexViewURL> <objItemIndexViewURL>http://localhost:8080/fedora/get/demo:testObject/fedora-system:3/viewItemIndex</objItemIndexViewURL> <objState>A</objState> </objectProfile> With asOfDateTime set <objectProfile pid="demo:testObject" datetime="2008-09-29T03:49:450Z"> <objLabel>label</objLabel> <objOwnerId>fedoraAdmin</objOwnerId> <objModels> <model>info:fedora/demo:ContentModel</model> </objModels> <objCreateDate>2008-09-29T03:49:450Z</objCreateDate> <objLastModDate>2014-09-19T01:18:330Z</objLastModDate> <objDissIndexViewURL>http://localhost:8080/fedora/get/demo:testObject/fedora-system:3/viewMethodIndex/2008-09-29T03:49:450Z</objDissIndexViewURL> <objItemIndexViewURL>http://localhost:8080/fedora/get/demo:testObject/fedora-system:3/viewItemIndex/2008-09-29T03:49:450Z</objItemIndexViewURL> <objState>A</objState> </objectProfile> Schema for XML return value <?xml version="1.0" encoding="UTF-8"?> <!--W3C Schema generated by XMLSPY v2004 rel. 2 U (http://www.xmlspy.com)--> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="objectProfile"> <xs:complexType> <xs:sequence> <xs:element ref="objLabel" /> <xs:element ref="objOwnerId" /> <xs:element ref="objModels" /> <xs:element ref="objCreateDate" /> <xs:element ref="objLastModDate" /> <xs:element ref="objDissIndexViewURL" /> <xs:element ref="objItemIndexViewURL" /> <xs:element ref="objState" /> </xs:sequence> <xs:attribute name="pid" use="required"> <xs:simpleType> <xs:restriction base="xs:string" /> </xs:simpleType> </xs:attribute> <xs:attribute name="datetime" use="optional"> <xs:simpleType> <xs:restriction base="xs:dateTime" /> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="objCreateDate"> <xs:simpleType> <xs:restriction base="xs:dateTime" /> </xs:simpleType> </xs:element> <xs:element name="objDissIndexViewURL"> <xs:simpleType> <xs:restriction base="xs:anyURI" /> </xs:simpleType> </xs:element> <xs:element name="objItemIndexViewURL"> <xs:simpleType> <xs:restriction base="xs:anyURI" /> </xs:simpleType> </xs:element> <xs:element name="objLabel"> <xs:simpleType> <xs:restriction base="xs:string" /> </xs:simpleType> </xs:element> <xs:element name="objOwnerId"> <xs:simpleType> <xs:restriction base="xs:string" /> </xs:simpleType> </xs:element> <xs:element name="objModels"> <xs:complexType> <xs:sequence> <xs:element name="model" minOccurs="0" maxOccurs="unbounded" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="objLastModDate"> <xs:simpleType> <xs:restriction base="xs:dateTime" /> </xs:simpleType> </xs:element> <xs:element name="objState"> <xs:simpleType> <xs:restriction base="xs:string" /> </xs:simpleType> </xs:element> </xs:schema> DELETE /objects/{pid} - purge objectDELETE /objects/{pid}?[logMessage][force]
Permanently removes an object from the repository.
POST /objects/{pid} - ingest or create new objectPUT /objects/{pid} - modify objectPUT /objects/{pid}?[label][logMessage][ownerId][state]
GET /objects/{pid}\exportGET /objects/{pid}\versionsGET /objects/{pid}\objectXMLDatastream Resources2. Method Resources Create methodsObject resourcesCreate 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 Datastream resourcesCreate a new datastreamPUT /objects/{pid}/datastreams/{dsID}[/withControlGroup/{cg}] Creates a new datastream in the object with controlgroup X or {cg} if specified. Datastream is empty. Retrieve methodsObject resourcesPresent ObjectGET /objects/{pid} Return: XML that presents the object.... Undetailed 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 Get content models for a objectGET /objects/{pid}/contentmodels Get a list of the content models of this object Get all the relations of an objectGET /objects/{pid}/relations Get a specific relation from an objectGET /objects/{pid}/relations/{rel-name} List the methods on an objectGET /objects/{pid}/methods Invoke a method on an objectGET/POST /objects/{pid}/methods/{sdef}/{methodName}?params Datastream resourcesGet Contents of a datastreamGET /objects/{pid}/datastreams/{dsID} Get the properties of a datastreamGET /objects/{pid}/datastreams/{dsID}/properties Get a specific property of a datastreamGET /objects/{pid}/datastreams/{dsID}/properties/{prop} Get the relations of the datastreamGET /objects/{pid}/datastreams/{dsID}/relations The RELS-INT block "about" this datastream Get version timestamps of a datastreamThe idea is that the old version of the datastream should support the same getter methods as the current version GET /objects/{pid}/datastreams/{dsID}/versions Get the contents of a specific version of a datastreamGET /objects/{pid}/datastreams/{dsID}/versions/{timestamp}/contents Get the versioned properties of a specific versionGET /objects/{pid}/datastreams/{dsID}/versions/{timestamp}/properties Get a specific versioned property of a specific versionGET /objects/{pid}/datastreams/{dsID}/versions/{timestamp}/properties/{propertyname} Get the relations of a specific versionGET /objects/{pid}/datastreams/{dsID}/versions/{timestamp}/relations/ Update methodsObject resourcesWrite a specific propertyPUT /objects/{pid}/properties/{property} Add a relation to an objectPUT /objects/{pid}/relations/{rel-name}/to/{objpid} Add a content model to this objectPUT /objects/{pid}/contentmodels/{cmpid} Add cmpid to the list of content model for this object Add a literal relationPUT /objects/{pid}/relations/{rel-name}/toLiteral/{value}[/withType/{type}] Datastream resourcesUpdate the contents of an Inline DatastreamPOST /objects/{pid}/datastreams/{dsID}/contents Update a datastream propertyPUT /objects/{pid}/datastreams/{dsID}/properties/{prop} examples: versionable, state and so on. Update an External, managed or Redirect DatastreamContentlocation is just a property of these datastreams PUT /objects/{pid}/datastreams/{dsID}/properties/contentLocation Add a relation to the datastreamPUT /objects/{pid}/datastreams/{dsID}/relations/{rel-name}/to/{objPid} Add a literal relation to the datastreamPUT /objects/{pid}/datastreams/{dsID}/relations/{rel-name}/toLiteral/{value}[/withType/{type}] Delete methodsObject resourcesPurge objectDELETE /objects/{pid} Remove a content model from this objectDELETE /objects/{pid}/contentmodels/{cmpid} Remove cmpid from the list of content models for this object Purge a relation to an objectDELETE /objects/{pid}/relations/{rel-name}/to/{objpid} Delete a literal relationDELETE /objects/{pid}/relations/{rel-name}/toLiteral/{value} Datastream resourcesDelete a datastreamDELETE /objects/{pid}/datastreams/{dsID} Purge the datastream from the object from the repository Purge a relation from the datastreamDELETE /objects/{pid}/datastreams/{dsID}/relations/{rel-name}/to/{objPid} Purge a literal relation from a datastreamDELETE /objects/{pid}/datastreams/{dsID}/relations/{rel-name}/toLiteral/{value} |