Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Panel
titleSecurity Initialization REST Methods

Initialize Security Users

  • Purpose: Allows the initialization of authorized users
  • Request:
  • Request Body: XML similar to:
    Code Block
    xml
    xml
    <?xml version="1.0" encoding="UTF-8"?>
    <dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org">
      <security-user>
        <username>username-0</username>
        <password>password-0</password>
        <enabled>true</enabled>
        <accountNonExpired>true</accountNonExpired>
        <credentialsNonExpired>true</credentialsNonExpired>
        <accountNonLocked>true</accountNonLocked>
        <grantedAuthorities>ROLE_USER</grantedAuthorities>
      </security-user>
      <security-user>
        <username>username-1</username>
        <password>password-1</password>
        <enabled>false</enabled>
        <accountNonExpired>false</accountNonExpired>
        <credentialsNonExpired>false</credentialsNonExpired>
        <accountNonLocked>false</accountNonLocked>
        <grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities>
      </security-user>
    </dur:security-users>
    
  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)

...

Panel
titleInitialization REST Methods

Initialize Stores

  • Purpose: Allows the initialization of storage provider accounts
  • Request: POST https://host:port/durastore/initImage Removed
  • Request Body: XML similar to:
    Code Block
    xml
    xml
    <storageProviderAccounts>
      <storageAcct ownerId='0' isPrimary='true'>
        <id>1</id>
        <storageProviderType>AMAZON_S3</storageProviderType>
        <storageProviderCredential>
          <username>username</username>
          <password>password</password>
        </storageProviderCredential>
      </storageAcct>
    </storageProviderAccounts>
    
  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)

Is Initialized

  • Purpose: Performs a check to determine if the DuraStore application has been initialized
  • Request: GET https://host:port/durastore/initImage Removed
  • Response Code: 200 (if the application has been initialized), 503 (if the application has NOT been initialized)
  • Response Body: Text indicating whether initialization has occurred.
Panel
titleStore REST Methods

Get Stores

  • Purpose: Provides a listing of available storage providers accounts (without credentials)
  • Request: GET https://host:port/durastore/storesImage Removed
  • Parameters: None
  • Response Code: 200 (on success)
  • Response Body: XML similar to:
    Code Block
    xml
    xml
    <storageProviderAccounts>
      <storageAcct isPrimary='true'>
        <id>1</id>
        <storageProviderType>AMAZON_S3</storageProviderType>
      </storageAcct>
      <storageAcct isPrimary="false">
        <id>2</id>
        <storageProviderType>RACKSPACE</storageProviderType>
      </storageAcct>
    </storageProviderAccounts>
    
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/spacesImage Removed ? (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 properties
  • Request: GET https://host:port/durastore/spaceIDImage Removed ? (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 properties, 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-property: Custom Property Value
    

Get Space Properties

  • Purpose: Provides all space properties
  • Request: HEAD https://host:port/durastore/spaceIDImage Removed ? (storeID)
  • Response Code: 200 (on success)
  • Response Headers: Same as for Get space (above)

Get Space ACLs

  • Purpose: Provides all space ACLs, with values of 'r' (read) and 'w' (read/write)
  • Request: HEAD https://host:port/durastore/acl/spaceIDImage Removed ? (storeID)
  • Response Code: 200 (on success)
  • Response Headers: All available space ACLs, example:
    Code Block
    x-dura-meta-acl-user0: WRITE
    x-dura-meta-acl-user1: WRITE
    x-dura-meta-acl-group-curators: READ
    

Create Space

  • Purpose: Creates a new space
  • Request: PUT https://host:port/durastore/spaceIDImage Removed ? (storeID)
  • Request Headers: Properties about the space, example:
    Code Block
    x-dura-meta-space-access: OPEN
    x-dura-meta-custom-property: Custom Property 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 Properties

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

Set Space ACLs

  • Purpose: Updates the ACLs associated with a space
  • Request: POST https://host:port/durastore/acl/spaceIDImage Removed ? (storeID)
  • Request Headers: For 'user' ACLs the header prefix must be 'x-dura-meta-acl-' and for 'groups' the header prefix must be 'x-dura-meta-acl-group-'. Allowable values for ACL headers are: 'READ' and 'WRITE'.
    Example:
    Code Block
    x-dura-meta-acl-user0: WRITE
    x-dura-meta-acl-user1: WRITE
    x-dura-meta-acl-group-curators: READ
    
  • Response Code: 200 (on success)
  • Response Body: "Space $spaceID ACLs updated successfully" (on success)

Delete Space

  • Purpose: Deletes a space
  • Request: DELETE https://host:port/durastore/spaceIDImage Removed ? (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 properties
  • Request: GET https://host:port/durastore/spaceID/contentIDImage Removed ? (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/contentIDImage Removed ? (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/contentIDImage Removed ? (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
    
  • 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
      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/contentIDImage Removed ? (storeID)
  • Request Body: must not exist
  • Request Headers: Copy source, example:
    Code Block
    x-dura-meta-copy-source: space-id/content-id
    
  • Optional Request Headers: Copy source store, example:
    Code Block
    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
      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/contentIDImage Removed ? (storeID)
  • Request Headers: Same as Store content (above)
  • Response Code: 200 (on success)
  • Response Body: "Content $contentID updated successfully"

Delete Content

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/taskImage Removed ? (storeID)
  • Response Code: 200 (on success)
  • Response Body: XML similar to:
    Code Block
    <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/taskNameImage Removed ? (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

taskName

Storage Provider

Name

Description

Request Body

Response Body

enable-streaming

Amazon S3

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

Amazon S3

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

Amazon S3

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

run-hadoop-job

Amazon S3

Run Hadoop Job task

Runs a hadoop job using Amazon's Elastic Map Reduce feature. A JAR which implements the hadoop interfaces is expected to have already been loaded into S3. This JAR is used to execute the hadoop job.

A map serialized into XML which includes, at a minimum, values for jarContentId, sourceSpaceId, destSpaceId, and workSpaceId.

A map serialized into XML which includes the jobFlowId

describe-hadoop-job

Amazon S3

Describe Hadoop Job task

Retrieves information about a hadoop job running in Amazon's Elastic Map Reduce

The Job Flow ID

A map serialized into XML which includes information about the running job

stop-hadoop-job

Amazon S3

Stop Hadoop Job task

Stops a hadoop job running in Amazon's Elastic Map Reduce

The Job Flow ID

A map serialized into XML which includes a results key with a value of either success or failure

noop

Amazon S3

Test task

Provides a simple way to test the calling of tasks

Body content is ignored

Text indicating successful task completion

...

Panel
titleInitialization REST Methods

Initialize Services

  • Purpose: Initializes the DuraService application
  • Request: POST https://host:port/duraservice/initImage Removed
  • Request Body: XML similar to:
    Code Block
    xml
    xml
     <servicesConfig>
       <primaryServiceInstance>
          <host>[PRIMARY-SERVICE-INSTANCE-HOST]</host>
          <servicesAdminPort>[PRIMARY-SERVICES-ADMIN-PORT]</servicesAdminPort>
          <servicesAdminContext>[PRIMARY-SERVICES-ADMIN-CONTEXT]</servicesAdminContext>
       </primaryServiceInstance>
       <userStorage>
         <host>[USER-STORAGE-HOST-NAME]</host>
         <port>[USER-STORAGE-PORT]</port>
         <context>[USER-STORAGE-CONTEXT]</context>
         <msgBrokerUrl>[USER-STORAGE-MSG-BROKER-URL]</msgBrokerUrl>
       </userStorage>
       <serviceStorage>
         <host>[SERVICES-STORAGE-HOST-NAME]</host>
         <port>[SERVICES-STORAGE-PORT]</port>
         <context>[SERVICES-STORAGE-CONTEXT]</context>
         <spaceId>[SERVICES-STORAGE-SPACE-ID]</spaceId>
       </serviceStorage>
       <serviceCompute>
         <type>AMAZON_EC2</type>
         <imageId>[MACHINE-IMAGE-ID]</imageId>
         <computeProviderCredential>
           <username>[USERNAME]</username>
           <password>[PASSWORD]</password>
         </computeProviderCredential>
       </serviceCompute>
     </servicesConfig>
    
  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)

Is Initialized

  • Purpose: Performs a check to determine if the DuraService application has been initialized
  • Request: GET https://host:port/duraservice/initImage Removed
  • Response Code: 200 (if the application has been initialized), 503 (if the application has NOT been initialized)
  • Response Body: Text indicating whether initialization has occurred.
Panel
titleService REST Methods

Get Services

  • Purpose: Retrieves a listing of services, along with their configuration options
  • Request: GET https://host:port/duraservice/servicesImage Removed ? (show)
    • Parameter options for show (optional)
      1. available (default) - Includes only services which have not been deployed but are available for deployment
      2. deployed - Includes only services which have been deployed and started
  • Response Code: 200 (on success)
  • Response Body: XML list of services (see service config xsd)

Get Service

  • Purpose: Retrieves information about a particular service including description, configuration options, and all deployments
  • Request: GET https://host:port/duraservice/serviceIDImage Removed
  • Response Code: 200 (on success)
  • Response Body: XML service (see service config xsd)

Get Deployed Service

  • Purpose: Retrieves information about a deployed service including description, configuration options, and a single deployment indicating the configuration options in use
  • Request: GET https://host:port/duraservice/serviceID/deploymentIDImage Removed
  • Response Code: 200 (on success)
  • Response Body: XML service (see service config xsd)

Get Deployed Service Properties

Deploy Service

  • Purpose: Deploys and starts an available service
  • Request: PUT https://host:port/duraservice/serviceIDImage Removed ? (serviceHost)
    • Parameter value for serviceHost (optional) should indicate the services host on which the service should be deployed. Default is the primary customer host.
  • Request Body: XML user configuration indicating the config selections for the service (see user config portion of service config xsd)
  • Response Code: 201 (on success)
  • Response Header: Location header indicates the URL at which information about the deployed service can be retrieved (the URL for a get deployed service call) which includes the deploymentID

Update Service Configuration

  • Purpose: Updates the configuration of a deployed service
  • Request: POST https://host:port/duraservice/serviceID/deploymentIDImage Removed
  • Request Body: Updated XML user configuration indicating the config selections for the service (see user config portion of service config xsd)
  • Response Code: 200 (on success)

UnDeploy Service

...

Panel
titleInitialization REST Methods

Initialize Application

  • Purpose: Allows the initialization of duradmin
  • Request: POST https://host:port/duradmin/initImage Removed
  • Request Body: XML similar to:
    Code Block
    xml
    xml
    <duradminConfig>
      <durastoreHost>[host]</durastoreHost>
      <durastorePort>[port]</durastorePort>
      <durastoreContext>durastore</durastoreContext>
      <duraserviceHost>[host]</duraserviceHost>
      <duraservicePort>[port]</duraservicePort>
      <duraserviceContext>duraservice</duraserviceContext>
    </duradminConfig>
    
  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)

Is Initialized

  • Purpose: Performs a check to determine if the DurAdmin application has been initialized
  • Request: GET https://host:port/duradmin/initImage Removed
  • Response Code: 200 (if the application has been initialized), 503 (if the application has NOT been initialized)
  • Response Body: Text indicating whether initialization has occurred.

...

Panel
titleInitialization REST Methods

Initialize Application

  • Purpose: Allows the initialization of duraboss
  • Request: POST https://host:port/duraboss/initImage Removed
  • Request Body: XML similar to:
    Code Block
    xml
    xml
    <durabossConfig>
      <reporterEnabled>[true|false]</reporterEnabled>
      <executorEnabled>[true|false]</executorEnabled>
      <auditorEnabled>[true|false]</auditorEnabled>
      <durastoreHost>[host]</durastoreHost>
      <durastorePort>[port]</durastorePort>
      <durastoreContext>durastore</durastoreContext>
      <duraserviceHost>[host]</duraserviceHost>
      <duraservicePort>[port]</duraservicePort>
      <duraserviceContext>duraservice</duraserviceContext>
      <notificationConfig>
        <type>EMAIL</type>
        <username>[username for notification system]</username>
        <password>[password for notification system]</password>
        <originator>[from email address]</originator>
        <admin>[administrator email address]</admin>
      </notificationConfig>
    </durabossConfig>
    
  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)

Is Initialized

  • Purpose: Performs a check to determine if the DuraBoss application has been initialized
  • Request: GET https://host:port/duraboss/initImage Removed
  • Response Code: 200 (if the application has been initialized), 503 (if the application has NOT been initialized)
  • Response Body: Text indicating whether initialization has occurred.
Panel
titleReporter: Storage Report REST Methods

Get Latest Storage Report

  • Purpose: Provides the most current storage report in XML format
  • Request: GET https://host:port/duraboss/report/storageImage Removed
  • Response Code: 200 (on success)
  • Response Body: XML, defined by the storage report XSD

Get Storage Report List

Get Storage Report

Get Storage Report Info

  • Purpose: Provides a information about the current status of the storage reporting system
  • Request: GET https://host:port/duraboss/report/storage/infoImage Removed
  • Response Code: 200 (on success)
  • Response Body: XML, defined by the storage report XSD

Start Storage Report

  • Purpose: Starts a storage report if one is not already running
  • Request: POST https://host:port/duraboss/report/storageImage Removed
  • Response Code: 200 (on success)
  • Response Body: "Report Started" (on success), or ""Report Already In Progress" (if a report is already in progress)

Cancel Storage Report

Schedule Storage Report

  • Purpose: Schedules a time for a storage report to be run
  • Request: POST https://host:port/duraboss/report/storage/scheduleImage Removed ? (startTime) (frequency)
    • startTime: time (in milliseconds since the epoch) to begin the next storage report
    • frequency: time (in milliseconds) to wait between running reports (minimum value is 600000)
  • Response Code: 200 (on success)
  • Response Body: "Storage reports scheduled" (on success)

Cancel Storage Report Schedule

Panel
titleReporter: Service Report REST Methods

Get Deployed Services Report

Get Completed Services Report

  • Purpose: Provides a listing of the most recent completed services
  • Request: GET https://host:port/duraboss/report/serviceImage Removed ? (limit)
    • Parameter value for limit (optional) should indicate the maximum number of services to return in the report (default is 20, max is 1000)
  • Response Code: 200 (on success)
  • Response Body: XML, defined by the service report XSDs

Get Completed Services Report List

Get Services Report

Panel
titleExecutor REST Methods

Get Executor Status

  • Purpose: Provides a status of the Executor, which is the collected status of all Action Handlers
  • Request: GET https://host:port/duraboss/execImage Removed
  • Response Code: 200 (on success)
  • Response Body: XML serialization of status map

Get Supported Executor Actions

  • Purpose: Provides a listing of the actions which the Executor can perform
  • Request: GET https://host:port/duraboss/exec/actionImage Removed
  • Response Code: 200 (on success)
  • Response Body: XML serialization of the action set
Executor Actions

Action Name

Description

Request Body

start-bit-integrity

Instructs the bit integrity handler to begin the process at a given time and at a given frequency

start-time,frequency (where start-time is epoch date in milliseconds and frequency is number of milliseconds)

cancel-bit-integrity

Instructs the bit integrity handler to stop performing bit integrity checks and gracefully shut down

None

start-streaming

Starts the streaming service, so that media streaming can begin

None

stop-streaming

Shuts down the streaming service, stops streaming of all media

None

start-streaming-space

Begin streaming all content in the given space

Name of the space to stream

stop-streaming-space

Stop streaming content in the given space

Name of the space to end streaming

Perform an Executor Action

Shutdown Executor

Panel
titleAuditor REST Methods

Create Initial Audit Log

  • Purpose: Requests the creation of initial audit logs, and removal of any existing audit logs
  • Request: POST https://host:port/duraboss/auditImage Removed
  • Response Code: 202 (on acceptance)

Get Audit Logs

  • Purpose: Provides a listing of the audit logs for the provided spaceId
  • Request: GET https://host:port/duraboss/audit/spaceIdImage Removed
  • Response Code: 200 (on success)
  • Response Body: Plain text listing of audit log contentIds

Shutdown Auditor

  • Purpose: Requests that the Auditor perform a graceful shutdown
  • Request: DELETE https://host:port/duraboss/auditImage Removed
  • Response Code: 200 (on success)
  • Response Body: Plain text of "auditor shutting down"
Panel
titleContent Manifest REST Methods

Get Content Manifest

  • Purpose: Requests the content manifest for the provided spaceId, in the requested format, as of the provided date, and for the provided storeID
  • Request: GET https://host:port/duraboss/manifest/spaceIdImage Removed ? (format) & (date) & (storeID)
    • Parameter options for format (optional)
      1. tsv (default) - Produces content manifest in tab-separated-value format
      2. bagit - Produces content manifest in BagIt format
    • Parameter options for date (optional, current datetime is default)
      1. Any formatted date of the form: 'yyyy-MM-dd'T'HH:mm:ss.sss' or 'yyyy-MM' or any form in between these two
    • Parameter options for storeID (optional, default is primary store)
  • Response Code: 200 (on success)
  • Response Body: Plain text content manifest in the requested format