GET /v0/state/permission_links
stable
Fetches snapshots of any account’s linked authorizations on the blockchain, at any block height.
Usage
Sample request:
curl -H "Authorization: Bearer eyJhbGciOiJLTVNFUzI1Ni..." \
"https://eos.dfuse.eosnation.io/v0/state/permission_links?account=eoscanadacom&block_num=10000000"
fetch('https://eos.dfuse.eosnation.io/v0/state/permission_links?account=eoscanadacom&block_num=10000000', {
headers: {
'Authorization': 'Bearer eyJhbGciOiJLTVNFUzI1Ni...'
}
}).then(console.log)
headers = { 'Authorization' : 'Bearer eyJhbGciOiJLTVNFUzI1Ni...' }
r = requests.get('https://eos.dfuse.eosnation.io/v0/state/permission_links?account=eoscanadacom&block_num=10000000', headers=headers, verify=False)
j = json.loads(r.text)
print(json.dumps(j, indent=4))
req, err := http.NewRequest("GET", "https://eos.dfuse.eosnation.io/v0/state/permission_links?account=eoscanadacom&block_num=10000000", nil)
if err != nil {
// handle err
}
req.Header.Set("Authorization", "Bearer eyJhbGciOiJLTVNFUzI1Ni...")
resp, err := http.DefaultClient.Do(req)
if err != nil {
// handle err
}
defer resp.Body.Close()
Fetches snapshots of any account’s linked authorizations on the blockchain, at any block height.
Requesting past blocks
The block_num
parameter determines for which block you want a linked
authorizations snapshot. This can be anywhere in the chain’s history.
If the requested block_num
is irreversible, you will get an
immutable snapshot. If the block_num
is still in a reversible
chain, you will get a full consistent snapshot, but it is not
guaranteed to be the view that will pass irreversibility. Inspect the
returned up_to_block_id
parameter to understand from which longest
chain the returned value is a snapshot of.
Input parameters
Response
up_to_block_id
if present, provided as a convenience so you don’t need to extract it yourself.
block_num
, even though the irreversible block shown here is more recent.
last_irreversible_block_num
, provided as a convenience so you don’t need to extract it yourself.
contract
field and on action
when there is a tie at the contract
level.
Here is a sample response, for a request at block_num: 8
:
{
"up_to_block_id": "0000001000000000000000000000000000000000000000000000000000000000",
"up_to_block_num": 8,
"last_irreversible_block_id": "0000000400000000000000000000000000000000000000000000000000000000",
"last_irreversible_block_num": 4,
"linked_permissions": [
{
"contract": "eosio",
"action": "claimrewards",
"permission_name": "claimer"
}
]
}