Installation and usage of the platform

REST API: information about permissions of participants

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

The methods of the permissions group are used to obtain information about the roles of participants on the network.

For more information on participant permissions, see the article Permissions.

GET /permissions/{address}

The method returns information about the active permissions of the {address}, as well as the request generation time in Unix Timestamp format (in milliseconds).

Response example:

GET /permissions/{address}:
{
  "roles": [
      {
      "role": "miner"
      },
      {
      "role": "permissioner"
      }
  ],
  "timestamp": 1544703449430
}

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

The method returns information about participant roles of an {address}, active for a {timestamp}. The time is specified in Unix Timestamp format (in milliseconds).

Response example:

GET /permissions/{address}/at/{timestamp}:
{
  "roles": [
      {
      "role": "miner"
      },
      {
      "role": "permissioner"
      }
  ],
  "timestamp": 1544703449430
}

POST /permissions/addresses

The method returns roles for multiple addresses that are active at the specified point in time.

The method query contains the following data:

  • addresses - list of addresses as an array of strings;

  • timestamp - Unix Timestamp (in milliseconds).

Example of a query with two addresses:

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

The method response returns an array of data addressToRoles, which contains the roles for each address as well as the timestamp.

Response example for two addresses:

POST /permissions/addresses:
{
    "addressToRoles": [
        {
        "address": "3N2cQFfUDzG2iujBrFTnD2TAsCNohDxYu8w",
        "roles": [
            {
              "role": "miner"
            },
            {
              "role": "permissioner"
            }
        ]
        },
        {
        "address": "3Mx5sDq4NXef1BRzJRAofa3orYFxLanxmd7",
        "roles": [
            {
              "role": "miner"
            }
        ]
        }
    ],
    "timestamp": 1544703449430
}
See also