Versions Compared

Key

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

...

  • Purpose: Allows the repository to ask for status of a given deposit
  • Request: GET /bridge/deposit/{filegroup-id}
  • Response Body: JSON

    Code Block
    {
      "filegroup-id" : {
        "deposit-state" : "",
        "files" : {
          "file-1-id" : {
             "status",        # deposit status, one of: pending, retrieved, existing
             "size" : "",     # file size in bytes 
             "checksum" : ""  # file checksum
           },
          "file-2-id" : {
             "status" : "",
             "size" : "",   
             "checksum" : ""
           },
        }
      }
    }


  • Response Codes:
    • 200 (on success)
    • 404 (if the provided Deposit ID does not exist in the system)
  • Notes:
    • It would be possible to retain enough information to be able to provide a tombstone-type response for filegroups which were at some point in the system but have been removedhave completed deposit.
      • Alternatively, requests for filegroups that have completed deposit could be forwarded to the Get Deposited endpoint.
    • Deposit status
      • Pending - File is waiting to be processed (it has not been retrieved)
      • Retrieved - File has been successfully transferred to storage manage by the bridge
      • Existing - File with a matching ID and checksum was part of a previous version that is already stored; this file will not be retrieved

Delete Content

  • Purpose: Removes one or more files from DDP storage
  • Request: POST /bridge/delete ? {checksum-type}   # Using POST rather than DELETE, allows for deleting multiple files (and is consistent with Restore action)
    • checksum-type: (Optional) if provided, applies to all file checksums (can be one of: MD5, SHA-256, SHA-512). Default is MD5.
  • Request Body: JSON 

    Code Block
    {
      "filegroup-1-id" : {
        "version" : "",
        "files" : {
          "file-1-id" : "file-1-checksum",     # Checksum is optional, can be included to verify correct file is being deleted
          "file-2-id" : "file-2-checksum"
        }
      },                                     # Additional filegroups listed here
    }


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

    Code Block
    {
      "delete-id" : ""
    }


  • Notes:
    • It would be possible to retain enough information to be able to provide a tombstone-type response for File IDs which were at some point in the system but have been removed.
    • It would be possible to allow the "files" section to be omitted if all files in a given filegroup version are to be deleted.
    • It would be possible to allow the value associated with a filegroup ID to be omitted if all files in all versions of a filegroup are to be restored.

...

  • Purpose: Allows the repository to ask for status of a content delete action
  • Request: GET /bridge/delete/{delete-id}
  • Response Body: JSON 

    Code Block
    { "status" : "" }   # This could include a top level status or a per-file status (or both)


  • Response Code: 200 (on success)
  • Notes:
    • Need to better define the information that would be provided in the status response

List Deposited

...

  • Purpose: Retrieves a list all deposited filegroup IDs
  • Request: GET /bridge/list
  • Response Body: JSON


    Code Block
    { "filegroup-1-id", "filegroup-2-id", ... }

...


  • Notes:

    • This list would not include deleted filegroups 

Get Deposited

  • Purpose: Retrieves details about a deposited filesgroup, including all versions and associated files
  • Request: GET /bridge/list/{filegroup-id}
    • filegroup-id : List all versions and files associated with a specific filegroup ID
  • Response Body: JSON

    Code Block
    languagejs
    {
      "checksum-type" : ""      # Indicates type of checksums listed below, can be one of: MD5, SHA-256, SHA-512
      "filegroup-1-id" : [      # filegroup is a generic grouping of files that can be used to capture structure such as in a digital object or work
        {
          "version" : "",       # filegroup version
          "files" : {
            "file-1-id" : {
               "size" : "",     # file size in bytes 
               "checksum" : ""  # file checksum
             },
            "file-2-id" : {
               "size" : "",     # file size in bytes 
               "checksum" : ""  # file checksum
             },                 # Additional files listed here
          }
        },                      # Additional filegroup versions listed here
      ]
    }


  • Notes:

    • This list would not include deleted versions or files. A tombstone capability is possible, but not currently part of this specification.

Restore Content

  • Purpose: Requests that content be made available for restore
  • Request: POST /bridge/restore ? {checksum-type}
    • checksum-type: (Optional) if provided, applies to all file checksums (can be one of: MD5, SHA-256, SHA-512). Default is MD5.
  • Request Body: JSON 

    Code Block
    {
      "filegroup-1-id" : {
        "version" : "",
        "files: {
          "file-1-id" : "file-1-checksum",     # Checksum is optional, can be included to verify correct file is being restored
          "file-2-id" : "file-2-checksum"
        }
      },                                     # Additional filegroups listed here
    }


  • Response Code: 202 (on success)

  • Response Body: JSON 

    Code Block
    {
      "restore-id" : ""
    }


  • Notes:
    • In the versioning scenario, checksum may be used to select which version to restore. If no checksum is provided most recent version is assumed.
    • It would be possible to allow the "files" section to be omitted if all files in a given filegroup version are to be restored.
    • It would be possible to allow the value associated with a filegroup ID to be omitted if all files in all versions of a filegroup are to be restored.

...