Add Single Metadata
REST Api operation to add a single metadata entry for a record on the Shared Records server using http-put.
Synopsis
Submit
PUT /<RESTServletPath>/<RecordID>/log/<Title>_<PaddedSequenceNumber>_<RollingChecksum> HTTP/1.1 Content-Length: <ContentLength>
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
- Title
- The title of the metadata entry.
- PaddedSequenceNumber
- The padded sequence number is just the integer sequence number prepended with zeros to make it 10-digits long.
- RollingChecksum
- See MetaDataChecksums for information on how to compute the rolling checksum.
Headers:
- Any of the S3 headers specified in MetaDataFormats.
- if x-amz-meta-record-uid, x-amz-meta-title, x-amz-meta-seq-num, or x-amz-meta-rolling-checksum is provided it should match the information in the url
Body:
The body of the request contains the raw bytes of the meta data entry to upload.
Response
HTTP/1.1 200 OK Content-Type: text/html; charset=iso-8859-1 Content-Length: 0
Headers:
- Content-Type
- The default text/html mime-type.
- Content-Length
- Should be zero, because no data is returned in the body.
Body:
None.
Response Codes:
- 200 - operation completed successfully
- 404 - record could not be found
- 412 - rolling checksum doesn't match that computed by the server
Examples
Command-line
(not shown)
Notes
This is a low level interface primarily used for synchronizing between different SharedRecords? servers. Most users should use the AddMetaData endpoint for adding a metadata entry.
