Versions Compared

Key

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

 

Table of Contents

Convenience Variables

The curl commands below can be used directly if you define the following variables in your shell

No Format

host=<duracloud-hostname>
space-0=<any-name>
space-1=<any-name>
user=<username>
pword=<password>
file=<any-file-name>

...

The curl commands in the DuraStore section expect a test file for uploads.

No Format

echo hello > ${file}

Note that if the target of a content or space retrieval (GET) has access permissions set to "OPEN", then the "-u" option in the curl commands is not required.

DuraStore

Get Stores
No Format

curl -u ${user}:${pword} https://${host}/durastore/stores
Get Spaces
No Format

curl -u ${user}:${pword} https://${host}/durastore/spaces
curl -u ${user}:${pword} https://${host}/durastore/spaces?storeID=1
Create Space
No Format

curl -u ${user}:${pword} -X PUT https://${host}/durastore/${space-0}
curl -u ${user}:${pword} -H "x-dura-meta-city: arlington" -H "x-dura-meta-state: va" -X PUT https://${host}/durastore/${space-1}?storeID=1
Store Content
No Format

curl -u ${user}:${pword} -T ${file} https://${host}/durastore/${space-0}/test.txt
curl -u ${user}:${pword} -T ${file} https://${host}/durastore/${space-0}/item.txt
Get Space
No Format

curl -u ${user}:${pword} https://${host}/durastore/${space-0}
curl -u ${user}:${pword} https://${host}/durastore/${space-1}?storeID=1
curl -u ${user}:${pword} https://${host}/durastore/${space-0}?prefix=test
Set Space Properties
No Format

curl -u ${user}:${pword} -H "x-dura-meta-country: usa" -X POST https://${host}/durastore/${space-0}
Get Space Properties
No Format

curl -u ${user}:${pword} -I https://${host}/durastore/${space-0}
curl -u ${user}:${pword} -I https://${host}/durastore/${space-1}?storeID=1
Get Content
No Format

curl -u ${user}:${pword} https://${host}/durastore/${space-0}/test.txt
curl -u ${user}:${pword} https://${host}/durastore/${space-0}/test.txt?storeID=0\&attachment=true
Set Content Properties
No Format

curl -u ${user}:${pword} -X POST -H "x-dura-meta-color: green" https://${host}/durastore/${space-0}/test.txt
Get Content Properties
No Format

curl -u ${user}:${pword} -I https://${host}/durastore/${space-0}/test.txt
Delete Content
No Format

curl -u ${user}:${pword} -X DELETE https://${host}/durastore/${space-0}/test.txt
Delete Space
No Format

curl -u ${user}:${pword} -X DELETE https://${host}/durastore/${space-0}
curl -u ${user}:${pword} -X DELETE https://${host}/durastore/${space-1}?storeID=1

DuraService Notes

...

...

No Format

bitintegrity=0
deployment=<determined-by-inspection>

The following two service configuration files are provided for deployment and reconfiguration of the Bit Integrity Checker.
They are based on the spaces that were created in the DuraStore section, but can be modified to indicate other configuration options or to execute over alternate spaces.

  1. configuration file 0
  2. configuration file 1

DuraService

...

Get Services

...

No Format

curl -u ${user}:${pword} https://${host}/duraservice/services
curl -u ${user}:${pword} https://${host}/duraservice/services?show=deployed

...

Deploy Service

...

No Format

curl -u ${user}:${pword} -X PUT -T deploy.xml https://${host}/duraservice/${bitintegrity}

...

Get Service

...

No Format

curl -u ${user}:${pword} https://${host}/duraservice/${bitintegrity}

...

Get Deployed Service

...

No Format

curl -u ${user}:${pword} https://${host}/duraservice/${bitintegrity}/${deployment}

...

Get Deployed Service Properties

...

No Format

curl -u ${user}:${pword} https://${host}/duraservice/${bitintegrity}/${deployment}/properties

...

Update Service Configuration

...

No Format

curl -u ${user}:${pword} -X PUT -T deploy-new.xml https://${host}/duraservice/${bitintegrity}

...

UnDeploy Service

...

No Format

curl -u ${user}:${pword} -X DELETE https://${host}/duraservice/${bitintegrity}/${deployment}

DuraBoss Report API

Get Latest Storage Report
No Format

curl -u ${user}:${pword} https://${host}/duraboss/report/storage
Get Storage Report List
No Format

curl -u ${user}:${pword} https://${host}/duraboss/report/storage/list
Get Storage Report Info
No Format

curl -u ${user}:${pword} https://${host}/duraboss/report/storage/info
Start Storage Report
No Format

curl -u ${user}:${pword} -X POST https://${host}/duraboss/report/storage
Stop Storage Report
No Format

curl -u ${user}:${pword} -X DELETE https://${host}/duraboss/report/storage
Schedule Storage Report (to begin Jan 1, 2020 at 01:01:01 and repeat every 10 min)
No Format

curl -u ${user}:${pword} -X POST https://${host}/duraboss/report/storage/schedule?startTime=1577840461000\&frequency=600000
Cancel Storage Report Schedule
No Format

curl -u ${user}:${pword} -X DELETE https://${host}/duraboss/report/storage/schedule

...

Get Deployed Services Report

...

No Format

curl -u ${user}:${pword} https://${host}/duraboss/report/service/deployed

...

Get Completed Services Report

...

No Format

curl -u ${user}:${pword} https://${host}/duraboss/report/service

...

Get Services Report List

...

No Format

curl -u ${user}:${pword} https://${host}/duraboss/report/service/list

DuraBoss Auditor API

...

Start the Auditor

...

No Format

curl -u ${user}:${pword} -X POST https://${host}/duraboss/audit

...

Retrieve Log for a Space

...

No Format

curl -u ${user}:${pword} https://${host}/duraboss/audit/${space}

...

Stop the Auditor

...

No Format

curl -u ${user}:${pword} -X DELETE https://${host}/duraboss/audit

DuraBoss Executor API

...

Init Status

...

No Format

curl  -u ${user}:${pword} https://${host}/duraboss/init

...

Get Executor Status

...

No Format

curl -u ${user}:${pword} https://${host}/duraboss/exec

...

Get Executor's Supported Actions

...

No Format

curl -u ${user}:${pword} https://${host}/duraboss/exec/action

...

Start/Stop Streaming Service

...

No Format

curl -u ${user}:${pword} -X POST https://${host}/duraboss/exec/start-streaming 
curl -u ${user}:${pword} -X POST https://${host}/duraboss/exec/stop-streaming 

...

Start/Stop Streaming on a Particular Space

...

No Format

curl -u ${user}:${pword} -X POST https://${host}/duraboss/exec/start-streaming-space -d "${space}"
curl -u ${user}:${pword} -X POST https://${host}/duraboss/exec/stop-streaming-space -d "${space}"

...

Start Bit Service Integrity

...

No Format

curl -u ${user}:${pword} -X POST https://${host}/duraboss/exec/start-bit-integrity -d "${firstRunInEpochMilliseconds},${periodInMilliseconds}"

...

Cancel Bit Integrity Service

...

No Format

curl -u ${user}:${pword} -X POST https://${host}/duraboss/exec/cancel-bit-integrity 

DuraBoss Manifest API

...

Get Default Manifest

...

No Format

curl -u ${user}:${pword} https://${host}/duraboss/manifest/space-id 

...

Get Default Manifest with Specific Format (BagIt)

...

No Format

curl -u ${user}:${pword} https://${host}/duraboss/manifest/space-id?format=bagit 

...

Get Default Manifest with Specific store-id

...

No Format

curl -u ${user}:${pword} https://${host}/duraboss/manifest/space-id?storeID=${storeId} 

...

Get Default Manifest with Specific As-Of-Date

...