Resource preferences

Get Account resource preferences

Returns paginable collection of resource preference rules for given account.

POSThttps://xrd-gateway.nownodes.io/state/account/page/resource-preferences
Header parameters
Body
at_ledger_statenullable LedgerStateSelector (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.

cursornullable string

This cursor allows forward pagination, by providing the cursor from the previous request.

limit_per_pagenullable integer

The page size requested.

account_address*Address (string)

Bech32m-encoded human readable version of the address.

Response

Account resource preferences page

Body
ledger_state*LedgerState (object)

The ledger state against which the response was generated. Can be used to detect if the Network Gateway is returning up-to-date information.

total_countnullable integer (int64)

Total number of items in underlying collection, fragment of which is available in items collection.

next_cursornullable string

If specified, contains a cursor to query next page of the items collection.

items*array of AccountResourcePreferencesResponseItem (object)
account_address*Address (string)

Bech32m-encoded human readable version of the address.

Request
const response = await fetch('https://xrd-gateway.nownodes.io/state/account/page/resource-preferences', {
    method: 'POST',
    headers: {
      "api-key": "text",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "account_address": null
    }),
});
const data = await response.json();
Response
{
  "ledger_state": {
    "network": "mainnet",
    "state_version": 0,
    "proposer_round_timestamp": "text",
    "epoch": 0,
    "round": 0
  },
  "total_count": 0,
  "next_cursor": "text",
  "items": [
    {
      "resource_address": "text",
      "resource_preference_rule": "Allowed",
      "last_updated_at_state_version": 0
    }
  ],
  "account_address": "text"
}