Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
titleSpace REST Methods

Get Spaces

  • Purpose: Provides a listing of all of the spaces that a customer has created
  • Request: GET https://host:port/durastore/spaces ? (storeID)
  • Response Code: 200 (on success)
  • Response Body: XML similar to:
    Code Block
    <spaces>
      <space id="space1" />
      <space id="space2" />
    </spaces>
    

Get Space

  • Purpose: Provides a listing of the contents of a space along with space metadataproperties
  • Request: GET https://host:port/durastore/spaceID ? (storeID) (prefix) (maxResults) (marker)
    • storeID (optional) - ID of the content storage provider to query (default is primary store)
    • prefix (optional) - Only retrieve content ids with this prefix (default is all content ids)
    • maxResults (optional) - The maximum number of content IDs to return in the list (default is 1000)
      note: the maximum allowable value for maxResults is 1000. Any larger value will be reduced to 1000.
    • marker (optional) - The content ID marking the last item in the previous set (default is the first set of ids)
  • Response Code: 200 (on success)
  • Response Body: XML similar to:
    Code Block
    <space id="space1">
      <item>Image 1</item>
      <item>Image 2</item>
    </space>
    
  • Response Headers: All available space metadataproperties, example:
    Code Block
      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-metadataproperty: Custom MetadataProperty Value
    

Get Space

Metadata

Properties

  • Purpose: Provides all space metadataproperties
  • Request: HEAD https://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 https://host:port/durastore/spaceID ? (storeID)
  • Request Headers: Metadata Properties about the space, example:
    Code Block
      x-dura-meta-space-access: OPEN
      x-dura-meta-custom-metadataproperty: Custom MetadataProperty Value
    
  • Response Code: 201 (on success)
  • Response Headers: Location of the new space (i.e. the URL used to create the space), example:
    Code Block
      Location: https://myhost:8080/durastore/space1
    

Set Space

Metadata

Properties

  • Purpose: Updates the metadata properties associated with a space
  • Request: POST https://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

  • Purpose: Deletes a space
  • Request: DELETE https://host:port/durastore/spaceID ? (storeID)
  • Response Code: 200 (on success)
  • Response Body: "Space $spaceID deleted successfully" (on success)
Panel
titleContent REST Methods

Get Content

  • Purpose: Retrieves a piece of content along with its metadataproperties
  • Request: GET https://host:port/durastore/spaceID/contentID ? (storeID) (attachment)
    • if attachment param value is true, a Content-Disposition header is included with the response
  • Response Code: 200 (on success)
  • Response Body: The content stream
  • Response Headers: All available content metadataproperties, example:
    Code Block
      Content-Type: text/plain
      Content-Length: 5732
      Content-MD5: 3456709234785097473839202
      ETag: 3456709234785097473839202
      x-dura-meta-content-name: Testing Content
      x-dura-meta-content-owner: JSmith
    

Get Content

Metadata

Properties

  • Purpose: Retrieves the metadata properties of a piece of content without the content itself
  • Request: HEAD https://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 https://host:port/durastore/spaceID/contentID ? (storeID)
  • Request Body: Content to be added
  • Request Headers: Metadata Properties about the content, example:
    Code Block
      Content-Type: text/plain
      Content-MD5: 4cd56e137a93a1accb43c5d32f4afffb
      x-dura-meta-content-name: Testing Content
      x-dura-meta-content-owner: JSmith
    
    • Note that when the optional Content-MD5 header is included, the final checksum of the stored file is compared against the MD5 value included in the header to ensure that the file was stored correctly. If the header is not included, an MD5 checksum is computed as the file is transferred to storage, and that value is used in the final comparison.
  • Response Code: 201 (on success)
  • Response Headers: Location of the new content (i.e. the URL used to create the content), example:
    Code Block
      Location: https://myhost:8080/durastore/space1/content1
    

Set Content

Metadata

Properties

  • Purpose: Updates the metadata properties associated with a piece of content
  • Request: POST https://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

...