Skip to content

Commit fba38f7

Browse files
committed
[DOCS] Updates data frame APIs to use API template (#43610)
1 parent 75cabc5 commit fba38f7

7 files changed

+201
-141
lines changed

docs/reference/data-frames/apis/delete-transform.asciidoc

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,38 @@ beta[]
1212

1313
Deletes an existing {dataframe-transform}.
1414

15-
16-
==== Request
15+
[discrete]
16+
[[delete-data-frame-transform-request]]
17+
==== {api-request-title}
1718

1819
`DELETE _data_frame/transforms/<data_frame_transform_id>`
1920

20-
==== Description
21-
22-
NOTE: Before you can delete the {dataframe-transform}, you must stop it.
23-
24-
==== Path Parameters
25-
26-
`data_frame_transform_id` (required)::
27-
(string) Identifier for the {dataframe-transform}.
28-
29-
==== Authorization
21+
[discrete]
22+
[[delete-data-frame-transform-prereqs]]
23+
==== {api-prereq-title}
3024

3125
If the {es} {security-features} are enabled, you must have
3226
`manage_data_frame_transforms` cluster privileges to use this API. The built-in
3327
`data_frame_transforms_admin` role has these privileges. For more information,
3428
see {stack-ov}/security-privileges.html[Security privileges] and
3529
{stack-ov}/built-in-roles.html[Built-in roles].
3630

37-
==== Examples
31+
[discrete]
32+
[[delete-data-frame-transform-desc]]
33+
==== {api-description-title}
34+
35+
NOTE: Before you can delete the {dataframe-transform}, you must stop it.
36+
37+
[discrete]
38+
[[delete-data-frame-transform-path-parms]]
39+
==== {api-path-parms-title}
40+
41+
`<data_frame_transform_id>` (Required)::
42+
(string) Identifier for the {dataframe-transform}.
3843

39-
The following example deletes the `ecommerce_transform` {dataframe-transform}:
44+
[discrete]
45+
[[delete-data-frame-transform-examples]]
46+
==== {api-example-title}
4047

4148
[source,js]
4249
--------------------------------------------------

docs/reference/data-frames/apis/get-transform-stats.asciidoc

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ beta[]
1212

1313
Retrieves usage information for {dataframe-transforms}.
1414

15-
16-
==== Request
15+
[discrete]
16+
[[get-data-frame-transform-stats-request]]
17+
==== {api-request-title}
1718

1819

1920
`GET _data_frame/transforms/<data_frame_transform_id>/_stats`
@@ -26,39 +27,52 @@ Retrieves usage information for {dataframe-transforms}.
2627

2728
`GET _data_frame/transforms/*/_stats` +
2829

29-
//===== Description
30+
[discrete]
31+
[[get-data-frame-transform-stats-prereqs]]
32+
==== {api-prereq-title}
33+
34+
If the {es} {security-features} are enabled, you must have
35+
`monitor_data_frame_transforms` cluster privileges to use this API. The built-in
36+
`data_frame_transforms_user` role has these privileges. For more information,
37+
see {stack-ov}/security-privileges.html[Security privileges] and
38+
{stack-ov}/built-in-roles.html[Built-in roles].
39+
40+
//[discrete]
41+
//[[get-data-frame-transform-stats-desc]]
42+
//===== {api-description-title}
3043

31-
==== Path Parameters
44+
[discrete]
45+
[[get-data-frame-transform-stats-path-parms]]
46+
==== {api-path-parms-title}
3247

33-
`data_frame_transform_id`::
48+
`<data_frame_transform_id>` (Optional)::
3449
(string) Identifier for the {dataframe-transform}. It can be a
3550
{dataframe-transform} identifier or a wildcard expression. If you do not
3651
specify one of these options, the API returns information for all
3752
{dataframe-transforms}.
53+
54+
[discrete]
55+
[[get-data-frame-transform-stats-query-parms]]
56+
==== {api-query-parms-title}
3857

39-
`from`::
58+
`from` (Optional)::
4059
(integer) Skips the specified number of {dataframe-transforms}. The
4160
default value is `0`.
4261

43-
`size`::
44-
(integer) Specifies the maximum number of {dataframe-transforms} to obtain. The default value is `100`.
62+
`size` (Optional)::
63+
(integer) Specifies the maximum number of {dataframe-transforms} to obtain.
64+
The default value is `100`.
4565

46-
==== Results
47-
48-
The API returns the following information:
66+
[discrete]
67+
[[get-data-frame-transform-stats-response]]
68+
==== {api-response-body-title}
4969

5070
`transforms`::
5171
(array) An array of statistics objects for {dataframe-transforms}, which are
5272
sorted by the `id` value in ascending order.
5373

54-
==== Authorization
55-
56-
If the {es} {security-features} are enabled, you must have
57-
`monitor_data_frame_transforms` cluster privileges to use this API. The built-in
58-
`data_frame_transforms_user` role has these privileges. For more information,
59-
see {stack-ov}/security-privileges.html[Security privileges] and
60-
{stack-ov}/built-in-roles.html[Built-in roles].
61-
74+
[discrete]
75+
[[get-data-frame-transform-stats-example]]
6276
==== Examples
6377

6478
The following example skips for the first five {dataframe-transforms} and

docs/reference/data-frames/apis/get-transform.asciidoc

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ beta[]
1212

1313
Retrieves configuration information for {dataframe-transforms}.
1414

15-
16-
==== Request
15+
[discrete]
16+
[[get-data-frame-transform-request]]
17+
==== {api-request-title}
1718

1819
`GET _data_frame/transforms/<data_frame_transform_id>` +
1920

@@ -25,40 +26,49 @@ Retrieves configuration information for {dataframe-transforms}.
2526

2627
`GET _data_frame/transforms/*`
2728

28-
//===== Description
29+
[discrete]
30+
[[get-data-frame-transform-prereqs]]
31+
==== {api-prereq-title}
32+
33+
If the {es} {security-features} are enabled, you must have
34+
`monitor_data_frame_transforms` cluster privileges to use this API. The built-in
35+
`data_frame_transforms_user` role has these privileges. For more information,
36+
see {stack-ov}/security-privileges.html[Security privileges] and
37+
{stack-ov}/built-in-roles.html[Built-in roles].
2938

30-
==== Path Parameters
39+
[discrete]
40+
[[get-data-frame-transform-path-parms]]
41+
==== {api-path-parms-title}
3142

32-
`data_frame_transform_id`::
43+
`<data_frame_transform_id>` (Optional)::
3344
(string) Identifier for the {dataframe-transform}. It can be a
3445
{dataframe-transform} identifier or a wildcard expression. If you do not
3546
specify one of these options, the API returns information for all
3647
{dataframe-transforms}.
48+
49+
[discrete]
50+
[[get-data-frame-transform-query-parms]]
51+
==== {api-query-parms-title}
3752

38-
`from`::
53+
`from` (Optional)::
3954
(integer) Skips the specified number of {dataframe-transforms}. The
4055
default value is `0`.
4156

42-
`size`::
43-
(integer) Specifies the maximum number of {dataframe-transforms} to obtain. The default value is `100`.
44-
45-
==== Results
57+
`size` (Optional)::
58+
(integer) Specifies the maximum number of {dataframe-transforms} to obtain.
59+
The default value is `100`.
4660

47-
The API returns the following information:
61+
[discrete]
62+
[[get-data-frame-transform-response]]
63+
==== {api-response-body-title}
4864

4965
`transforms`::
5066
(array) An array of transform resources, which are sorted by the `id` value in
5167
ascending order.
5268

53-
==== Authorization
54-
55-
If the {es} {security-features} are enabled, you must have
56-
`monitor_data_frame_transforms` cluster privileges to use this API. The built-in
57-
`data_frame_transforms_user` role has these privileges. For more information,
58-
see {stack-ov}/security-privileges.html[Security privileges] and
59-
{stack-ov}/built-in-roles.html[Built-in roles].
60-
61-
==== Examples
69+
[discrete]
70+
[[get-data-frame-transform-example]]
71+
==== {api-example-title}
6272

6373
The following example retrieves information about a maximum of ten transforms:
6474

docs/reference/data-frames/apis/preview-transform.asciidoc

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,15 @@ beta[]
1212

1313
Previews a {dataframe-transform}.
1414

15-
16-
==== Request
15+
[discrete]
16+
[[preview-data-frame-transform-request]]
17+
==== {api-request-title}
1718

1819
`POST _data_frame/transforms/_preview`
1920

20-
//==== Description
21-
//==== Path Parameters
22-
23-
==== Request Body
24-
25-
`source`:: The source index or index pattern.
26-
27-
`pivot`:: Defines the pivot function `group by` fields and the aggregation to
28-
reduce the data.
29-
30-
==== Authorization
21+
[discrete]
22+
[[preview-data-frame-transform-prereq]]
23+
==== {api-prereq-title}
3124

3225
If the {es} {security-features} are enabled, you must have
3326
`manage_data_frame_transforms` cluster privileges to use this API. The built-in
@@ -37,10 +30,19 @@ If the {es} {security-features} are enabled, you must have
3730
{stack-ov}/security-privileges.html[Security privileges] and
3831
{stack-ov}/built-in-roles.html[Built-in roles].
3932

40-
==== Examples
33+
[discrete]
34+
[[preview-data-frame-transform-request-body]]
35+
==== {api-request-body-title}
36+
37+
`source` (Required)::
38+
(object) The source index or index pattern.
39+
40+
`pivot` (Required)::
41+
(object) Defines the pivot function `group by` fields and the aggregation to
42+
reduce the data. See <<data-frame-transform-pivot>>.
4143

42-
The following example obtains a preview of a {dataframe-transform} on the {kib}
43-
eCommerce sample data:
44+
[discrete]
45+
==== {api-example-title}
4446

4547
[source,js]
4648
--------------------------------------------------

docs/reference/data-frames/apis/put-transform.asciidoc

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,54 +12,65 @@ beta[]
1212

1313
Instantiates a {dataframe-transform}.
1414

15-
16-
==== Request
15+
[discrete]
16+
[[put-data-frame-transform-request]]
17+
==== {api-request-title}
1718

1819
`PUT _data_frame/transforms/<data_frame_transform_id>`
1920

20-
===== Description
21+
[discrete]
22+
[[put-data-frame-transform-prereqs]]
23+
==== {api-prereq-title}
24+
25+
If the {es} {security-features} are enabled, you must have
26+
`manage_data_frame_transforms` cluster privileges to use this API. The built-in
27+
`data_frame_transforms_admin` role has these privileges. You must also
28+
have `read` and `view_index_metadata` privileges on the source index and `read`,
29+
`create_index`, and `index` privileges on the destination index. For more
30+
information, see {stack-ov}/security-privileges.html[Security privileges] and
31+
{stack-ov}/built-in-roles.html[Built-in roles].
32+
33+
34+
[discrete]
35+
[[put-data-frame-transform-desc]]
36+
===== {api-description-title}
2137

2238
IMPORTANT: You must use {kib} or this API to create a {dataframe-transform}.
2339
Do not put a {dataframe-transform} directly into any
2440
`.data-frame-internal*` indices using the Elasticsearch index API.
2541
If {es} {security-features} are enabled, do not give users any
2642
privileges on `.data-frame-internal*` indices.
2743

28-
==== Path Parameters
44+
[discrete]
45+
[[put-data-frame-transform-path-parms]]
46+
==== {api-path-parms-title}
2947

30-
`data_frame_transform_id` (required)::
48+
`<data_frame_transform_id>` (Required)::
3149
(string) Identifier for the {dataframe-transform}. This identifier can contain
3250
lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It
3351
must start and end with alphanumeric characters.
3452

53+
[discrete]
54+
[[put-data-frame-transform-request-body]]
55+
==== {api-request-body-title}
3556

36-
==== Request Body
37-
38-
`source` (required):: (object) The source configuration, consisting of `index` and optionally
39-
a `query`.
57+
`description` (Optional)::
58+
(string) Free text description of the {dataframe-transform}.
4059

41-
`dest` (required):: (object) The destination configuration, consisting of `index`.
60+
`dest` (Required)::
61+
(object) The destination configuration, consisting of `index`.
4262

43-
`pivot`:: (object) Defines the pivot function `group by` fields and the aggregation to
44-
reduce the data. See <<data-frame-transform-pivot, data frame transform pivot objects>>.
45-
46-
`description`:: Optional free text description of the data frame transform
47-
48-
49-
==== Authorization
50-
51-
If the {es} {security-features} are enabled, you must have
52-
`manage_data_frame_transforms` cluster privileges to use this API. The built-in
53-
`data_frame_transforms_admin` role has these privileges. You must also
54-
have `read` and `view_index_metadata` privileges on the source index and `read`,
55-
`create_index`, and `index` privileges on the destination index. For more
56-
information, see {stack-ov}/security-privileges.html[Security privileges] and
57-
{stack-ov}/built-in-roles.html[Built-in roles].
63+
`pivot` (Optional)::
64+
(object) Defines the pivot function `group by` fields and the aggregation to
65+
reduce the data. See <<data-frame-transform-pivot>>.
5866

59-
==== Examples
67+
`source` (Required)::
68+
(object) The source configuration, which consists of `index` and optionally
69+
a `query`.
6070

61-
The following example creates a {dataframe-transform} for the {kib} eCommerce
62-
sample data:
71+
[discrete]
72+
[[put-data-frame-transform-example]]
73+
==== {api-example-title}
6374

6475
[source,js]
6576
--------------------------------------------------

0 commit comments

Comments
 (0)