---
title: "POST /ledgers/{name}/block"
method: POST
path: "/ledgers/{name}/block"
---

# POST /ledgers/{name}/block

`POST /ledgers/{name}/block`

Returns a block object at a specified address in a journal. Also returns a proof of the specified block for verification if `DigestTipAddress` is provided.

For information about the data contents in a block, see [Journal contents](https://docs.aws.amazon.com/qldb/latest/developerguide/journal-contents.html) in the _Amazon QLDB Developer Guide_.

If the specified ledger doesn't exist or is in `DELETING` status, then throws `ResourceNotFoundException`.

If the specified ledger is in `CREATING` status, then throws `ResourcePreconditionNotMetException`.

If no block exists with the specified address, then throws `InvalidParameterException`.

## Path parameters

- `name` string, required

## Request body

- object
  - `BlockAddress` object, required — A structure that can contain a value in multiple encoding formats.
    - `IonText` string, password — An Amazon Ion plaintext value contained in a <code>ValueHolder</code> structure.
  - `DigestTipAddress` object — A structure that can contain a value in multiple encoding formats.
    - `IonText` string, password — An Amazon Ion plaintext value contained in a <code>ValueHolder</code> structure.

## Response `200`

Success

- GetBlockResponse
  - `Block` object, required — The block data object in Amazon Ion format.
    - `IonText` string, password — An Amazon Ion plaintext value contained in a <code>ValueHolder</code> structure.
  - `Proof` object — The proof object in Amazon Ion format returned by a <code>GetBlock</code> request. A proof contains the list of hash values required to recalculate the specified digest using a Merkle tree, starting with the specified block.
    - `IonText` string, password — An Amazon Ion plaintext value contained in a <code>ValueHolder</code> structure.

## Other responses

- `480` — InvalidParameterException
- `481` — ResourceNotFoundException
- `482` — ResourcePreconditionNotMetException

---

[API](https://skmtc.net/aws/apis/qldb.md) · [All operations](https://skmtc.net/aws/apis/qldb/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/qldb/versions/40f98f4993d2/schema)
