1 of 1 found this page helpful

Storage

    Assembly: mindtouch.core
    Class: MindTouch.Dream.StorageService
    SID: http://services.mindtouch.com/dream/...007/03/storage

    Overview

    The Storage service provides a simple storage API. The service is configured to point to a given master folder under which all sub-folders are created.  The service only allows one level of sub-folders.  A sub-folder gets created when a file is added and removed when the last file is deleted.

    Verb:Suffix Description
    GET: Get a list of all visible storage folders.
    GET:{folder} Retrieves the list of files from the storage folder.
    GET:{folder}/{filename} Retrieve a file from the storage folder.
    HEAD:{folder}/{filename} Retrieve information about a file from the storage folder.
    PUT:{folder}/{filename} Add a file to the storage folder.
    DELETE:{folder}/{filename} Delete file from the storage folder.

    Data Types

    Config

    <config>
    	<folder>C:/my_store</folder>
    </config>

    File List

    <files>
    	<file>
    		<name>filenam.txt</name>
    		<size>1024</size>
    		<extension>txt</extension>
    		<created>file creation date (UTC)</created>
    		<modified>file last modified date (UTC)</modified>
    	</file>
    </files>

    Folder List

    <list>
    	<folder>
    		<name>Folder name</name>
    	</folder>
    </list>

    Features

    GET:

    Get a list of all visible storage folders.

    Response
    Status Response Body Description
    OK (200) Folder List opreation completed successfully
    Version History

    Added in Aqua


    GET:{folder}

    Retrieves the list of files from the storage folder.

    Response
    Status Response Body Description
    OK (200) File List opreation completed successfully
    Version History

    Added in Aqua


    PUT:{folder}/{filename}

    Add a file to the storage folder.

    Query Parameters
    Name Type Defaut
    Description
    ttl double?
    infinite Time-to-live in seconds for the uploaded file.
    Request body

    application/octet-stream

    Response
    Response Response Body Description
    Ok (200) ---
    operation completed successfully and a new resource was created
    Bad Request (400) text/html
    request could not be completed, because of invalid data in the request
    Not Found (409) text/html
    request could not complete b/c of a conflict; response should contain information about how to resolve the situation (note: usually in response to a PUT action)
    Version History
    Beryl: added ttl query parameter

    Aqua: added feature


    DELETE:{folder}/{filename}

    Delete file from the storage folder.

    Response
    Response Response Body Description
    OK (200) ---
    opreation completed successfully
    Bad Request (400) text/html
    request could not be completed, because of invalid data in the request
    Not Found (404) text/html
    requested resource could not be found; it is not known if it will come back later
    Version History

    Added in Aqua


    GET:{folder}/{filename}

    Retrieve a file from the storage folder.

    Response
    Response Response Body Description
    OK (200) application/octet-stream opreation completed successfully
    Bad Request (400) --- request could not be completed, because of invalid data in the request
    Not Found (404) --- requested resource could not be found; it is not known if it will come back later

    HEAD:{folder}/{filename}

    Retrieve information about a file from the storage folder.

    Response
    Response Response Body Description
    OK (200) --- (HTTP headers only)
    opreation completed successfully
    Bad Request (400) --- request could not be completed, because of invalid data in the request
    Not Found (404) --- requested resource could not be found; it is not known if it will come back later
    Version History

    Crimson: added feature parameters

    Acqua: service added

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

    Copyright © 2011 MindTouch, Inc. Powered by