Installation and usage of the platform

REST API: node licenses

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

The Waves Enterprise blockchain platform has a group of licenses methods to work with licenses:

GET /licenses

The method returns information about all loaded licenses.

The response for each license includes a license dataset, which contains the parameters specified in the license file received from Waves Enterprise.

Response example for one license:

Ответ GET /licenses:
[
  {
    "license": {
      "version": 1,
      "id": "a3d0d17e-eb05-45ac-906c-da847a9d726d",
      "issued_at": "2021-01-28T15:39:59.456Z",
      "node_owner_address": "3JNFkQ2cVu7ndEHLCs9A5HT63jSi1TV3mWK",
      "valid_after": "2021-01-29",
      "valid_before": "2022-11-20",
      "features": [
        "all_inclusive"
      ]
    },
    "signer_public_key": "p9HrAcGytSBxixJnQXQ87SNXPoXTdnwRzo4FMFvvbNSPzCToqdpJrcgFP6wxmsG23wBfYzcth",
    "signature": "jNjwCXdMPxmdaibXtjYSd8WocFinXKNsrTdPkbWrPTkQstswBp9SHFe",
    "signer_id": "2WDmdaibXtjYSd8WocFinX"
  }
]

GET /licenses/status

The method returns the activation status of the node license.

The response includes the following data:

  • status - license activation status: * TRIAL - trial license active (maximum blockchain height - 30000 blocks), no valid licenses at the end of the trial period; * TRIAL_EXPIRED - trial license expired, no valid licenses; * ACTIVE - valid license active at the request; * PENDING - no active license at the request, a valid license starting at a later date: this status arrives at the end of the trial period if there is a valid license with a later start date; * EXPIRED - there is a valid license with a later start date at the time of the request has expired, there are no valid licenses with a later start date.

  • description - a brief description of the status, the remaining number of blocks or the expiration date of the active license.

Response example:

Ответ GET /licenses/status:
{
  "status" : "TRIAL",
  "description" : "Trial period is active. Blocks before expiration: 23412"
}

POST /licenses/upload

The method adds a new license for the node. The parameters that are passed in JSON format in the request are specified in the file provided by Waves Enterprise specialists when executing the license.

Query example:

Запрос POST /licenses/upload:
{
  "license": {
    "version": 1,
    "id": "a3d0d17e-eb05-45ac-906c-da847a9d726d",
    "issued_at": "2021-01-28T15:39:59.456Z",
    "node_owner_address": "3JNFkQ2cVu7ndEHLCs9A5HT63jSi1TV3mWK",
    "valid_after": "2021-01-29",
    "valid_before": "2022-11-20",
    "features": [
      "all_inclusive"
    ]
  },
  "signer_public_key": "p9HrAcGytSBxixJnQXQ87SNXPoXTdnwRzo4FMFvvbNSPzCToqdpJrcgFP6wxmsG23wBfYzcth",
  "signature": "jNjwCXdMPxmdaibXtjYSd8WocFinXKNsrTdPkbWrPTkQstswBp9SHFe",
  "signer_id": "2WDmdaibXtjYSd8WocFinX"
}

Response example:

Ответ POST /licenses/upload:
{
    "message": "License upload successfully"
}

DELETE ​/licenses​/{license_id}

The method deletes the loaded license by its identifier {license_id}. The license identifier is specified in the license file that you will receive from the Waves Enterprise specialists and in the response of the GET /licenses method.

Response example:

Ответ DELETE ​/licenses​/{license_id}:
{
  "message": "License removed successfully"
}
See also