Get Account Public Key

REST Api operation to retrieve the public key associated with an account. All records shared with the account should use this key for encryption.

Synopsis

Submit

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

Fields:

RESTServletPath
Path to the REST Servlet on the host. Example: records
RESTHost
IP address of Shared Records server. Example: sra.sharedrecords.org
RESTPort
Network port of the Shared Records server. Example: 8080
AccountID
The Account ID is the SHA1 hash of the attached public key.

Headers:

None.

Body:

None.

Response

HTTP/1.1 200 OK
Content-Type: text/html; charset=iso-8859-1
Content-Length: <ContentLength>

Fields:

ContentLength?
The length of the byte of the public key contained in the body of the response.

Body:

The raw bytes of the account's public key.

Examples

Command-line

The following command-line example uses the common unix utility "curl" to retrieve an account's public key.

$ curl --verbose --output sharedpubkey.pem \
http://sra.sharedrecords.org/records/0fac9064d257da8d81e7de1c936db2302430328b.key 

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