Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Content

Location

search objects

GET/objects

nextPid

POST /objects/nextPid

Object

GET/DELETE/POST/PUT /objects/{pid}

Object Export

GET /objects/{pid}\export

Object Versions

GET /objects/{pid}\versions

Object XML

GET /objects/{pid}\objectXML

Datastreams

GET/objects/{pid}/datastreams

Specific datastream

GET/DELETE/PUT/POST /objects/{pid}/datastreams/{dsID}

content of Datastream

GET/objects/{pid}/datastreams/{dsID}/content

List Methods on Object

GET/objects/{pid}/methods

list methods for sdef on Object

GET/objects/{pid}/methods/{sdef}

get-invoke method

GET/objects/{pid}/methods/{sdef}/{method}

Repository Resources

(warning) GET /objects - search objects

(warning) POST /objects/nextPid - generate pid

...

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(warning)

Example of xml format

Code Block
xml
xml
titleWithout 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>

...

Return code

Meaning

200

OK, Modifying the object, no return body

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

Wrong syntax in request. Exception as body, text/plain

500

Other, unknown error encountered

...

(warning) GET /objects/{pid}\export

GET /objects/{pid}\versions

...

Return code

Meaning

200

OK, Object history in the specified format

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

Wrong syntax in request. Exception as body, text/plain

500

Other, unknown error encountered

Example of html format

TODO(warning)

Example of xml format

Code Block
xml
xml
titleExampe of xml return
<fedoraObjectHistory pid="demo:testObject">
  <!--1 or more repetitions:-->
  <objectChangeDate>2008-09-29T03:49:450Z</objectChangeDate>
  <objectChangeDate>2008-10-29T05:47:000Z</objectChangeDate>
</fedoraObjectHistory>
Code Block
xml
xml
titleXml schema
<?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="fedoraObjectHistory">
		<xs:complexType>		
			<xs:sequence>
				<xs:element name="objectChangeDate" type="xs:string" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="pid" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string"/>
				</xs:simpleType>
			</xs:attribute>				
		</xs:complexType>
	</xs:element>
</xs:schema>

...

(warning) GET /objects/{pid}\objectXML

Datastream Resources

GET /objects/{pid}/datastreams - list datastreams

...

Return code

Meaning

200

OK, Return information in the specified format

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

Wrong syntax in request. Exception as body, text/plain

500

Other, unknown error encountered

Example of html format

TODO(warning)

Example of xml format

Code Block
xml
xml
titleExampe of xml return
<objectDatastreams pid="demo:testObject" 
                   asOfDateTime="2009-01-01T03:00:00:000Z" 
                   baseURL="http://localhost:8080/fedora/" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.fedora.info/definitions/1/0/access/ 
                      http://localhost:8080/fedora/listDatastreams.xsd">
  <!--Zero or more repetitions:-->
  <datastream dsid="DC" label="" mimeType="text/xml"/>
</objectDatastreams>

...

Return code

Meaning

200

OK, Return information in the specified format

404

Object or datastream 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

Wrong syntax in request. Exception as body, text/plain

500

Other, unknown error encountered

Example of html format

TODO(warning)

Example of xml format

Code Block
xml
xml
<datastreamProfile 
  xsi:schemaLocation="http://www.fedora.info/definitions/1/0/management/ 
                      http://localhost:8080/datastreamProfile.xsd"
  pid="changeme:1" 
  dsID="DC"
  datetime="2009-11-26T15:31:40.099Z">
    <dsLabel>Dublin Core Record for this object</dsLabel>
    <dsVersionID>DC1.0</dsVersionID>
    <dsCreateDate>2009-11-26T15:31:40.099Z</dsCreateDate>
    <dsState>A</dsState>
    <dsMIME>text/xml</dsMIME>
    <dsFormatURI>http://www.openarchives.org/OAI/2.0/oai_dc/</dsFormatURI>
    <dsControlGroup>X</dsControlGroup>
    <dsSize>339</dsSize>
    <dsVersionable>true</dsVersionable>
    <dsInfoType/>
    <dsLocation>changeme:1+DC+DC1.0</dsLocation>
    <dsLocationType/>
    <dsChecksumType>DISABLED</dsChecksumType>
    <dsChecksum>none</dsChecksum>
</datastreamProfile>

...