...
The preservation Gateway functions as an aggregating cache for preservation requests originating with a repository and destined for a DDP via the OTM Bridge. This allows repositories to synchronously send contentpreservation in an asynchronous deep archive.
Repository Gateway API
GET / (service description)
Description
Retrieve a description of this Gateway, including the api version, and the available storage classes.
Requests/Responses
Request: GET / HTTP/1.1
- Request Body: n/a
- Request Headers:
Response Codes:
Response Body:
Code Block |
---|
language | js |
---|
title | JSON response body |
---|
|
{
api_version: 0.1
storage_classes: [{
name: ddp1_name
},
{
name: ddp2_name
}]
} |
PUT Object (deposit)
Description
Create or update a gateway object for preservation of a Bag an Object from the repository.
Requests/Responses
Request: PUT /ObjectId HTTP/1.1
- Request Body: Compressed Bag
- Request Headers:
Content-Type
Content-Length
x-duraspace-storage-class
(DDP target(s) for preservation)
Response Codes:
Response Code:
HEAD Object (audit)
200 OK
(on success; update)
- Response Headers:
Examples
Create an Object
Code Block |
---|
|
PUT /af48c3d HTTP/1.1
Host: preservation-gateway.institution.edu
Date: Tue, 02 Jul 2019 20:15:00 GMT
Content-Type: application/zip
Content-Length: 493285
Content-MD5: 4efcb3d98ce0fabfd585eb6c4332859
[493285 bytes of object data] |
Code Block |
---|
|
HTTP/1.1 201 Created
Date: Tue, 02 Jul 2019 20:15:00 GMT
ETag: "4efcb3d98ce0fabfd585eb6c4332859"
Content-Length: 0
Server: OTM Preservation Gateway |
Info |
---|
|
Holy Bags? For large file deposit. - i don't want to push this content over the network and/or - i don't want to store it on a Gateway accessible disk |
Info |
---|
Write up something about ObjectID semantics and repository reconstruction. |
GET Object Audit
Description
Retrieve audit metadata for the object.
Requests/Responses
Request: HEAD GET /ObjectId/audit HTTP/1.1
- Request Body: n/a
- Response Code:
200 OK
Response Body:
Code Block |
---|
language | js |
---|
title | JSON response body |
---|
|
{
} |
Info |
---|
|
Can ddp_name: {
preserved: true
destroy_requested: true
}
} |
DELETE Object (destroy)
Description
Request removal of a Bag an Object and all its contents from the archive
Requests/Responses
Request: DELETE /ObjectId HTTP/1.1
- Request Body: n/a
- Response Code:
204
Codes:
Examples
Destroy an Object
Code Block |
---|
|
DELETE /af48c3d HTTP/1.1
Host: preservation-gateway.institution.edu
Date: Tue, 02 Jul 2019 20:25:00 GMT
Content-Type: text/plain |
Code Block |
---|
|
HTTP/1.1 204 NoContent
Date: Tue, 02 Jul 2019 20:25:00 GMT
Content-Length: 0
Server: OTM Preservation Gateway |
POST Object Restore
Description
Request restore of a Bag Object and all its contents for later retrieval
Requests/Responses
Request: Post POST /ObjectId?restore HTTP/1.1
- Request Body: n/a
- Response Code:
202 Accepted
(if the object is not already restored)200 OK
(if the object is already restored and available for retrieval)
Examples
Restore an Object
Code Block |
---|
|
POST /af48c3d?restore HTTP/1.1
Host: preservation-gateway.institution.edu
Date: Tue, 02 Jul 2019 20:35:00 GMT
Content-Length: 0 |
Code Block |
---|
|
HTTP/1.1 202 Accepted
Date: Tue, 02 Jul 2019 20:35:00 GMT
Content-Length: 0
Server: OTM Preservation Gateway |
Requesting a Restore on an Object that is Available
Code Block |
---|
|
POST /af48c3d?restore HTTP/1.1
Host: preservation-gateway.institution.edu
Date: Tue, 02 Jul 2019 20:35:00 GMT
Content-Length: 0 |
Code Block |
---|
|
HTTP/1.1 200 OK
Date: Tue, 02 Jul 2019 20:35:00 GMT
Content-Length: 0
Server: OTM Preservation Gateway |
ERROR: Restore Already in Progress
Code Block |
---|
|
POST /af48c3d?restore HTTP/1.1
Host: preservation-gateway.institution.edu
Date: Tue, 02 Jul 2019 20:35:00 GMT
Content-Length: 0 |
Code Block |
---|
|
HTTP/1.1 409 Conflict
Date: Tue, 02 Jul 2019 20:35:00 GMT
Content-Type: application/xml
Server: OTM Preservation Gateway
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>RestoreAlreadyInProgress</Code>
<Message>Object restore is already in progress.</Message>
<Resource>/af48c3d</Resource>
</Error> |
Code Block |
---|
|
HTTP/1.1 409 Conflict
Date: Tue, 02 Jul 2019 20:35:00 GMT
Content-Type: application/xml
Server: OTM Preservation Gateway
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>RestoreAlreadyInProgress</Code>
<Message>Object restore is already in progress.</Message>
<Resource>/af48c3d</Resource>
</Error> |
Info |
---|
|
Can HTTP Range requests be used to retrieve individual files (e.g. metadata) |
GET Object (retrieve)
Description
Retrieve a restored object.
Requests/Responses
Request: GET /ObjectId HTTP/1.1
- Request Body: n/a
- Request Headers
If-Match
If-None-Match
Accept
- Response Code:
- Response Body: Compressed bag
- Response Headers:
Examples
Retrieve an Object
Code Block |
---|
|
GET /af48c3d HTTP/1.1
Host: preservation-gateway.institution.edu
Date: Tue, 02 Jul 2019 20:45:00 GMT
Content-Length: 0 |
Code Block |
---|
|
HTTP/1.1 200 OK
Date: Tue, 02 Jul 2019 20:45:00 GMT
ETag: "4efcb3d98ce0fabfd585eb6c4332859"
Content-Length: 493285
Content-Type: application/zip
Server: OTM Preservation Gateway
[493285 bytes of object data] |
ERROR: Retrieval of an Unavailable Object
Code Block |
---|
|
GET /af48c3d HTTP/1.1
Host: preservation-gateway.institution.edu
Date: Tue, 02 Jul 2019 20:45:00 GMT
Content-Length: 0 |
Code Block |
---|
|
HTTP/1.1 403 Forbidden
Date: Tue, 02 Jul 2019 20:45:00 GMT
ETag: "4efcb3d98ce0fabfd585eb6c4332859"
Content-Type: application/xml
Server: OTM Preservation Gateway
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>InvalidObjectState</Code>
<Message>The Object is not available </Message>
<Resource>/af48c3d</Resource>
</Error> |
Info |
---|
|
Can HTTP Range requests be used to retrieve individual files (e.g. metadata) |
...
Authentication with the OTM Bridge
Bridge Interactions
GET File (transfer)
Description
Transfer a cached file. This endpoint allows a Bridge to pull content for storage in a preservation service.
Requests/Responses
- Request:
GET /ObjectId/fileName HTTP/1.1
- Request Headers
- Response Code:
- Response Body: file contents
- Response Headers: