OpenSearch/docs/en/rest-api/license/get-trial-status.asciidoc

53 lines
1.5 KiB
Plaintext

[role="xpack"]
[[get-trial-status]]
=== Get Trial Status API
This API enables you to check the status of your trial license.
[float]
==== Request
`GET _xpack/license/trial_status`
[float]
==== Description
If a license is not already registered for the cluster, one is generated when
the nodes start. By default, this is a 30-day trial license that gives access
to all {xpack} features.
NOTE: You are allowed to initiate a trial license only if your cluster has not
already activated a trial license for the current major X-Pack version. For
example, if you have already activated a trial for v6.0, you cannot start a new
trial until v7.0. You can, however, contact `info@elastic.co` to request an
extended trial license.
For more information about the different types of licenses, see
https://www.elastic.co/subscriptions.
==== Authorization
You must have `monitor` cluster privileges to use this API.
For more information, see
{xpack-ref}/security-privileges.html[Security Privileges].
[float]
==== Examples
The following example checks whether you are eligible to start a trial:
[source,js]
------------------------------------------------------------
GET _xpack/license/trial_status
------------------------------------------------------------
// CONSOLE
Example response:
[source,js]
------------------------------------------------------------
{
"eligible_to_start_trial": true
}
------------------------------------------------------------
// TESTRESPONSE[s/"eligible_to_start_trial": true/"eligible_to_start_trial": $body.eligible_to_start_trial/]