2018-03-06 12:47:04 -05:00
|
|
|
[role="xpack"]
|
2018-06-20 11:17:11 -04:00
|
|
|
[testenv="basic"]
|
2018-03-06 12:47:04 -05:00
|
|
|
[[get-license]]
|
2018-12-20 13:23:28 -05:00
|
|
|
=== Get license API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Get license</titleabbrev>
|
|
|
|
++++
|
2018-03-06 12:47:04 -05:00
|
|
|
|
|
|
|
This API enables you to retrieve licensing information.
|
|
|
|
|
2020-07-23 12:42:33 -04:00
|
|
|
[discrete]
|
2018-03-06 12:47:04 -05:00
|
|
|
==== Request
|
|
|
|
|
2018-11-28 08:24:35 -05:00
|
|
|
`GET /_license`
|
2018-03-06 12:47:04 -05:00
|
|
|
|
2020-07-23 12:42:33 -04:00
|
|
|
[discrete]
|
2018-03-06 12:47:04 -05:00
|
|
|
==== Description
|
|
|
|
|
|
|
|
This API returns information about the type of license, when it was issued, and
|
|
|
|
when it expires, for example.
|
|
|
|
|
|
|
|
For more information about the different types of licenses, see
|
|
|
|
https://www.elastic.co/subscriptions.
|
|
|
|
|
|
|
|
|
2020-07-23 12:42:33 -04:00
|
|
|
[discrete]
|
2018-03-06 12:47:04 -05:00
|
|
|
==== Query Parameters
|
|
|
|
|
|
|
|
`local`::
|
|
|
|
(boolean) Specifies whether to retrieve local information. The default value
|
|
|
|
is `false`, which means the information is retrieved from the master node.
|
|
|
|
|
|
|
|
|
2020-07-23 12:42:33 -04:00
|
|
|
[discrete]
|
2018-03-06 12:47:04 -05:00
|
|
|
==== Authorization
|
|
|
|
|
|
|
|
You must have `monitor` cluster privileges to use this API.
|
2019-10-07 18:23:19 -04:00
|
|
|
For more information, see <<security-privileges>>.
|
2018-03-06 12:47:04 -05:00
|
|
|
|
|
|
|
|
2020-07-23 12:42:33 -04:00
|
|
|
[discrete]
|
2018-03-06 12:47:04 -05:00
|
|
|
==== Examples
|
|
|
|
|
2018-10-21 06:23:42 -04:00
|
|
|
The following example provides information about a trial license:
|
2018-03-06 12:47:04 -05:00
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2018-03-06 12:47:04 -05:00
|
|
|
--------------------------------------------------
|
2018-11-28 08:24:35 -05:00
|
|
|
GET /_license
|
2018-03-06 12:47:04 -05:00
|
|
|
--------------------------------------------------
|
|
|
|
|
2019-09-06 16:09:09 -04:00
|
|
|
[source,console-result]
|
2018-03-06 12:47:04 -05:00
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"license" : {
|
|
|
|
"status" : "active",
|
|
|
|
"uid" : "cbff45e7-c553-41f7-ae4f-9205eabd80xx",
|
2018-10-21 06:23:42 -04:00
|
|
|
"type" : "trial",
|
|
|
|
"issue_date" : "2018-10-20T22:05:12.332Z",
|
|
|
|
"issue_date_in_millis" : 1540073112332,
|
|
|
|
"expiry_date" : "2018-11-19T22:05:12.332Z",
|
|
|
|
"expiry_date_in_millis" : 1542665112332,
|
2018-03-06 12:47:04 -05:00
|
|
|
"max_nodes" : 1000,
|
|
|
|
"issued_to" : "test",
|
|
|
|
"issuer" : "elasticsearch",
|
|
|
|
"start_date_in_millis" : -1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// TESTRESPONSE[s/"cbff45e7-c553-41f7-ae4f-9205eabd80xx"/$body.license.uid/]
|
2018-06-20 11:17:11 -04:00
|
|
|
// TESTRESPONSE[s/"basic"/$body.license.type/]
|
2018-10-21 06:23:42 -04:00
|
|
|
// TESTRESPONSE[s/"2018-10-20T22:05:12.332Z"/$body.license.issue_date/]
|
|
|
|
// TESTRESPONSE[s/1540073112332/$body.license.issue_date_in_millis/]
|
|
|
|
// TESTRESPONSE[s/"2018-11-19T22:05:12.332Z"/$body.license.expiry_date/]
|
|
|
|
// TESTRESPONSE[s/1542665112332/$body.license.expiry_date_in_millis/]
|
2018-03-06 12:47:04 -05:00
|
|
|
// TESTRESPONSE[s/1000/$body.license.max_nodes/]
|
|
|
|
// TESTRESPONSE[s/"test"/$body.license.issued_to/]
|
|
|
|
// TESTRESPONSE[s/"elasticsearch"/$body.license.issuer/]
|