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
    languagenone
    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
    languagenone
    Content-Type: text/plain
    Content-MD5: 4cd56e137a93a1accb43c5d32f4afffb
    x-dura-meta-content-name: Testing Content
    x-dura-meta-content-owner: JSmith
    
  • Response Code:
    • 201 (on success)
    • 400 (if the content ID is invalid)
    • 404 (if the the given space does not exist)
    • 409 (if the provided checksum did not match the stored content checksum)
    • 500 (on error)
  • Response Headers:
    • MD5 checksum of stored content
    • ETag of stored content
    • Location of the new content (i.e. the URL used to create the content), example:

      Code Block
      languagebash
      Content-MD5: 4cd56e137a93a1accb43c5d32f4afffb
      ETag: 4cd56e137a93a1accb43c5d32f4afffb
      Location: https://myhost:8080/durastore/space1/content1
      
  • Usage Notes
    • 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.

Copy Content

  • Purpose: Copies a piece of content from a source space to a destination space within a given store
  • Request: PUT https://host:port/durastore/spaceID/contentID ? (storeID)
  • Request Body: must not exist
  • Request Headers: Copy source, example:

    Code Block
    languagenone
    x-dura-meta-copy-source: space-id/content-id
    
  • Optional Request Headers: Copy source store, example:

    Code Block
    languagenone
    x-dura-meta-copy-source-store: storeId
    
  • Response Code: 201 (on success)
  • Response Headers:
    • MD5 checksum of stored content
    • ETag of stored content
    • Location of the new content (i.e. the URL used to create the content), example:

      Code Block
      languagebash
      Content-MD5: 4cd56e137a93a1accb43c5d32f4afffb
      ETag: 4cd56e137a93a1accb43c5d32f4afffb
      Location: https://myhost:8080/durastore/space1/content1
      
  • Usage Notes
    • The properties associated with the source content item are copied to the destination content item.
    • The source and destination spaces may be the same.
    • Including the optional header indicates that the copy action should retrieve the source file from a space in the specified storage provider. This allows for copying a file from one storage provider to another.

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

  • Purpose: Removes a piece of content from the store
  • Request: DELETE https://host:port/durastore/spaceID/contentID ? (storeID)
  • Response Code: 200 (on success)
  • Response Body: "Content $contentID deleted successfully"
Panel
titleAudit Log REST Methods

Get Audit Log

  • Purpose: Allows the initialization of storage provider accounts
  • Request: GET https://host:port/durastore/audit/{storeId}/{spaceId}
  • Response Code: 200 (on success), 404 if audit logs were not found.

  • Response Body: TSV in chronological order with the following fields.

    Code Block
    xml
    xml
    ACCOUNT	STORE_ID	SPACE_ID	CONTENT_ID	CONTENT_MD5	CONTENT_SIZE	CONTENT_MIMETYPE	CONTENT_PROPERTIES	SPACE_ACLS	SOURCE_SPACE_ID	SOURCE_CONTENT_ID	TIMESTAMP	ACTION	USERNAME
    mysubdomain	51	myspace	image-01.jpg	b1978f9fc4fe9448e05b83bbe6b98109	81214	image/jpeg	{"content-mimetype" : "image/jpeg"}		{}		2014-09-10T15:54:42.042	ADD_CONTENT	root
Panel
titleManifest REST Methods

Get Manifest

  • Purpose: Allows the initialization of storage provider accounts
  • Request: GET https://host:port/durastore/manifest/{spaceId}?storeID={storeID}&format={format}
  • Optional parameter 'format': TSV or BAGIT. TSV is default.
  • Response Code: 200 (on success), 404 if manifest was empty found.

  • Response Body: TSV in chronological order with the following fields.

    Code Block
    xml
    xml
    ACCOUNT	STORE_ID	SPACE_ID	CONTENT_ID	CONTENT_MD5	CONTENT_SIZE	CONTENT_MIMETYPE	CONTENT_PROPERTIES	SPACE_ACLS	SOURCE_SPACE_ID	SOURCE_CONTENT_ID	TIMESTAMP	ACTION	USERNAME
    mysubdomain	51	myspace	image-01.jpg	b1978f9fc4fe9448e05b83bbe6b98109	81214	image/jpeg	{"content-mimetype" : "image/jpeg"}		{}		2014-09-10T15:54:42.042	ADD_CONTENT	root
Panel
titleTask REST Methods
Info

Tasks are used to perform storage provider actions which cannot be performed in a generic manner across multiple providers.

Get Tasks

  • Purpose: Provides a listing of all of the supported tasks for a given provider. Note that if no storeID parameter is included, the task listing is provided for the primary storage provider.
  • Request: GET https://host:port/durastore/task ? (storeID)
  • Response Code: 200 (on success)
  • Response Body: XML similar to:

    Code Block
    languagehtml/xml
    <list>
      <string>task1</string>
      <string>task2</string>
    </list>
    

Perform Task

  • Purpose: Performs a particular task. Note that most tasks can be performed by only one storage provider type.
  • Request: POST https://host:port/durastore/task/taskName ? (storeID)
  • Request Body: Parameters for task. Each task will expect parameters in a specific format, see task listing for more details.
  • Response Code: 200 (on success)
  • Response Body: Response value for task, format varies by task.

Tasks

Amazon S3 Storage Provider

taskName

Name

Description

Request Body

Response Body

enable-streaming

Enable Streaming task

Enables RTMP streaming for all files within a DuraCloud space through the use of Amazon's Cloudfront streaming capability. This task may take up to 15 minutes to complete.

Name of the space for which streaming is to be enabled

Text indicating the results of the task, including the streaming host

disable-streaming

Disable Streaming task

Disables streaming by removing the ability for Cloudfront to access files within a space. This does not remove the streaming distribution, only disables its use, so enabling streaming on the same space again can be performed much more quickly. Some content in the space may continue to be available for streaming up to 24 hours after streaming has been disabled.

Name of the space for which streaming is to be disabled

Text indicating the results of the task

delete-streaming

Delete Streaming task

Removes a streaming distribution created by the enable-streaming task. This task should be performed after performing the disable-streaming task. This task may take up to 15 minutes to complete, after which no content in the space will be available for streaming.

Name of the space for which streaming is to be deleted

Text indicating the results of the task

noop

Test task

Provides a simple way to test the calling of tasks

Body content is ignored

Text indicating successful task completion

Amazon Glacier Storage Provider

taskName

Name

Description

Request Body

Response Body
restore-contentRestore Content taskProvides the capability to request that specific content items stored in Glacier be retrieved. Content items which are retrieved are made available 3-5 hours after this request is made, and remains available for 2 weeks.Name of the space and the content item in the form: spaceID/contentIDText indicating that a restore action has been initiated (or that a restore is already in progress, in the case of duplicate requests.)
Snapshot Storage Provider

taskName

Name

Description

Request Body

Response Body
create-snapshotCreate Snapshot taskCreates a snapshot by collecting details of the snapshot and passing the request down to a bridge application which makes a copy of the contents of the space.
No Format
{
  "spaceId" : "",
  "description" : "",
  "userEmail" : ""
}
No Format
{
  "snapshotId" : "",
  "status" : ""
}
get-snapshotGet Snapshot taskRetrieves the status and details of a snapshot action
No Format
{
  "snapshotId" : ""
}
No Format
{
  "snapshotId" : "",
  "snapshotDate" : "",
  "status" : "",
  "sourceHost" : "",
  "sourceSpaceId" : "",
  "sourceStoreId" : "",
  "description" : "",
  "contentItemCount" : "",
  "totalSizeInBytes" : ""
}
cleanup-snapshotClean Up Snapshot taskHandles the removal of content items in a space after a snapshot has taken place
No Format
{
  "spaceId" : ""
}
No Format
{
  "contentExpirationDays" : ""
}
complete-snapshotComplete Snapshot taskCompletes the snapshot process
No Format
{
  "spaceId" : ""
}
No Format
{
  "result" : ""
}
get-snapshotsGet List of Snapshots taskRetrieves a listing of all snapshots which have been createdNone
No Format
{
  "snapshots" : [
    {
      "snapshotId" : "",  
      "description" : "",
      "status" : ""
    }, 
    ...,
    ...  
  ]
}
get-snapshot-contentsGet List of Snapshot Contents taskRetrieves a listing of the contents of a particular snapshot
No Format
{
  "snapshotId" : "",
  "pageNumber" : 0,
  "pageSize" : 1000,
  "prefix" : ""
}
No Format
{ 
  "totalCount" : 0,
  "contentItems" : 
  [{ 
    "contentId" : "",
    "contentProperties" : 
      {
        "" : ""
      }
  }]
}
restore-snapshotRestore Snapshot taskRequests that a snapshot be restored to a DuraCloud space
No Format
{
  "snapshotId" : "",
  "userEmail" : ""
}
No Format
{
  "spaceId" : "",
  "restoreId" : "",
  "status" : ""
}
get-restoreGet Snapshot RestoreRetrieves the status and details of a restore action
No Format
{
  "snapshotId" : "",
  "restoreId" : ""
}
No Format
{
  "restoreId" : "",
  "snapshotId" : "",
  "status" : "",
  "startDate" : "",
  "endDate" : "",
  "statusText" : "",
  "destinationHost" : "",
  "destinationPort" : "",
  "destinationStoreId" : "",
  "destinationSpaceId" : ""
}

...