This is a feature intended for users and developers that extend and build on top of MindTouch. End users are not meant to directly interact with this feature via the UI.
2 Aug 2010: Initial scoping and brainstorming
3 Aug 2010: Completed initial draft for design of API features
4 Aug 2010: Added some practical use cases
13 Sep 2010: Updated spec to better match implementation (took out <contents> element and metadata from items)
ContentType: application/xml; propertycollection=true
Each item may have content associated with it other than the attributes. This is limited to text based storage including (x)html, xml, json, etc.
Since items are stored as properties which are revisioned upon any content changes, the same applies for property collections. Adding, updating, and removing an item causes the property to be updated which creates a new revision with the new set of items. Performing these operations in batch when applicable allows meaningful change tracking of the items by grouping like-operations together. Unfortunately there's not yet support for retrieving older property revisions via the REST API.
<items count=2 querycount=5 totalcount=10 href={uri to query}>
<item id="1" type="car" make="mazda" class="wagon" model="protege5" year="2002">Showing some age but tons of character!</item>
<item id="2" type="moto" make="suzuki" class="sport-turing" model="sv650" year="2001"/>
</items>
<items> <!-- new item with no content --> <item type="plane" make="boeing" model="B777"/> <!-- update existing item and its content --> <item id="2" type="car" make="mazda" class="sportswagon" model="protege5" year="2002">The item body and attributes may be updated</item> </items>
Providing an item id updates an existing item including its attributes and body. Omitting an id creates a new item with a generated id. Id's may be created by the client and if no matching id exists then a new item is created having the given id.
This feature also supports adding an item without the XML envelope. Specify the item's ContentType (such as application/json, or application/xml), content as message body, and attributes as query parameters. This way a client may add an item without needing to encode it for inclusion into XML. An item may be updated like this by specifying its id as a query parameter.
| File | Version | Size | Modified | |
|---|---|---|---|---|
| ||||
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by
each item gets a server generated unique id upon addition. Any non-binary content bodies should be ok including json.