Permissions

https://img.shields.io/badge/auth-required-orange.svg

Hint

The rules for generating queries to the node are given in module How to use the REST API.

GET /permissions/{address}

Returns roles (permissions) assigned to specified address {address} which are valid at the moment.

Method Response:

{
    "roles": [
        {
        "role": "miner"
        },
        {
        "role": "permissioner"
        }
    ],
    "timestamp": 1544703449430
}

GET /permissions/{address}/at/{timestamp}

Returns roles (permissions) assigned to specified address {address} which are valid at the moment {timestamp}.

Method Response:

{
    "roles": [
        {
        "role": "miner"
        },
        {
        "role": "permissioner"
        }
    ],
    "timestamp": 1544703449430
}

POST /permissions/addresses

Returns roles (permissions) assigned to specified address list which are valid at the moment.

Method Query:

{
    "addresses": [
        "3N2cQFfUDzG2iujBrFTnD2TAsCNohDxYu8w", "3Mx5sDq4NXef1BRzJRAofa3orYFxLanxmd7"
    ],
    "timestamp": 1544703449430
}

Method Response:

{
    "addressToRoles": [
        {
        "address": "3N2cQFfUDzG2iujBrFTnD2TAsCNohDxYu8w",
        "roles": [
            {
            "role": "miner"
            },
            {
            "role": "permissioner"
            }
        ]
        },
        {
        "address": "3Mx5sDq4NXef1BRzJRAofa3orYFxLanxmd7",
        "roles": [
            {
            "role": "miner"
            }
        ]
        }
    ],
    "timestamp": 1544703449430
}