Versions Compared

Key

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

...

  • All calls require credentials for bridge access that are provided to users of the bridge by the DDP operating the bridge
  • File IDs must be unique per account. It is assumed that depositing repository (or other) systems are using unique IDs to identify stored content and that those IDs are used. If multiple systems are depositing into a single DDP/Bridge account, some method will need to be used to ensure that file IDs are unique (e.g. UUIDs or file IDs could include a namespace prefix, such as a repository ID).

Bridge API

Version

  • Provides the current version of the bridge application
  • Request: GET /bridge/version
  • Response Body: JSON 

    Code Block
    { "version" : "" }


  • Response Code: 200 (on success)

Register

  • Purpose: Allows a repository with an OTM API to register itself with the Bridge
  • Request: POST /bridge/register
  • Request Body: JSON 

    Code Block
    languagejs
    {
      "otm-url" : "",      # Endpoint URL where the Bridge can call back to this OTM API
      "otm-username" : "", # Credentials to allow the Bridge to make calls back into the OTM API
      "otm-password" : ""  # Credentials to allow the Bridge to make calls back into the OTM API
    }


  • Response Code: 200 (on success)

...

  • Purpose: Allows the repository to send content to the Bridge for deposit into the DDP
  • Request: POST /bridge/deposit/{deposit-id}
  • Request Body: JSON 

    Code Block
    {
      "checksum-type" : "",         # Checksum type applies to all file checksums (can be one of: MD5, SHA-256", SHA-512)
      "deposit-id" : {
        "file-1-id" : {
          "url" : "",               # This could be a relative URL to the file, based on the otm-url provided in the bridge registration
          "checksum" : "abc123"
        },                          # Additional files are added here                                
      }
    }


  • Response Code: 201 (on success)

List Deposits

  • Purpose: Retrieves a listing of all in-process deposits
  • Request: GET /bridge/deposit
  • Response Body: JSON 

    Code Block
    {
      "deposit-id-1" : {
        "files" : "",     # Number of files in deposit
        "status" : ""     # Current deposit status
      },                  # Additional deposits listed here
    }


  • Response Code: 200 (on success)

Deposit Status

  • Purpose: Allows the repository to ask for status of a given deposit
  • Request: GET /bridge/deposit/{deposit-id}Response Code 200 (on success)
  • Response Body: JSON JSON

    Code Block
    {
      "deposit-id" : "",
      "status" : "",     # Value based on defined set of known status states
                         # There could be more information here, like an approximate percentage completion of the current step, if known
    }


  • Response Code 200 (on success)

Abort

...

Deposit

  • Purpose: Allows the repository to ask the Bridge to abort the deposit process
  • Request: DELETE /bridge/deposit/{deposit-id}
  • Response: 200 (on success)

...

  • Purpose: Allows the repository to ask the Bridge to re-start a deposit that failed. For example, if the repository became unavailable shortly after starting a deposit and the Bridge process failed due to this, or if a single file in the deposit was not in the repository when the Bridge attempted to retrieve it.
  • Request: POST /bridge/deposit/{deposit-id}/restart
  • Response Code: 202 (on success)

Delete Content

  • TBD

Get Audit History

  • TBD

Retrieve Content

  • Purpose: Removes one or more files from DDP storage
  • Request: POST /bridge/purge # Using POST rather than DELETE, allows for deleting multiple files (and is consistent with Restore action)
  • Request Body: JSON 

    Code Block
    {
      "checksum-type" : "",        # Checksum type applies to all file checksums (can be one of: MD5, SHA-256, SHA-512)
      "file-1-id" : {
        "url" : "",                # It's not clear what this URL would be
        "checksum" : ""            # Checksum may only be needed as verification or in the versioning scenario (i.e. could be optional)
      },                           # Additional files are added here
    }


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

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


Delete Status

  • Purpose: Allows the repository to ask for status of a content delete action
  • Request: GET /bridge/purge/{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)

Get Audit History

  • Purpose: Retrieves the audit history for a given file
  • Request: GET /bridge/audit/{file-id}
  • Response Body: JSON 

    Code Block
    {
      "audit-events" : {
        "audit-event-1" : "",   # May want to define a method to simplify processing of audit events, such as a predefined set of event types
      }
    }


  • Response Code: 200 (on success)

Retrieve Content

  • Purpose: Requests that content be made available for restore
  • Request: POST /bridge/restore
  • Request Body: JSON 

    Code Block
    {
      "checksum-type" : "SHA-256", # Checksum type applies to all file checksums
      "file-1-id" : {
        "checksum" : ""            # Checksum may only be needed as verification or in the versioning scenario
      },                           # Additional files are added here
    }


  • Response Code: 202 (on success)

  • Response Body: JSON 

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


Restore Status

  • Purpose: Allows the repository to ask for status of a content restore action
  • Request: GET /bridge/restore/{restore-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)TBD