Get license information Generally available

GET /_license

Get information about your Elastic license including its type, its status, when it was issued, and when it expires.


If the master node is generating a new cluster state, the get license API may return a 404 Not Found response. If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request.

Query parameters

  • accept_enterprise boolean Deprecated

    If true, this parameter returns enterprise for Enterprise license types. If false, this parameter returns platinum for both platinum and enterprise license types. This behavior is maintained for backwards compatibility. This parameter is deprecated and will always be set to true in 8.x.

  • local boolean

    Specifies whether to retrieve local information. From 9.2 onwards the default value is true, which means the information is retrieved from the responding node. In earlier versions the default is false, which means the information is retrieved from the elected master node.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • license object Required
      Hide license attributes Show license attributes object
      • expiry_date string | number

        The date and time the license expires in ISO 8601 format.

        One of:

        Time unit for milliseconds

      • expiry_date_in_millis number

        Time unit for milliseconds

      • issue_date string | number

        The date and time the license was issued in ISO 8601 format.

        One of:

        Time unit for milliseconds

      • issue_date_in_millis number

        Time unit for milliseconds

      • issued_to string Required

        The name of the customer or organization that received the license.

      • issuer string Required

        The name of the organization that issued the license.

      • max_nodes number | string | null Required

        The maximum number of nodes the license allows.

      • max_resource_units number | string | null

        The maximum number of resource units the license allows (for enterprise licenses only).

      • status string Required

        The status of the license. For example,active, valid, invalid, or expired.

        Values are active, valid, invalid, or expired.

      • type string Required

        The type of the license. For example, trial, basic, gold, platinum, or enterprise.

        Values are missing, trial, basic, standard, dev, silver, gold, platinum, or enterprise.

      • uid string Required

        The unique identifier of the license.

      • start_date_in_millis number

        Time unit for milliseconds

GET /_license
GET /_license
resp = client.license.get()
const response = await client.license.get();
response = client.license.get
$resp = $client->license()->get();
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_license"
client.license().get(g -> g);
Response examples (200)
A successful response from `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,
    "max_resource_units" : null,
    "issued_to" : "test",
    "issuer" : "elasticsearch",
    "start_date_in_millis" : -1
  }
}