Was this page helpful?

Directory

    Assembly: mindtouch.core
    Class: MindTouch.Dream.DirectoryService
    SID: http://services.mindtouch.com/dream/...7/03/directory

    Overview

    The Directory services makes it easy to store XML records.  It also provides a pub/sub mechanism to distribute state over multiple services automatically.

    Verb:Suffix Description
    GET:records/ Get a list of all stored records.
    GET:records/{name} Retrieve the value stored with a specific record.
    PUT:records/{name} Add a new record or update an existing record with the provide value.
    DELETE:records/{name} Delete record from directory.
    POST:subscribe/ Subscribe to change notifications.
    POST:unsubscribe/ Unsubscribe to change notifications.

    Data Types

    Subscription

    <subscription>
    	<uri>WHERE NOTIFICATIONS GET SENT TO</uri>
    </subscription>

    Notification

    <notification>
    	<from>SOURCE URI</from>
    	<action>ADD</action>
    	<record>
    		<name>ENTRY NAME</name>
    		<expiration>WHEN THE RECORD WILL BE AUTO-DELETED</expiration>
    		<value>NESTED XDOC</value>
    	</record>
    </notification>
    <notification>
    	<from>SOURCE URI</from>
    	<action>DELETE</action>
    	<record>
    		<name>ENTRY NAME</name>
    	</record>
    </notification>

    DirectoryRecord

    <record>
    	<name>record name</name>
    	<expiration>expiration date/time</expiration>
    	<value>nested XML document</value>
    </record>

    DirectoryList

    <list>
    	<record>
    		<name>record name</name>
    		<expiration>expiration date/time</expiration>
    		<value>...</value>
    	</record>
    	...
    </list>

    Config

    This service does not require a configuration.

    <config>
    </config>

    Features

    GET:records/

    Get list of all records.

    Response
    Status Response Body Description
    200 DirectoryList The list of DirectoryRecords
    Version History

    Aqua: feature added


    GET:records/{name}

    Retrieve the value stored with a specific record.

    Response
    Status Response Body Description
    200 DirectoryRecord The value stored with the given record
    404 Html Html error page
    Version History

    Aqua: feature added


    PUT:records/{name}

    Add a new record or update an existing record with the provide value.

    Query Parameters
    Name Type Default
    Description
    ttl int -1 time-to-live in seconds for the added record
    Request Body

    XDoc

    Response
    Status Response Body Description
    200 --- n/a
    Version History

    Aqua: feature added


    DELETE:records/{name}

    Delete record from directory.

    Response
    Status Response Body Description
    200 none n/a
    Version History

    Aqua: feature added


    POST:subscribe/

    Subscribe to change notifications.

    Request Body

    Subscription

    Response
    Status Response Body Description
    200 --- n/a
    Version History

    Aqua: feature added


    POST:unsubscribe/

    Unsubscribe to change notifications.

    Request Body

    Subscription

    Response
    Status Response Body Description
    200 none n/a
    Version History

    Aqua: feature added

    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by