原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/get-license.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/get-license.html
本地英文版地址: ../en/get-license.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Get license APIedit
This API enables you to retrieve licensing information.
Requestedit
GET /_license
Descriptionedit
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.
Query Parametersedit
-
local -
(boolean) Specifies whether to retrieve local information. The default value
is
false, which means the information is retrieved from the master node. -
accept_enterprise -
(Boolean) If
true, this parameter returnsenterprisefor Enterprise license types. Iffalse, this parameter returnsplatinumfor bothplatinumandenterpriselicense types. This behavior is maintained for backwards compatibility.
Deprecated in 7.6.0.
This parameter is deprecated and will always be set to true in 8.x.
Authorizationedit
You must have monitor cluster privileges to use this API.
For more information, see Security privileges.
Examplesedit
The following example provides information about a trial license:
GET /_license
{
"license" : {
"status" : "active",
"uid" : "cbff45e7-c553-41f7-ae4f-9205eabd80xx",
"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,
"max_nodes" : 1000,
"issued_to" : "test",
"issuer" : "elasticsearch",
"start_date_in_millis" : -1
}
}