Data

Get KeyValueStore Data

Returns data (value) associated with a given key of a given key-value store. Check detailed documentation for explanation

post

/state/key-value-store/data

Header parameters
api-keystringrequired
Body
at_ledger_statenullable object

Optional. This allows for a request to be made against a historic state. If a constraint is specified, the Gateway will resolve the request against the ledger state at that time. If not specified, requests will be made with respect to the top of the committed ledger.

key_value_store_addressstringrequired

Bech32m-encoded human readable version of the address.

keysobject[]required

limited to max 100 items.

Responses
curl -L \
  --request POST \
  --url 'https://xrd-gateway.nownodes.io/state/key-value-store/data' \
  --header 'api-key: text' \
  --header 'Content-Type: application/json' \
  --data '{"key_value_store_address":"<key-value-store-address>","keys":[{"key_hex":"5C21010901000000"},{"key_json":{"kind":"Tuple","fields":[{"kind":"U32","value":"1"}]}}]}'
{
  "ledger_state": {
    "network": "mainnet",
    "state_version": 1,
    "proposer_round_timestamp": "text",
    "epoch": 1,
    "round": 1
  },
  "key_value_store_address": "text",
  "entries": [
    {
      "key": {
        "raw_hex": "text",
        "programmatic_json": {
          "kind": "Bool",
          "type_name": "text",
          "field_name": "text"
        }
      },
      "value": {
        "raw_hex": "text",
        "programmatic_json": {
          "kind": "Bool",
          "type_name": "text",
          "field_name": "text"
        }
      },
      "last_updated_at_state_version": 1,
      "is_locked": true
    }
  ]
}