This document is licensed under a Creative Commons Attribution 4.0 License .
The One To Many (OTM) Bridge API Specification is one of two APIs used to support communication between digital content repository systems (Repository) and distributed digital preservation systems (DDP). An application implementing the OTM Bridge API (Bridge) will receive requests to deposit, restore, or delete content in a DDP from an application implementing the OTM Repository Gateway API (Gateway). The purpose of the Bridge is to perform the transfer and workflow tasks required to collect and distribute content managed by DDP systems. The Bridge is intended to provide a consistent interface for applications needing to interact with DDP systems as well as a consistent interface for DDP systems that would like to accept content from a variety of content repositories. The Bridge application is expected to be hosted by a DDP service as an extension of their service offering.
This document is a draft of a specification, created as part of the One to Many grant, funded by the Andrew W. Mellon Foundation.
Provides information about the Bridge application. Can also be used to verify that the Bridge application is available at the expected URL.
GET
/
JSON
bridge-version
: The current version of the Bridge applicationchecksum-types-supported
: The checksum types that are supported by the Bridge{ "bridge-version" : "1.0.0", "checksum-types-supported" : [ "MD5", "SHA-256", "SHA-512" ] }
200
(on success)Expected client(s): Gateway, DDP
Allows the DDP to create a new user account in the Bridge. After this call it will be possible for the OTM Gateway to register with the Bridge. This call can also be used to reset the access credentials for an account.
PUT
/account/{account-id}
account-id
: Account identifierJSON
account-id
: Account identifieraccount-username
: Credentials to allow calls to the Bridge for this accountaccount-password
: Credentials to allow calls to the Bridge for this account{ "account-id" : "university-of-example", "account-username" : "example-username", "account-password" : "5ecret!" }
201
(on success)Expected client(s): DDP
Allows the DDP to list all accounts known by the Bridge
GET
/account
JSON
{ "university-of-example", # Account ID "example-state-university" # Account ID }
200
(on success)Expected client(s): DDP
Allows a Gateway to register itself with the Bridge. The information provided in this registration will allow the Bridge to make calls back to the Gateway, such as to pull content listed in a deposit request. This call must be made prior to calls to deposit content. This call may also be made to update the Gateway registration information.
POST
/register
JSON
gateway-url
:
Base endpoint URL where the Bridge can call back to this Gateway APIgateway-username
:
Credentials to allow the Bridge to make calls back to the Gateway APIgateway-password
:
Credentials to allow the Bridge to make calls back to the Gateway API{ "gateway-url" : "https://example.com/gateway", "gateway-username" : "example-username", "gateway-password" : "5ecret!" }
200
(on success)Expected client(s): Gateway
Requests that a set of content be deposited into the DDP
POST
/deposit ? deposit-format=
deposit-format
: (Optional) Format of content being deposited (e.g. "bagit-profile-v1.2")JSON
version
: The version of a filegroupfiles
: List of files included in the filegroupsize
: Size of a file in bytes{ "filegroup-1" : { # Filegroup ID "version" : "2019-12-31T23:59:60Z", "files" : { "file-1" : { # File ID "size" : "654321", "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, "file-2" : { # File ID "size" : "654321", "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, # Additional files listed here } }, "filegroup-2" : { # Filegroup ID "version" : "2019-12-31T23:59:60Z", "files" : { "file-3" : { # File ID "size" : "654321", "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, "file-4" : { # File ID "size" : "654321", "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, # Additional files listed here } }, # Additional filegroups listed here }
201
(on success)"version" : ""
.
This "empty" version is equivalent to any other version.Expected client(s): Gateway
Retrieves a listing of all initiated and in-process deposits. This list includes all deposits that have been requested (via Deposit Content) but have not yet completed the deposit process (which occurs when the DDP calls Complete Deposit)
GET
/deposit ? status=
status
: (Optional) Limit list to deposits with a specific deposit statusJSON
version
: The version of a filegroupfile-count
: The number of files in a depositstatus
: The current deposit status of the depositdetails
: Additional details about the state of the deposit{ "filegroup-1" : { # Filegroup ID "version : "2019-12-31T23:59:60Z", "file-count" : "2", "status" : "ACCEPTED", "details" : "" }, # Additional filegroups listed here }
200
(on success)Expected client(s): Gateway, DDP
Allows the Gateway to ask for status of a specific deposit
GET
/deposit/{filegroup-id}/status
filegroup-id
: The ID of the filegroup being depositedJSON
version
: The version of a filegroupfile-count
: The number of files in a depositstatus
: The current deposit status of the depositdetails
: Additional details about the state of the deposit{ "filegroup-1" : { # Filegroup ID "version : "2019-12-31T23:59:60Z", "file-count" : "2", "status" : "ACCEPTED", "details" : "" } }
200
(on success)404
(if the provided Filegroup ID does not exist in the system)Expected client(s): Gateway
Allows the DDP to inform the Bridge that a deposit has completed
POST
/deposit/{filegroup-id}
filegroup-id
: Identifier of the filegroup for which deposit has completed200
(on success)Expected client(s): DDP
Retrieves a list of all deposited filegroup IDs
GET
/list
JSON
Filegroup ID
: Identifier of deposited filegroup{ "filegroup-1", # Filegroup ID "filegroup-2", # Filegroup ID # Additional filegroups listed here }
200
(on success)Expected client(s): Gateway
Retrieves details about a deposited filegroup, including versions and associated files
GET
/list/{filegroup-id}/{file-id}
filegroup-id
: The identifier of the filegroup for which information is requestedfile-id
: (Optional) The identifier of the file for which information is requestedJSON
filegroup
: Filegroup identifiersize
: Size of a file in bytes{ "filegroup" : "filegroup-1", "2019-12-31T23:59:60Z" : { # Version "file-1" : { # File ID "size" : "654321", "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, "file-2" : { # File ID "size" : "654321", "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, # Additional files listed here }, # Additional filegroup versions here }
200
(on success)Expected client(s): Gateway
Update audit index by providing additional audit details
POST
/audit
JSON
event-type
: Type of eventevent
: Event details{ "filegroup-1" : { # ID "event-type" : "replication", "files" : [ "file-1", "file-2", "file-3" ], "event" : { "version" : "2019-12-31T23:59:60Z", "timestamp" : "2020-01-01T23:59:60Z", "replicated-to" : "example-storage-node" } }, # Additional events listed here }
200
(on success)Expected client(s): DDP
Retrieves an audit history report. The report will list audit events associated with a single file or set of files in a filegroup.
GET
/audit/{filegroup-id}/{file-id}
filegroup-id
: The identifier of the filegroup for which an audit report is requestedfile-id
: (Optional) The identifier of the file for which an audit report is requested. If this
is not provided the audit report is requested based on the filegroup-id.JSON
date
: Date and time that the event occurredtype
: Type of event that occurreddetails
: Details of the event that occurred{ "filegroup-1" : [ # Filegroup ID { "file-1" : [ # File ID { "date" : "2019-12-31T23:59:60Z", "type" : "replication", "details" : "Replication to the UCSD storage node" }, # Additional events for this file listed here ], # Additional files listed here } ] }
200
(on success)404
(if no audit information exists for the requested Filegroup ID or File ID)Expected client(s): Gateway
Requests that content be made available for restore
POST
/restore
JSON
version
: The version of a filegroup from which the file should be restoredfiles
: List of files to be restored{ "filegroup-1" : { # Filegroup ID "version" : "2019-12-31T23:59:60Z", "files" : { "file-1" : { # File ID "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, "file-2" : { # File ID "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, } }, # Additional filegroups listed here }
202
(on success)JSON
restore-id
: The identifier for this restore action{ "restore-id" : "54321" }
Expected client(s): Gateway
Retrieves a listing of all in-process restores
GET
/restore ? status=
status
: (Optional) Limit list to restore actions with a specific restore statusJSON
file-count
: The number of files to be restoredstatus
: The current restore status of the restore actiondetails
: Additional details about the state of the restore actionexpiration
: The date on which the restored content will expire (and no longer be available for
retrieval). This value may be empty until a restore action completes.{ "restore-1" : { # Restore ID "file-count" : "12", "status" : "COMPLETE", "details" : "", "expiration" : "2020-12-31T23:59:60Z" }, # Additional restore actions listed here }
200
(on success)Expected client(s): Gateway, DDP
Provides details of the restore request to allow the request to be fulfilled by the DDP
GET
/restore/{restore-id}
restore-id
: The identifier of the restore actionJSON
version
: The version of a filegroup from which files are to be restoredfiles
: List of files to be restored{ "filegroup-1" : { # Filegroup ID "version" : "2019-12-31T23:59:60Z", "files" : { "file-1" : { # File ID "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, "file-2" : { # File ID "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, } }, # Additional filegroups listed here }
200
(on success)Expected client(s): DDP
Allows the repository to ask for status of a specific content restore action
GET
/restore/{restore-id}/status
restore-id
: The identifier of the restore actionJSON
file-count
: The number of files to be restoredstatus
: The current restore status of the restore actiondetails
: Additional details about the state of the restore actionexpiration
: The date on which the restored content will expire (and no longer be available for
retrieval). This value may be empty until a restore action completes.{ "file-count" : "12", "status" : "COMPLETE", "details" : "", "expiration" : "2020-12-31T23:59:60Z" }
200
(on success)404
(if the provided Restore ID does not exist in the system)Expected client(s): Gateway
Allows for the retrieval of restored content from the Bridge
GET
/restore/{restore-id}/{filegroup-id}/{file-id}
restore-id
: The identifier of the restore actionfilegroup-id
: The identifier of the filegroupfile-id
: The identifier of the file to retrieveDigest
: Checksum type and value of the restored file, as defined in RFC3230Content-Length
: Size in bytes of the restored file200
(on success)307
(if the requested content is available at an alternative URI, a Location
header is required)404
(if the provided Restore ID, Filegroup ID, or File ID does not exist in the system)Expected client(s): Gateway
Allows the DDP to inform the Bridge that a restore has completed
POST
/restore/{restore-id}
restore-id
: Identifier of the completed restore action200
(on success)Expected client(s): DDP
Removes one or more files from DDP storage
POST
/delete
JSON
version
: The version of a filegroup from which the file should be deletedfiles
: List of files to be deleted{ "filegroup-1" : { # Filegroup ID "version" : "2019-12-31T23:59:60Z", "files" : { "file-1" : { # File ID "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, "file-2" : { # File ID "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum } } }, # Additional filegroups listed here }
202
(on success)JSON
delete-id
: The identifier for this delete action{ "delete-id" : "54321" }
"filegroup-1" : {}
Retrieves a listing of all in-process deletes
GET
/delete ? status=
status
: (Optional) Limit list to delete actions with a specific delete statusJSON
file-count
: The number of files to be deletedstatus
: The current delete status of the delete actiondetails
: Additional details about the state of the delete action{ "delete-1" : { # Delete ID "file-count" : "7", "status" : "ACCEPTED", "details" : "" }, # Additional delete actions listed here }
200
(on success)Expected client(s): Gateway, DDP
Provides details of the delete request to allow the request to be fulfilled by the DDP
GET
/delete/{delete-id}
delete-id
: The identifier of the delete actionJSON
version
: The version of a filegroup from which files are to be deletedfiles
: List of files to be deleted{ "filegroup-1" : { # Filegroup ID "version" : "2019-12-31T23:59:60Z", "files" : { "file-1" : { # File ID "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, "file-2" : { # File ID "MD5" : "d41d8cd98f00b204e9800998ecf8427e" # Checksum }, } }, # Additional filegroups listed here }
200
(on success)Expected client(s): DDP
Allows the repository to ask for status of a content delete action
GET
/delete/{delete-id}/status
delete-id
: The identifier of the delete actionJSON
file-count
: The number of files to be deletedstatus
: The current delete status of the delete actiondetails
: Additional details about the state of the delete action{ "delete-1" : { "file-count" : "7", "status" : "ACCEPTED", "details" : "" } }
200
(on success)404
(if the provided Delete ID does not exist in the system)Expected client(s): Gateway
Allows the DDP to inform the Bridge that a delete has completed
POST
/delete/{delete-id}
delete-id
: Identifier of the completed delete action200
(on success)Expected client(s): DDP
All Deposit Endpoints must support the following set of status values. Other status values may be added to this list to provide additional detail about processing activity.
DEPOSIT_ACCEPTED
- The first status value set on a valid deposit action. Indicates that a deposit
has been initiated.
DEPOSIT_STAGED
- Indicates when content to be deposited has been retrieved from the Gateway and is
available to the DDP for deposit processing.
DEPOSIT_COMPLETE
- The final status value set on a deposit action that has completed successfully.
Indicates that all work on the deposit to be done by the Bridge and DDP has completed.
DEPOSIT_ERROR
- Indicates that an error occurred while performing the deposit and processing has
halted. Further details should be provided as to the cause of the error.
All Restore endpoints must support the following set of status values. Other status values may be added to this list to provide additional detail about processing activity.
RESTORE_ACCEPTED
- The first status value set on a valid restore action. Indicates that a restore
has been initiated.
RESTORE_STAGED
- Indicates when content to be restored has been collected from the DDP and is
available for the Gateway to retrieve.
RESTORE_COMPLETE
- The final status value set on a restore action that has completed successfully.
Indicates that all work on the restore to be done by the Bridge and DDP has completed.
RESTORE_ERROR
- Indicates that an error occurred while performing the restore and processing has
halted. Further details should be provided as to the cause of the error.
All Delete endpoints must support the following set of status values. Other status values may be added to this list to provide additional detail about processing activity.
DELETE_ACCEPTED
- The first status value set on a valid delete action. Indicates that a delete
has been initiated.
DELETE_COMPLETE
- The final status value set on a delete action that has completed successfully.
Indicates that all work on the delete to be done by the Bridge and DDP has completed.
DELETE_ERROR
- Indicates that an error occurred while performing the delete and processing has
halted. Further details should be provided as to the cause of the error.
Each endpoint MUST support HTTP Basic Authentication as described in [[RFC7617]] and allow access for registered credentials for Expected clients. Bridge implementations MAY support other authentication methods and/or allow access to access to using credentails other than those registered via the Add Account and Register endpoints.