...
Repository Resources
Object Resources
GET /objects/{pid} - get ObjectProfile
Wiki Markup |
---|
GET /objects/\{pid}?\[asOfDateTime\]\[format\] |
Parameter | Format | Meaning | Default | Example |
---|---|---|---|---|
asOfDateTime | yyyy-MM-ddTHH:mm:ss.SSSZ | The object, as it looked at the specified time | Now | 2009-01-01T03:00:00:000Z |
format | one of text/xml, text/html, html, xml | The format of the return value | text/html | text/xml |
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.
Return code | Meaning |
---|---|
200 | OK, returning the object profile as body, see below |
404 | Object not found in repository. Body is exception as text/plain |
401 | Unauthorized, the security policy forbade this operation with the supplied user credentials. Body as exception as text/plain |
400 | |
500 |
- ObjectProfile Contains these fields
- String pid The pid of the object
- String objLabel The label of the object
- String objOwnerID The ownerID of the object
- String[] objModels The pids of the content models of the object
- String objCreateDate The creation date
- String objLastModDate The last modification time
- String objDissIndexViewURL The REST url for the Dissemination index, as known from the built in search service
- String objItemIndexViewURL The REST url for the Datastream index, as known from the built in search service
- String objState The object state, either A (active), I (inactive) or D (deleted)
Examples:
Get the object profile of the object as it looked at the specified date in the xml format
GET /objects/{pid}?asOfDateTime=2009-01-01T03:00:00:000Z&format=text/xml
Example of html format
TODO
Example of xml format
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<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>
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<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>
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?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} - purgeObject
Wiki Markup |
---|
GET /objects/\{pid}?\[asOfDateTime\]\[format\] |
Parameter | Format | Meaning | Default | Example |
---|---|---|---|---|
asOfDateTime | yyyy-MM-ddTHH:mm:ss.SSSZ | The object, as it looked at the specified time | Now | 2009-01-01T03:00:00:000Z |
format | one of text/xml, text/html, html, xml | The format of the return value | text/html | text/xml |
...
Examples:
Get the object profile of the object as it looked at the specified date in the xml format
GET /objects/{pid}?asOfDateTime=2009-01-01T03:00:00:000Z&format=text/xml
Example of html format
TODO
Example of xml format
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<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> |
...