Verify Record

REST Api operation which verifies the existence of a record on the Shared Records server using http-head.

Synopsis

Submit

HEAD /<RESTServletPath>/<RecordID>.data HTTP/1.1
Host: <RESTHost:RESTPort>

Fields:

RESTServletPath
Path to the REST Servlet on the host. Example: records
RecordID
The unique ID of the stored record. (The SHA1 hash of the stored data)
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
X-Powered-By: Servlet/2.4
Content-Type: text/html; charset=iso-8859-1
Content-Length: 0
x-amz-meta-<Option>: <Value>

Headers:

Content-Type
The default text/html mime-type.
Content-Length
Should be zero, because the body will be empty.
x-amz-meta-<Option>
Each metadata header which was supplied when the record was deposited will be returned exactly as it was submitted.
Max-Metadata-Sequence-Number
The maximum sequence number for all metadata entries associated with this record. This is used in the add metadata operation.

Body:

None.

Examples

Command-line

The following command-line example uses the common unix "curl" utility to verify a record.

$ curl --verbose --head \
http://sra.sharedrecords.org/records/8e636b1c0af14814fc67748ab54a3aa7d01893fb.data

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

The request and response headers to this call are the exact same as the GET record API. The only difference is that the record body is not returned in the response, just the headers. The response will be 404 Not Found if the record doesn't exist. This is also a way to retrieve only the headers of a record.