Wrapped Key Retrieve

REST Api operation which retrieves the "wrapped" symmetric key for a shared record from a user's account.

Synopsis

Submit

GET /<RESTServletPath>/<AccountID>/<RecordID>.wrappedkey HTTP/1.1
Host: <RESTHost:RESTPort>

Fields:

RESTServletPath
Path to the REST Servlet on the host. Example: records
AccountID
The ID of the account into which the record had been deposited.
RecordID
The unique ID of the stored record. (The SHA1 hash of the stored data, not of the "wrapped" key.)
RESTHost
IP address of Shared Records server. Example: sra.sharedrecords.org
RESTPort
Network port of the Shared Records server. Example: 8080

Headers:

None.

Body:

None.

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 451
Date: Fri, 29 Feb 2008 21:30:01 GMT

Headers:

Body:

The body of the http-put should contain the bytes of the symmetric key associated with the shared record. The key itself should be encrypted using the target user's public key, so it can be decrypted with the corresponding private key.

Examples

Command-line

The following command-line example uses the common unix "curl" utility to retrieve a record and save it in a file named "retrieved.txt".

$ curl --verbose --output retrieved.txt http://sra.sharedrecords.org/records/ \
faa5eb2862ec3b42701f8d8a60d2ac134ee0e2cf/fa701df930cfd3be7d4fc058675952d0b90008fd.wrappedkey

Note: the "\" character is used to indicate that the line continues. To copy-and-paste this command, remove those characters and remove whitespace in the URI.

Notes

HTTP/1.1 404 Not Found

Indicates that the requested wrapped key doesn't exist on the server.