---
title: "Call a view function on a contract by Hname"
method: POST
path: "/requests/callview"
tags: ["requests"]
---

# Call a view function on a contract by Hname

`POST /requests/callview`

Execute a view call. Either use HName or Name properties. If both are supplied, HName are used.

## Request body

- ContractCallViewRequest
  - `arguments` JSONDict, required
    - `Items` Item[]
      - `key` string, string, required — key (hex-encoded)
      - `value` string, string, required — value (hex-encoded)
  - `chainId` string, string, required — The chain id
  - `contractHName` string, string, required — The contract name as HName (Hex)
  - `contractName` string, string, required — The contract name
  - `functionHName` string, string, required — The function name as HName (Hex)
  - `functionName` string, string, required — The function name

## Response `200`

Result

- JSONDict
  - `Items` Item[]
    - `key` string, string, required — key (hex-encoded)
    - `value` string, string, required — value (hex-encoded)

## Changes

- **2023-02-13** `1041f915f260` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/iotaledger/apis/wasp-api/changes/requests/callview/post.md)

---

[API](https://skmtc.dev/iotaledger/apis/wasp-api.md) · [All operations](https://skmtc.dev/iotaledger/apis/wasp-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/iotaledger/wasp-api/revisions/1041f915f260/schema)
