---
title: "Execute view function of a module"
method: POST
path: "/view"
tags: ["View"]
---

# Execute view function of a module

`POST /view`

Execute the Move function with the given parameters and return its execution result.

The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.

## Query parameters

- `ledger_version` string, uint64 — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

## Request body

- ViewRequest — View request for the Move View Function API
  - `function` string, required — Entry function id is string representation of a entry function defined on-chain. Format: `{address}::{module name}::{function name}` Both `module name` and `function name` are case-sensitive.
  - `type_arguments` MoveType[], required — Type arguments of the function
  - `arguments` unknown[], required — Arguments of the function
    - unknown

## Response `200`

- MoveValue[]
  - union — An enum of the possible Move value types
    - integer — Move u8 value
    - integer — Move u16 value
    - integer — Move u32 value
    - string, uint64 — Move u64 value
    - string, uint128 — Move u128 value
    - string, uint256 — Move u256 value
    - boolean — Move bool value
    - string, hex — Move address value
    - unknown[] — Move vector value
      - unknown
    - string, hex — Move bytes value
    - object — Move struct value
    - string — Move string value

## Other responses

- `400`
- `403`
- `404`
- `410`
- `500`
- `503`

---

[API](https://skmtc.dev/aptos/apis/aptos-node-api.md) · [All operations](https://skmtc.dev/aptos/apis/aptos-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aptos/aptos-node-api/revisions/811ada792a7a/schema)
