Licenses¶
Hint
The rules for generating queries to the node are given in module How to use the REST API.
GET /licenses¶
Returns a list of all downloaded licenses.
Method Response:
[
{
"license": {
"version": 1,
"id": "3GLWx8yUFcNSL3DER8kZyE4TpyAyNiEYsKG",
"license_type": null,
"issued_at": "2020-02-27T16:11:14.784Z",
"node_owner_address": "4WnvQPit2Di1iYXDgDcXnJZ5yroKW54vauNoxdNeMi2g",
"valid_from": "2020-02-20",
"valid_to": "2020-02-27",
"features": [
"all_inclusive"
]
},
"signer_public_key": "dmLT1ippM7tmfSC8u9P4wU6sBgHXGYy6JYxCq1CCh8i",
"signature": "ff9b8af966b4c84e66d3847a514e65f55b2c1f63afcd8b708b9948a814cb8957mLT1ippM7tmfSC8u",
"signer_id": "ff9b8af966b4c84e66d3847a514e65f55b2c1f63afcd8b708b9948a814cb8957"
},
{
"license": {
"version": 1,
"id": "49KfHPJcKvSAvNKwM7CTofjKHzL87SaSx8eyADBjv5Wi",
"license_type": null,
"issued_at": "2020-02-27T16:12:34.327Z",
"node_owner_address": "3N4WaaaNAVLMQgVKTRSePgwBuAKvZTjAQbq",
"valid_from": "2020-02-29",
"valid_to": null,
"features": [
"all_inclusive"
]
},
"signer_public_key": "C1ADP1tNGuSLTiQrfNRPhgXx59nCrwrZFRV4AHpfKBpZ",
"signature": "5kwwE9sDZzssoNaoBSJnb8RLqfYGt1NDGbTWWXUeX8b9amRRJN3hr5fhs9vHBq6VES5ng4hqbCUoDEsoQNauRRts",
"signer_id": "8tdULCMr598Kn2dUaKwHkvsNyFbDB1Uj5NxvVRTQRnMQ"
}
]
GET /licenses/status¶
Returns the node license activation status
Method Response:
{
"status" : "TRIAL",
"description" : "Trial period is active. Blocks before expiration: '{num}'"
}
POST /licenses/upload¶
Adds a new license in JSON format in the node
Method request
{
"license": {
"version": 1,
"id": "49KfHPJcKvSAvNKwM7CTofjKHzL87SaSx8eyADBjv5Wi",
"license_type": null,
"issued_at": "2020-02-27T16:12:34.327Z",
"node_owner_address": "3N4WaaaNAVLMQgVKTRSePgwBuAKvZTjAQbq",
"valid_from": "2020-02-29",
"valid_to": null,
"features": [
"all_inclusive"
]
},
"signer_public_key": "C1ADP1tNGuSLTiQrfNRPhgXx59nCrwrZFRV4AHpfKBpZ",
"signature": "5kwwE9sDZzssoNaoBSJnb8RLqfYGt1NDGbTWWXUeX8b9amRRJN3hr5fhs9vHBq6VES5ng4hqbCUoDEsoQNauRRts",
"signer_id": "8tdULCMr598Kn2dUaKwHkvsNyFbDB1Uj5NxvVRTQRnMQ"
}
Method Response:
{
"message": "License upload successfully"
}