GetDigest - Amazon Quantum Ledger Database (Amazon QLDB)

GetDigest

Returns the digest of a ledger at the latest committed block in the journal. The response includes a 256-bit hash value and a block address.

Request Syntax

POST /ledgers/name/digest HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

name

The name of the ledger.

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: (?!^.*--)(?!^[0-9]+$)(?!^-)(?!.*-$)^[A-Za-z0-9-]+$

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Digest": blob, "DigestTipAddress": { "IonText": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Digest

The 256-bit hash value representing the digest returned by a GetDigest request.

Type: Base64-encoded binary data object

Length Constraints: Fixed length of 32.

DigestTipAddress

The latest block location covered by the digest that you requested. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo.

Type: ValueHolder object

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidParameterException

One or more parameters in the request aren't valid.

HTTP Status Code: 400

ResourceNotFoundException

The specified resource doesn't exist.

HTTP Status Code: 404

ResourcePreconditionNotMetException

The operation failed because a condition wasn't satisfied in advance.

HTTP Status Code: 412

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: