Versions Compared

Key

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

...

Panel
titleIngest Operations

Create Snapshot

  • Purpose: Performs a snapshot action
  • Request:  PUT  https://host:port/ bridge /snapshot/ (snapshotId)
  • Request Body: JSON:

    Code Block
    {
      "host" : "",
      "port" : "",
      "storeId" : "",
      "spaceId" : "",
      "description" : "",
      "userEmail" : ""
    } 
    • host - DNS host of DuraCloud instance from which snapshot can be taken
    • port - Port on which DuraCloud applications are available
    • storeID - Identifier of Chronopolis staging storage provider on DuraCloud instance
    • spaceID - Identifier of space in which snapshot content resides
    • description - User-supplied description of the snapshot
    • userEmail - User's email address, for notifications
  • Response Code: 200 or 201 on success (201 if snapshot request did not already exist)
  • Response Body: JSON:

    Code Block
    {
      "snapshotId" : "",
      "status": ""
    }

List All Snapshots

  • Purpose: Retrieves a list of all snapshots
  • Request:  GET  https://host:port/ bridge/snapshot ? host=(host)

  • Response Body: JSON:

    Code Block
    {
      "snapshots" : [
        {
          "snapshotId" : "",  
          "description" : "",
          "status" : ""
        }, 
        ...,
        ...  
      ]
    }

List Snapshot Contents

  • Purpose: Retrieves a list of content items which were included in a snapshot
  • Request:  GET  https://host:port/ bridge/snapshot/(snapshotId)/content ? page=(pageNumber) & pageSize=(pageSize) & prefix=(prefix)

  • Response Body: JSON:

Code Block
{ 
  "contentItems" : [
    { "contentId" : "",
      "contentProperties" : {"" : ""}
    }
  ]
}

 

List Snapshot History

  • Purpose: Retrieves a list of content items which were included in a snapshot
  • Request:  GET https://host:port/bridge/snapshot/(snapshotId)/history ? page=(pageNumber) & pageSize=(pageSize)
  • Response Body: JSON:
Code Block
{ 
  "totalCount" : (Long) # of historyItems
  "historyItems" : [
    { "historyDate" : (Long) epoch time,
      "history" : "${history item string}"
    },
  ]
}

 

Get Snapshot Details

  • Purpose: Provides the status of a snapshot action
  • Request:  GET https://host:port/bridge/snapshot/(snapshotId)
    • snapshotId - Identifier of the snapshot
  • Response Code: 200 (on success)
  • Response Body: JSON:

    Code Block
    {
      "snapshotId" : "",
      "snapshotDate" : "",
      "status" : "",
      "sourceHost" : "",
      "sourceSpaceId" : "",
      "sourceStoreId" : "",
      "description" : "",
      "contentItemCount" : "",
      "totalSizeInBytes" : ""
    }

    Possible values for status:

    • INITIALIZED

    • TRANSFERRING_FROM_DURACLOUD

    • WAITING_FOR_DPN

    • CLEANING_UP

    • SNAPSHOT_COMPLETE

    • FAILED_TO_TRANSFER_FROM_DURACLOUD

Snapshot Complete

  • Purpose: Enables DPN provider to notify bridge app that snapshot content has been successfully transferred to DPN storage and can now be removed from the bridge storage area (and DuraCloud)
  • Request:  POST https://host:port/bridge/snapshot/(snapshotId)/complete
  • snapshotId - Identifier of the snapshot
  • (Optional) Request Body: JSON:

    Code Block
    {
      alternateIds: {'alternateIds': ['alternate-id-1', 'alternate-id-2']}
    }
    • A Snapshot can be mapped to one or more alternate identifiers. Likely this will be a set of DPN bag IDs, which contain the content in this snapshot.

  • Response Code: 200 (on success)
  • Response Body: JSON:

    Code Block
    {
      "status" : "SNAPSHOT_COMPLETE",
      "details" : ""
    }

Snapshot History Update

  • Purpose: Enables DPN provider to notify bridge app that a DPN Bag Id (through the alternateIds in snapshotComplete) has an "update" to its history. Whether a bag was replicated, succesfully stored, checksumed, etc... this is the REST call to handle any and all updates to the history of a particular Snapshot/DPN Bag
  • Request: POST   https://host:port/bridge/snapshot/(identifier)/ history/update
    • identifier - Either the snapshot ID or an alternate ID (such as a DPN bag ID) which was associated with the snapshot in the Snapshot Complete call
  • Request Body: JSON: 

    Code Block
    {'history': '[ {"key1" : "value1"},{"key2" : "value2"} ]', 'alternate': 'true'} 
    OR 
    {'history': '[ "value1", "value2" ]', 'alternate': 'true'} 
    OR 
    {'history': '[ {"key1", "value1"}, "value2" ]', 'alternate': 'true'}
     

     

     
    • 'history' - single escaped JSON string that can contain a JSON array of objects or strings - the history event we're trying to record
    • 'alternate' - whether the snapshotId snapshot ID in the URL is the alternate Id ID or the original snapshot IdID.
  • Response Code: 200 (on success)
  • Response Body: JSON:

    Code Block
    {
      "snapshot" : {SnapshotSummary},
      "history" : "${the history string that was just inserted}"
    }

...