[DOCS] Reformat update license API docs (#48967)

Makes a few changes to better align the update license API docs with
the [API reference template][0].

Changes:

* Replaces POST with PUT in several snippet examples.
  While both are valid, PUT is a bit more RESTful.

* Removes leading slashes (/) from all snippets.

* Relocates and retitles the 'Authorization' section to 'Prerequisites'.

* Replaces explicit titles with the appropriate API reference template
  attributes.

* Replaces unneeded `[float]` tags with explicit anchors.

Closes #35341

[0]: https://github.com/elastic/docs/blob/master/shared/api-ref-ex.asciidoc
This commit is contained in:
James Rodewig 2019-11-14 07:59:56 -05:00
parent c46a0e8708
commit e1726fff56
1 changed files with 29 additions and 27 deletions

View File

@ -8,13 +8,25 @@
This API enables you to update your license.
[float]
==== Request
[[update-license-api-request]]
==== {api-request-title}
`PUT /_license`
`PUT _license`
[float]
==== Description
`POST _license`
[[update-license-api-prereqs]]
==== {api-prereq-title}
If {es} {security-features} are enabled, you need `manage` cluster privileges to
install the license.
If {es} {security-features} are enabled and you are installing a gold or platinum
license, you must enable TLS on the transport networking layer before you
install the license. See <<configuring-tls>>.
[[update-license-api-desc]]
==== {api-description-title}
You can update your license at runtime without shutting down your nodes.
License updates take effect immediately. If the license you are installing does
@ -25,39 +37,29 @@ request with the `acknowledge` parameter set to `true`.
For more information about the different types of licenses, see
https://www.elastic.co/subscriptions.
[float]
==== Query Parameters
[[update-license-api-query-params]]
==== {api-query-parms-title}
`acknowledge`::
(boolean) Specifies whether you acknowledge the license changes. The default
(Optional, boolean)
Specifies whether you acknowledge the license changes. The default
value is `false`.
[float]
==== Request Body
[[update-license-api-request-body]]
==== {api-request-body-title}
`licenses`::
(array) A sequence of one or more JSON documents containing the license
information.
(Required, array)
A sequence of one or more JSON documents containing the license information.
[float]
==== Authorization
If {es} {security-features} are enabled, you need `manage` cluster privileges to
install the license.
If {es} {security-features} are enabled and you are installing a gold or platinum
license, you must enable TLS on the transport networking layer before you
install the license. See <<configuring-tls>>.
[float]
==== Examples
[[update-license-api-example]]
==== {api-examples-title}
The following example updates to a basic license:
[source,console]
------------------------------------------------------------
POST /_license
PUT _license
{
"licenses": [
{
@ -133,7 +135,7 @@ To complete the update, you must re-submit the API request and set the
[source,console]
------------------------------------------------------------
POST /_license?acknowledge=true
PUT _license?acknowledge=true
{
"licenses": [
{