Versions Compared

Key

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

...

Return code

Meaning

200

OK, purging 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

TODO POST /objects/{pid} - ingest or create new object

PUT /objects/{pid} - modify object

...

TODO GET /objects/{pid}\objectXML

Datastream Resources

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

Inquires upon all object Datastreams to obtain datastreams contained by a digital object. This returns a set of datastream locations that represent all possible datastreams available in the object.

Wiki Markup
GET /objects/\{pid}/datastreams?\[asOfDateTime]\[format]

Parameter

Format

Meaning

Default

Example

asOfDateTime

yyyy-MM-ddTHH:mm:ss.SSSZ

The datastream list as it looked at the specific 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

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

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>

The asOfDateTime attribute is not present if the parameter was not specified.

The baseURL is the used to create datastream urls, as in baseURL+pid+/+dsId.

Code Block
xml
xml
titleXml schema

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="info:fedora/fedora-system:def/listDatastreams#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="info:fedora/fedora-system:def/listDatastreams#" elementFormDefault="qualified">
	<!-- root element declaration -->
	<xsd:element name="objectDatastreams">
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="objectDatastreamsType"/>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<!-- complex type declarations -->
	<xsd:complexType name="objectDatastreamsType">
		<xsd:sequence>
			<xsd:element name="datastream" type="datastreamType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="pid" type="xsd:string" use="required"/>
		<xsd:attribute name="asOfDateTime" type="xsd:string" use="optional"/>
		<xsd:attribute name="baseURL" type="xsd:string" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="datastreamType">
		<xsd:attribute name="dsid" type="xsd:string" use="required"/>
		<xsd:attribute name="label" type="xsd:string" use="required"/>
		<xsd:attribute name="mimeType" type="xsd:string" use="required"/>
	</xsd:complexType>
</xsd:schema>

TODO GET /objects/{pid}/datastreams/{dsID} - get datastream profile

TODO DELETE /objects/{pid}/datastreams/{dsID} - purge datastream

TODO PUT /objects/{pid}/datastreams/{dsID} - modify datastream

TODO PUT /objects/{pid}/datastreams/{dsID} - modify or create datastream