Get contract map entry

Retrieves a specific entry from a contract data map.


POST
/v2/map_entry/{contract_address}/{contract_name}/{map_name}

Path Parameters

contract_addressstring

Stacks address

contract_namestring

Contract name

map_namestring

Map name

Query Parameters

proof?integer

Returns object without the proof field when set to 0

tip?string

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Hex string serialization of the lookup key (which should be a Clarity value)

bodystring

Response Body

curl -X POST "http://localhost:20443/v2/map_entry/string/string/string?tip=string" \
  -H "Content-Type: application/json" \
  -d 'string'
const body = JSON.stringify("string")

fetch("http://localhost:20443/v2/map_entry/string/string/string?tip=string", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "http://localhost:20443/v2/map_entry/string/string/string?tip=string"
  body := strings.NewReader(`string`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:20443/v2/map_entry/string/string/string?tip=string"
body = "string"
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "data": "0x0a0c000000010a6d6f6e737465722d69640100000000000000000000000000000001",
  "proof": "0x123..."
}
Empty