Tasks are used to perform storage provider actions which cannot be performed in a generic manner across multiple providers. |
Get TasksPerform 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.
TasksAmazon S3 Storage ProvidertaskName | 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. When this call completes, two new properties will have been added to the set of properties for the specified space: - streaming-host - this is the RTMP host value, which can be used to generate URLs for open streams
- streaming-type - will either be OPEN or SECURE, depending on the value of the secure parameter provided when streaming was enabled
|
{
"spaceId" : "",
"secure" : ""
} |
spaceId - Name of the space for which streaming is to be enabled secure - true or false, should streaming be secured |
{
"result" : "",
"streamingHost" : ""
} |
result - Text indicating the results of the task streamingHost - the host name of the streaming endpoint | 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. |
spaceId - Name of the space for which streaming is to be disabled |
result - 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. |
spaceId - Name of the space for which streaming is to be deleted |
result - Text indicating the results of the task | get-url | Get URL task | Retrieves a URL for a media file that is streamed through Cloudfront via an open distribution |
{
"spaceId" : "",
"contentId" : "",
"resourcePrefix" : ""
} |
spaceId - Name of the space in which the streamed content is stored contentId - Name of the content item to be streamed resourcePrefix - A prefix on the content item which may be required by the streaming viewer. (e.g. an mp4 file may need a prefix of "mp4:") (optional) |
streamUrl - The URL to be used for streaming the requested content | get-signed-url | Get Signed URL task | Retrieves a signed URL for a media file that is streamed through Cloudfront via a secure distribution |
{
"spaceId" : "",
"contentId" : "",
"minutesToExpire" : "",
"ipAddress" : ""
"resourcePrefix" : ""
} |
spaceId - Name of the space in which the streamed content is stored contentId - Name of the content item to be streamed minutesToExpire - Number of minutes until the generated URL expires and the stream can no longer be played (optional, default is 480) ipAddress - IP address range where requests to stream must originate, in CIDR notation (e.g. 1.2.3.4/32) (optional) resourcePrefix - A prefix on the content item which may be required by the streaming viewer. (e.g. an mp4 file may need a prefix of "mp4:") (optional) |
signedUrl - The URL to be used for streaming the requested content | set-storage-policy | Set Storage Policy | Sets the S3 bucket lifecycle policies associated with a given space. This task is restricted to DuraCloud service administrators. |
{
"spaceId" : "",
"storageClass" : "",
"daysToTransition" : 0
} |
spaceId - Name of the space for which the storage policy should be set storageClass - One of "STANDARD_IA", "REDUCED_REDUNDANCY", or "GLACIER" daysToTransition - Number of days content should remain at standard storage before being transitioned to the new storage class |
result - Text indicating the results of the task | noop | Test task | Provides a simple way to test the calling of tasks | None | "Success" |
Amazon Glacier Storage ProvidertaskName | Name | Description | Request Body | Response Body |
---|
restore-content | Restore Content task | Provides 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/contentID | Text indicating that a restore action has been initiated (or that a restore is already in progress, in the case of duplicate requests.) |
Snapshot Storage ProvidertaskName | Name | Description | Request Body | Response Body |
---|
create-snapshot | Create Snapshot task | Creates 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. |
{
"spaceId" : "",
"description" : "",
"userEmail" : ""
} |
|
{
"snapshotId" : "",
"status" : ""
} |
| get-snapshot | Get Snapshot task | Retrieves the status and details of a snapshot action |
|
{
"snapshotId" : "",
"snapshotDate" : "",
"status" : "",
"sourceHost" : "",
"sourceSpaceId" : "",
"sourceStoreId" : "",
"description" : "",
"contentItemCount" : "",
"totalSizeInBytes" : ""
"alternateIds" :
["" , ""]
} |
| cleanup-snapshot | Clean Up Snapshot task | Handles the removal of content items in a space after a snapshot has taken place |
|
{
"contentExpirationDays" : ""
} |
| complete-snapshot | Complete Snapshot task | Completes the snapshot process |
|
| complete-cancel-snapshot | Complete the cancellation of a snapshot | Handles the removal of any space properties, .collection-snapshot.properties file, and snapshot related user permissions. It should be called by the bridge after it has finished its cancellation process. |
|
{
"result" : "text description of result"
} |
| restart-snapshot | Restart Snapshot task | Restarts the snapshot process if a failure occurred while transferring from DuraCloud to the bridge. |
|
{
"snapshotId" : "",
"status" : ""
} |
| get-snapshots | Get List of Snapshots task | Retrieves a listing of all snapshots which have been created | None |
{
"snapshots" : [
{
"snapshotId" : "",
"description" : "",
"status" : ""
},
...,
...
]
} |
| get-snapshot-contents | Get List of Snapshot Contents task | Retrieves a listing of the contents of a particular snapshot |
{
"snapshotId" : "",
"pageNumber" : 0,
"pageSize" : 1000,
"prefix" : ""
} |
|
{
"totalCount" : 0,
"contentItems" :
[{
"contentId" : "",
"contentProperties" :
{
"" : ""
}
}]
} |
| get-snapshot-history | Get Snapshot History task | Retrieves a listing of events which have occurred in the history of a particular snapshot |
{
"snapshotId" : "",
"pageNumber" : 0,
"pageSize" : 0
} |
|
{
"totalCount" : 0,
"historyItems" :
[{
"history" : "",
"historyDate" : 0
}]
} |
| request-restore-snapshot | Request a snapshot restore | Sends a restore request to an duracloud admin level user. This call can be made by user with access to the snapshot in question. Action on the part of the admin receiving the request is required to initiate a restore. The value of the user email address parameter will be used for notification purposes once the restore begins. |
{
"snapshotId" : "",
"userEmail" : ""
} |
|
| restore-snapshot | Restore Snapshot task | Initiates the restoration of a snapshot to a DuraCloud space. This call requires admin access. |
{
"snapshotId" : "",
"userEmail" : ""
} |
|
{
"spaceId" : "",
"restoreId" : "",
"status" : ""
} |
| complete-restore | Complete Restore task | Completes the restoration action by setting up an expiration policy for restored content |
{
"spaceId" : "",
"daysToExpire" : 1
} |
|
| get-restore | Get Snapshot Restore task | Retrieves the status and details of a restore action. Note that you must specify either the snapshotId or the restoreId, but not both. Specifying the snapshotId will return the most recent restoration matching that snapshotId. Specifying the restoreId you will get back the restoration matching that ID (as you would expect). |
{
"snapshotId" : "",
"restoreId" : ""
} |
|
{
"restoreId" : "",
"snapshotId" : "",
"status" : "",
"startDate" : "",
"endDate" : "",
"statusText" : "",
"destinationHost" : "",
"destinationPort" : "",
"destinationStoreId" : "",
"destinationSpaceId" : ""
} |
|
|