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 node whose address or alias is passed as {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 roles (permissions) of the participant whose address or alias is specified as {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 or aliases 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
}

GET permissions/contract-validators

The method returns a list of member addresses with the contract_validator role at the current height.

Response example:

GET permissions/contract-validators:
{"addresses":

  ["3MqtxeditbhzQgsacp3wHgqBUHy6NZRfu4r","3NC1yzCd6MwprcXbqZAqjicXiryofpxQMwo","3NCzThL6uRzBYAhF8YBs1n8y2wT4KCAVGYA","3MxYvon6fbNonaJ1Vhun3hU6BSmiuCJRFgQ","3MuwvZifNZZ9Y197i1NHuoUBtXe6KSyjAKQ","3N1ojYLdheCzhBWi9UFTc6DgboHmkCjXnsZ","3N7LcRz5rkEupTFEmkrnwNcvJRWyc8g4Lf7","3N1rxLXia8t7zeLJbPhP2DQPuMu4fyNivry","3NB8PDMLAmU68fZkrtWiRg5vbRo1vPXi4XV","3MxuvmPMrBnGLXMLK4a3cHo9b8C1DjepppE","3NBKpghU6LLVCQ9YnuSELK1tsmpAsqW47tM"]

}

GET permissions/contract-validators/{height}

The method returns a list of member addresses with the contract_validator role at the given height. It is verified that the passed height value is greater than 0 and less than the current blockchain height.

Response example:

GET permissions/contract-validators/{height}:
{"addresses":

  ["3MqtxeditbhzQgsacp3wHgqBUHy6NZRfu4r","3NC1yzCd6MwprcXbqZAqjicXiryofpxQMwo","3NCzThL6uRzBYAhF8YBs1n8y2wT4KCAVGYA","3MxYvon6fbNonaJ1Vhun3hU6BSmiuCJRFgQ","3MuwvZifNZZ9Y197i1NHuoUBtXe6KSyjAKQ","3N1ojYLdheCzhBWi9UFTc6DgboHmkCjXnsZ","3N7LcRz5rkEupTFEmkrnwNcvJRWyc8g4Lf7","3N1rxLXia8t7zeLJbPhP2DQPuMu4fyNivry","3NB8PDMLAmU68fZkrtWiRg5vbRo1vPXi4XV","3MxuvmPMrBnGLXMLK4a3cHo9b8C1DjepppE","3NBKpghU6LLVCQ9YnuSELK1tsmpAsqW47tM"]

}
See also