Versions Compared

Key

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

...

  • Request: PUT /ObjectId HTTP/1.1

  • Request Body: Compressed Bag
  • Request Headers:
    • Content-Type
    • Content-Length
  • Response Codes:

    • 201 Created (on success)

    • 200 OK  (on success; update)
  • Response Headers:
    • ETag

Examples

Create an Object
Code Block
titleRequest
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
titleRequest
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
titleResponse
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
titleResponse
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>

...

  • Request: GET /ObjectId HTTP/1.1

  • Request Body: n/a
  • Request Headers
    • If-Match
    • If-None-Match
    • Accept (question)
  • Response Code:
    • 200 OK (if the object is restored available)
    • 403 Forbidden (if the object has not been restored)

  • Response Body: Compressed bag
  • Response Headers:
    • Content-Type
    • ETag

Examples

Retrieve an Object
Code Block
titleRequest
GET /af48c3d HTTP/1.1
Host: preservation-gateway.institution.edu
Date: Tue, 02 Jul 2019 20:45:00 GMT
Content-Length: 0


Code Block
titleResponse
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
titleRequest
GET /af48c3d HTTP/1.1
Host: preservation-gateway.institution.edu
Date: Tue, 02 Jul 2019 20:45:00 GMT
Content-Length: 0


Code Block
titleResponse
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
titleQuestion

Can HTTP Range requests be used to retrieve individual files (e.g. metadata)

...