You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Notes/Assumptions

  • All calls require credentials for bridge access that are provided to users of the bridge by the DDP operating the bridge


Bridge API

Register

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

    {
      "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)

Deposit content

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

    {
      "checksum-type" : "SHA-256",
      "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)

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 

    {
      "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
    }

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)

Restart deposit

  • 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-id}/restart
  • Response Code: 202 (on success)



  • No labels