This page last changed on Oct 26, 2009 by bbranan.

DuraStore

Purpose: DuraStore is the application through which DuraCloud manages storage. The DuraStore REST API provides access to storage by mediating the underlying storage provider APIs to allow access to multiple cloud storage options through a single API.
Store REST Methods

Get Stores

  • Purpose: Provides a listing of available storage providers accounts (without credentials)
  • Request: POST http://host:port/durastore/stores
  • Parameters: None
  • Response Code: 200 (on success)
  • Response Body: XML similar to:
    <storageProviderAccounts>
      <storageAcct ownerId='0' isPrimary='true'>
        <id>1</id>
        <storageProviderType>AMAZON_S3</storageProviderType>
      </storageAcct>
    </storageProviderAccounts>
    
Space REST Methods

Get Spaces

  • Purpose: Provides a listing of all of the spaces that a customer has created with associated metadata
  • Request: GET http://host:port/durastore/spaces ? (storeID)
  • Response Code: 200 (on success)
  • Response Body: XML similar to:
    <spaces>
      <space id="0">
        <space-name>Testing Space</space-name>	
        <space-count>65</space-count>
        <space-access>OPEN</space-access>	  
        <space-created>Mon, 01 Jan 2000 08:00:00 EST</space-created>
        <custom-metadata>Custom Metadata Value</custom-metadata>
      </space>
    </spaces>
    

Get Space

  • Purpose: Provides a listing of all of the contents of a space along with space metadata
  • Request: GET http://host:port/durastore/spaceID ? (storeID)
  • Response Code: 200 (on success)
  • Response Body: XML similar to:
    <space id="0">
      <item>Image 1</item>
      <item>Image 2</item>
    </space>
    
  • Response Headers: All available space metadata, example:
      x-dura-meta-space-name=Testing Space
      x-dura-meta-space-count=65
      x-dura-meta-space-access=OPEN
      x-dura-meta-space-created=Mon, 01 Jan 2000 08:00:00 EST
      x-dura-meta-custom-metadata=Custom Metadata Value
    

Get Space Metadata

  • Purpose: Provides all space metadata
  • Request: HEAD http://host:port/durastore/spaceID ? (storeID)
  • Response Code: 200 (on success)
  • Response Headers: Same as for Get space (above)

Create Space

  • Purpose: Creates a new space
  • Request: PUT http://host:port/durastore/spaceID ? (storeID)
  • Request Headers: Metadata about the space, example:
      x-dura-meta-space-name=Testing Space
      x-dura-meta-space-access=OPEN
      x-dura-meta-custom-metadata=Custom Metadata Value
    
  • Response Code: 201 (on success)
  • Response Body: Location of the new space (i.e. the URL used to create the space)

Set Space Metadata

  • Purpose: Updates the metadata associated with a space
  • Request: POST http://host:port/durastore/spaceID ? (storeID)
  • Request Headers: Same as Create space (above)
  • Response Code: 200 (on success)
  • Response Body: "Space $spaceID updated successfully" (on success)

Delete Space

Content REST Methods

Get Content

  • Purpose: Retrieves a piece of content along with its metadata
  • Request: GET http://host:port/durastore/spaceID/contentID ? (storeID)
  • Response Code: 200 (on success)
  • Response Body: The content stream
  • Response Headers: All available content metadata, example:
      Content-Type=text/plain
      Content-Length=5732
      Content-MD5=3456709234785097473839202
      ETag=3456709234785097473839202
      x-dura-meta-content-name=Testing Content
      x-dura-meta-custom-metadata=Custom Metadata Value
    

Get Content Metadata

  • Purpose: Retrieves the metadata of a piece of content without the content itself
  • Request: HEAD http://host:port/durastore/spaceID/contentID ? (storeID)
  • Response Code: 200 (on success)
  • Response Headers: Same as Get content (above)

Store Content

  • Purpose: Adds a piece of content to the store
  • Request: PUT http://host:port/durastore/spaceID/contentID ? (storeID)
  • Request Body: Content to be added
  • Request Headers: Metadata about the content, example:
      Content-Type=text/plain
      x-dura-meta-content-name=Testing Content
      x-dura-meta-custom-metadata=Custom Metadata Value
    
  • Response Code: 201 (on success)
  • Response Body: Location of the new content (i.e. the URL used to create the content)

Set Content Metadata

  • Purpose: Updates the metadata associated with a piece of content
  • Request: POST http://host:port/durastore/spaceID/contentID ? (storeID)
  • Request Headers: Same as Store content (above)
  • Response Code: 200 (on success)
  • Response Body: "Content $contentID updated successfully"

Delete Content

Document generated by Confluence on Jul 29, 2010 17:03