123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- [role="xpack"]
- [testenv="basic"]
- [[get-license]]
- === Get license API
- ++++
- <titleabbrev>Get license</titleabbrev>
- ++++
- This API enables you to retrieve licensing information.
- [discrete]
- ==== Request
- `GET /_license`
- [discrete]
- ==== 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.
- [discrete]
- ==== 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.
- [discrete]
- ==== Authorization
- You must have `monitor` cluster privileges to use this API.
- For more information, see <<security-privileges>>.
- [discrete]
- ==== Examples
- The following example provides information about a trial license:
- [source,console]
- --------------------------------------------------
- GET /_license
- --------------------------------------------------
- [source,console-result]
- --------------------------------------------------
- {
- "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,
- "max_resource_units" : null,
- "issued_to" : "test",
- "issuer" : "elasticsearch",
- "start_date_in_millis" : -1
- }
- }
- --------------------------------------------------
- // TESTRESPONSE[s/"cbff45e7-c553-41f7-ae4f-9205eabd80xx"/$body.license.uid/]
- // TESTRESPONSE[s/"basic"/$body.license.type/]
- // 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/]
- // TESTRESPONSE[s/1000/$body.license.max_nodes/]
- // TESTRESPONSE[s/"test"/$body.license.issued_to/]
- // TESTRESPONSE[s/"elasticsearch"/$body.license.issuer/]
|