Skip to content

Commit c1146f1

Browse files
authored
[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
1 parent 736651a commit c1146f1

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

docs/reference/licensing/update-license.asciidoc

+29-27
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,25 @@
88

99
This API enables you to update your license.
1010

11-
[float]
12-
==== Request
11+
[[update-license-api-request]]
12+
==== {api-request-title}
1313

14-
`PUT /_license`
14+
`PUT _license`
1515

16-
[float]
17-
==== Description
16+
`POST _license`
17+
18+
[[update-license-api-prereqs]]
19+
==== {api-prereq-title}
20+
21+
If {es} {security-features} are enabled, you need `manage` cluster privileges to
22+
install the license.
23+
24+
If {es} {security-features} are enabled and you are installing a gold or platinum
25+
license, you must enable TLS on the transport networking layer before you
26+
install the license. See <<configuring-tls>>.
27+
28+
[[update-license-api-desc]]
29+
==== {api-description-title}
1830

1931
You can update your license at runtime without shutting down your nodes.
2032
License updates take effect immediately. If the license you are installing does
@@ -25,39 +37,29 @@ request with the `acknowledge` parameter set to `true`.
2537
For more information about the different types of licenses, see
2638
https://www.elastic.co/subscriptions.
2739

28-
[float]
29-
==== Query Parameters
40+
[[update-license-api-query-params]]
41+
==== {api-query-parms-title}
3042

3143
`acknowledge`::
32-
(boolean) Specifies whether you acknowledge the license changes. The default
44+
(Optional, boolean)
45+
Specifies whether you acknowledge the license changes. The default
3346
value is `false`.
3447

35-
[float]
36-
==== Request Body
48+
[[update-license-api-request-body]]
49+
==== {api-request-body-title}
3750

3851
`licenses`::
39-
(array) A sequence of one or more JSON documents containing the license
40-
information.
41-
42-
43-
[float]
44-
==== Authorization
45-
46-
If {es} {security-features} are enabled, you need `manage` cluster privileges to
47-
install the license.
48-
49-
If {es} {security-features} are enabled and you are installing a gold or platinum
50-
license, you must enable TLS on the transport networking layer before you
51-
install the license. See <<configuring-tls>>.
52+
(Required, array)
53+
A sequence of one or more JSON documents containing the license information.
5254

53-
[float]
54-
==== Examples
55+
[[update-license-api-example]]
56+
==== {api-examples-title}
5557

5658
The following example updates to a basic license:
5759

5860
[source,console]
5961
------------------------------------------------------------
60-
POST /_license
62+
PUT _license
6163
{
6264
"licenses": [
6365
{
@@ -133,7 +135,7 @@ To complete the update, you must re-submit the API request and set the
133135

134136
[source,console]
135137
------------------------------------------------------------
136-
POST /_license?acknowledge=true
138+
PUT _license?acknowledge=true
137139
{
138140
"licenses": [
139141
{

0 commit comments

Comments
 (0)