# Get State Path For Commitment

## **ENDPOINT**

```
GET https://api.data123.io/aleo/<API KEY>/v1/testnet3/statePath/{commitment}
```

### **Arguments**

<table><thead><tr><th width="198">Parameter</th><th width="113">Type</th><th width="119">Request</th><th>Description</th></tr></thead><tbody><tr><td>commitment</td><td>string</td><td>Yes</td><td>The record commitment in the best valid chain</td></tr></tbody></table>

### **Response**

|       Parameter       |  Type  |                Description                |
| :-------------------: | :----: | :---------------------------------------: |
|  `global_state_root`  | string |           The global state root           |
|      `block_path`     | string |     The Merkle path for the block hash    |
|      `block_hash`     | string |               The block hash              |
| `previous_block_hash` | string |          The previous block hash          |
|     `header_root`     | string |           The block header root           |
|     `header_path`     | string | The Merkle path for the block header leaf |
|     `header_leaf`     | string |           The block header leaf           |
|  `transactions_path`  | string |   The Merkle path for the transaction ID  |
|    `transaction_id`   | string |             The transaction ID            |
|   `transaction_path`  | string |  The Merkle path for the transaction leaf |
|   `transaction_leaf`  | string |            The transaction leaf           |
|   `transition_path`   | string |  The Merkle path for the transition leaf  |
|   `transition_leaf`   | string |            The transition leaf            |

### Request

{% tabs %}
{% tab title="REST" %}

```bash
curl https://api.data123.io/aleo/<API KEY>/v1/testnet3/statePath/{commitment}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.data123.io/reference/api-reference/aleo/rpc-methods/get-state-path-for-commitment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
