Query parameters

  • acknowledgeboolean

    Specifies whether you acknowledge the license changes.

  • master_timeoutstring

    The period to wait for a connection to the master node.

    Values are -1 or 0.

  • timeoutstring

    The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

    Values are -1 or 0.

application/json

Body

  • licenseobject
    Hide license attributes Show license attributes object
    • expiry_date_in_millisnumber

      Time unit for milliseconds

    • issue_date_in_millisnumber

      Time unit for milliseconds

    • start_date_in_millisnumber

      Time unit for milliseconds

    • issued_tostring Required
    • issuerstring Required
    • max_nodesnumber | string | null

    • max_resource_unitsnumber
    • signaturestring Required
    • typestring Required

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

    • uidstring Required
  • licensesarray[object]

    A sequence of one or more JSON documents containing the license information.

    Hide licenses attributes Show licenses attributes object
    • expiry_date_in_millisnumber

      Time unit for milliseconds

    • issue_date_in_millisnumber

      Time unit for milliseconds

    • start_date_in_millisnumber

      Time unit for milliseconds

    • issued_tostring Required
    • issuerstring Required
    • max_nodesnumber | string | null

    • max_resource_unitsnumber
    • signaturestring Required
    • typestring Required

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

    • uidstring Required

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • acknowledgeobject
      Hide acknowledge attributes Show acknowledge attributes object
      • licensearray[string] Required
      • messagestring Required
    • acknowledgedboolean Required
    • license_statusstring Required

      Values are active, valid, invalid, or expired.

POST /_license
PUT _license
{
  "licenses": [
    {
      "uid":"893361dc-9749-4997-93cb-802e3d7fa4xx",
      "type":"basic",
      "issue_date_in_millis":1411948800000,
      "expiry_date_in_millis":1914278399999,
      "max_nodes":1,
      "issued_to":"issuedTo",
      "issuer":"issuer",
      "signature":"xx"
    }
    ]
}
curl \
 --request POST 'http://api.example.com/_license' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '"{\n  \"licenses\": [\n    {\n      \"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n      \"type\":\"basic\",\n      \"issue_date_in_millis\":1411948800000,\n      \"expiry_date_in_millis\":1914278399999,\n      \"max_nodes\":1,\n      \"issued_to\":\"issuedTo\",\n      \"issuer\":\"issuer\",\n      \"signature\":\"xx\"\n    }\n    ]\n}"'
Request example
Run `PUT _license` to update to a basic license. NOTE: These values are invalid; you must substitute the appropriate contents from your license file.
{
  "licenses": [
    {
      "uid":"893361dc-9749-4997-93cb-802e3d7fa4xx",
      "type":"basic",
      "issue_date_in_millis":1411948800000,
      "expiry_date_in_millis":1914278399999,
      "max_nodes":1,
      "issued_to":"issuedTo",
      "issuer":"issuer",
      "signature":"xx"
    }
    ]
}
Response examples (200)
If you update to a basic license and you previously had a license with more features, you receive this type of response. You must re-submit the API request and set the `acknowledge` parameter to `true`.
{
  "acknowledged": false,
  "license_status": "valid",
  "acknowledge": {
    "message": "\"\"\"This license update requires acknowledgement. To acknowledge the license, please read the following messages and update the license again, this time with the \"acknowledge=true\" parameter:\"\"\"",
    "watcher": [
      "Watcher will be disabled"
    ],
    "logstash": [
      "Logstash will no longer poll for centrally-managed pipelines"
    ],
    "security": [
      "The following X-Pack security functionality will be disabled ..."
    ]
  }
}