Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h1. REST API docs

...

Table of Contents

General principles

...

Content

...

Location

...

search objects

...

GET/objects

...

nextPid

...

POST /objects/nextPid

...

Object

...



{toc}

h2. General principles


|| Content \\ | Location \\ ||
| search objects \\ | GET/objects \\ |
| nextPid \\ | POST /objects/nextPid \\ |
| Object \\ | GET/DELETE/POST/PUT /objects/\{pid}

...

Object Export

...

 \\ |
| Object Export \\ | GET /objects/\{pid}\export

...

Object Versions

...

 \\ |
| Object Versions \\ | GET /objects/\{pid}\versions

...

Object XML

...

 \\ |
| Object XML \\ | GET /objects/\{pid}\objectXML

...

Datastreams

 \\ |
| Datastreams \\ | GET/objects/\{pid}/datastreams

...

Specific datastream

 \\ |
| Specific datastream \\ | GET/DELETE/PUT/POST /objects/\{pid}/datastreams/\{dsID}

...

content of Datastream

 \\ |
| content of Datastream \\ | GET/objects/\{pid}/datastreams/\{dsID}/content

...

List Methods on Object

 \\ |
| List Methods on Object\\ | GET/objects/\{pid}/methods

...

list methods for sdef on Object

 \\ |
| list methods for sdef on Object \\ | GET/objects/\{pid}/methods/\{sdef}

...

 \\ |
| get-invoke

...

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

...

Repository Resources

Object Resources

...

 \\ |

h2. Repository Resources

h2. Object Resources

h3. GET /objects/\{pid} - get object

...

 profile

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

...

Parameter

...

Format

...

Meaning

...

Default

...

Example

...

asOfDateTime



|| Parameter \\ || Format \\ || Meaning \\ || Default \\ || Example \\ ||
| asOfDateTime \\ | yyyy-MM-ddTHH:mm:ss.SSSZ

...

 \\ | The object, as it looked at the specified

...

Now

 time \\ | Now \\ | 2009-01-01T03:00:00:000Z

...

format

...

 \\ |
| format \\ | one of text/xml, text/html, html,

...

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

Wrong syntax in request, most likely from format or asOfDateTime. Exception as body, text/plain

500

Other, unknown error encountered

  • 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)

...

 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 \\ | Wrong syntax in request, most likely from format or asOfDateTime. Exception as body, text/plain \\ |
| 500 \\ | Other, unknown error encountered \\ |

*  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
xmlxml
titleWithout asOfDateTime set




h4. Example of html format
TODO


h4. Example of xml format

{code:xml|title=Without 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>
Code Block
xmlxml
titleWith asOfDateTime set

{code}

{code:xml|title=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>
Code Block
xmlxml
titleSchema for XML return value

{code}


{code:xml|title=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>

...

{code}




h3. DELETE /objects/\{pid} - purge

...

 object

DELETE /objects/\{pid}?\[logMessage\]\[force\]

...

Parameter

Format

Meaning

Default

Example

logMessage

String

The message to store in the log, about the purge

Empty string

"Deleted this object because it was not used anymore"

force

one of true, false

Force the purge, even it it breaks a data contract. If set to true, the request will fail, a general exception will be thrown and the return code will be 500

false

false

Permanently removes an object from the repository.

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

...



|| Parameter \\ || Format \\ || Meaning \\ || Default \\ || Example \\ ||
| logMessage \\ | String \\ | The message to store in the log, about the purge \\ | Empty string \\ | "Deleted this object because it was not used anymore" \\ |
| force \\ | one of true, false \\ | Force the purge, even it it breaks a data contract. If set to true, the request will fail, a general exception will be thrown and the return code will be 500  \\ | false \\ | false \\ |

Permanently removes an object from the repository.

|| 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 \\ |

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

h3. PUT /objects/\{pid} - modify object

PUT /objects/\{pid}?\[label]\[logMessage]\[ownerId]\[state]

...



Modify an object. Modifies only the object level properties, ie. label, ownerId and state.

...

Parameter

Format

Meaning

Default

Example

label

String

The new object label

no change

"My object"

logMessage

String

The message to store in the log, about the purge

Empty string

"Deleted this object because it was not used anymore"

ownerID

String

The new owner id

no change

"FedoraAdmin"

state

String, one of A (active), I (inactive) or D (deleted)

The new object state. Note that if you do not set this parameter, the default value will set the object to Active

A

D

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

TODO GET /objects/{pid}\export

GET /objects/{pid}\versions

...

 

|| Parameter \\ || Format \\ || Meaning \\ || Default \\ || Example \\ ||
| label \\ | String \\ | The new object label \\ | no change\\ | "My object" \\ |
| logMessage \\ | String \\ | The message to store in the log, about the purge \\ | Empty string \\ | "Deleted this object because it was not used anymore" \\ |
| ownerID \\ | String \\ | The new owner id \\ | no change\\ | "FedoraAdmin" \\ |
| state \\ | String, one of A (active), I (inactive) or D (deleted) \\ | The new object state. Note that if you do not set this parameter, the default value will set the object to Active \\ | A\\ | D \\ |

|| 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 \\ |








h3. TODO GET /objects/\{pid}\export 

h3. GET /objects/\{pid}\versions 

GET /objects/\{pid}/versions?\[format]

...





Gets a list of timestamps indicating when components changed in an object. This is a set of timestamps indicating when a datastream was created or modified in the object. These timestamps can be used to request a timestamped dissemination request to view the object as it appeared at a specific point in time.

...



Please note that this timestamp list is generated by requesting the timestamp list of all CURRENTLY Active datastreams, and sorting it. Inactive and Deleted datastreams are disregarded.

...



Please note that this timestamp list does not include changes to object properties, but only datastream changes.

...

Parameter

...

Format

...

Meaning

...

Default

...

Example

...

format

...



|| Parameter \\ || Format \\ || Meaning \\ || Default \\ || Example \\ ||
| format \\ | one of text/xml, text/html, html,

...

The format of the return value

...

text/html

...

text/xml

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

Example of xml format

Code Block
xmlxml
titleExampe of xml return
 xml \\ | The format of the return value \\ | text/html \\ | text/xml \\ |

|| 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 \\ |


h4. Example of html format
TODO


h4. Example of xml format
{code:xml|title=Exampe 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
xmlxml
titleXml schema
{code}



{code:xml|title=Xml 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>

...


{code}



h3. TODO GET /objects/\{pid}\objectXML

...

Datastream Resources

...




h2. Datastream Resources

h3. 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.

...



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

...

Parameter

...

Format

...

Meaning

...

Default

...

Example

...

asOfDateTime



|| Parameter \\ || Format \\ || Meaning \\ || Default \\ || Example \\ ||
| asOfDateTime \\ | yyyy-MM-ddTHH:mm:ss.SSSZ

...

The datastream list as it looked at the specific time

...

Now

 \\ | The datastream list as it looked at the specific time \\ | Now \\ | 2009-01-01T03:00:00:000Z

...

format

...

 \\ |
| format \\ | one of text/xml, text/html, html,

...

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
xmlxml
titleExampe of xml return
 xml \\ | The format of the return value \\ | text/html \\ | text/xml \\ |

|| 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 \\ |



h4. Example of html format
TODO


h4. Example of xml format
{code:xml|title=Exampe 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>
{code}
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
xmlxml
titleXml schema
 

The label and the mimeType will be empty strings if they are not specified for the particular datastream


{code:xml|title=Xml 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

...

"/>
	</xsd:complexType>
</xsd:schema>
{code}





h3. GET /objects/\{pid}/datastreams/\{dsID} - get datastream profile

GET /objects/\{pid}/datastreams/]{dsID}?\[asOfDateTime]\[validateChecksum]

Gets the datastream profile, as it looked at the specified time. The datastream profile is a datastructure containing all the datastream properties, but not the content.


|| Parameter \\ || Format \\ || Meaning \\ || Default \\ || Example \\ ||
| asOfDateTime \\ | yyyy-MM-ddTHH:mm:ss.SSSZ \\ | The datastream profile as it looked at the specific time \\ | Now \\ | 2009-01-01T03:00:00:000Z \\ |
| validateChecksum \\ | one of true, false \\ | Recompute the checksum for the content, and compare this to the stored checksum. Beware, this might take a while, if the content is external or big \\ | false \\ | true \\ |

|| 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 \\ |

h4. Example of html format
TODO


h4. Example of xml format
TODO


{code:xml|title=Xml schema}
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="qualified">
	<xs:element name="datastreamProfile">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="dsLabel" type="xs:string" />
				<xs:element name="dsVersionID" type="xs:string" />
				<xs:element name="dsCreateDate" type="xs:dateTime" />
				<xs:element name="dsState">
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:enumeration value="A"/>
                            <xs:enumeration value="D"/>
                            <xs:enumeration value="I"/>
                        </xs:restriction>
                    </xs:simpleType>				
				</xs:element>
				<xs:element name="dsMIME" type="xs:string" />
				<xs:element name="dsFormatURI" type="xs:anyURI" />
				<xs:element name="dsControlGroup" >
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:enumeration value="X"/>
                            <xs:enumeration value="M"/>
                            <xs:enumeration value="R"/>
                            <xs:enumeration value="E"/>
                        </xs:restriction>
                    </xs:simpleType>
				</xs:element>
                <xs:element name="dsSize" type="xs:integer" />
                <xs:element name="dsVersionable" >
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:enumeration value="true"/>
                            <xs:enumeration value="false"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:element>
                <xs:element name="dsInfoType" type="xs:string" />
                <xs:element name="dsLocation" type="xs:string" />
                <xs:element name="dsLocationType" type="xs:string" />                                
                <xs:element name="dsChecksumType" >
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:enumeration value="DEFAULT"/>
                            <xs:enumeration value="DISABLED"/>
                            <xs:enumeration value="MD5"/>
                            <xs:enumeration value="SHA-1"/>
                            <xs:enumeration value="SHA-256"/>
                            <xs:enumeration value="SHA-385"/>
                            <xs:enumeration value="SHA-512"/>
                            <xs:enumeration value="HAVAL"/>
                            <xs:enumeration value="TIGER"/>
                            <xs:enumeration value="WHIRLPOOL"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:element>
                <xs:element name="dsChecksum" type="xs:string" />
                <xs:element name="dsChecksumValid" minOccurs="0">
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:enumeration value="true"/>
                            <xs:enumeration value="false"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:element>
                <xs:element name="dsAltID" minOccurs="0" maxOccurs="unbounded" type="xs:string" />
			</xs:sequence>
			<xs:attribute name="pid" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string" />
				</xs:simpleType>
			</xs:attribute>
            <xs:attribute name="dsID" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:string" />
                </xs:simpleType>
            </xs:attribute>
		</xs:complexType>
	</xs:element>     
</xs:schema>
{code}


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

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

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