List Account Records

REST Api operation which retrieves a list of Record IDs which have been shared with an account.

Synopsis

GET  https://www.sharedrecords.org/records/?prefix=hash_of_account_public_key/

Submit

GET /<RESTServletPath>/>prefix=<AccountID>/ 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 unique ID of the account. (The SHA1 hash of the account's public key)

Headers:

None.

Body:

None.

Response

HTTP/1.1 100 Continue
HTTP/1.1 200 OK
X-Powered-By: Servlet/2.4
Content-Type: text/html; charset=iso-8859-1
Content-Length: <ContentLength>

Headers:

Content-Type
The appropriate mime-type for the response body.
Content-Length
The length of bytes in the response body.

Body:

A comma-separated list of Record IDs which have been shared with the account.

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 "records_for_me.txt".

$ curl --verbose --output records_for_me.txt \
http://sra.sharedrecords.org/records/?prefix=faa5eb2862ec3b42701f8d8a60d2ac134ee0e2cf/

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