Versions Compared

Key

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

...

Panel
titleContent REST Methods

Get Content

  • Purpose: Retrieves a piece of content along with its properties
  • 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 properties, 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 Properties

  • Purpose: Retrieves the 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: 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:
    1. MD5 checksum of stored content
    2. ETag of stored content
    3. Location of the new content (i.e. the URL used to create the content), example:
      Code Block
      
      Content-MD5: b1946ac92492d2347c6235b4d2611184
      ETag: b1946ac92492d2347c6235b4d2611184
      Location: https://myhost:8080/durastore/space1/content1
      

Set Content Properties

  • Purpose: Updates the 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

...