1
0
Эх сурвалжийг харах

[DOCS] Updates data frame APIs to use API template (#43610)

Lisa Cawley 6 жил өмнө
parent
commit
0d05ec46c2

+ 21 - 14
docs/reference/data-frames/apis/delete-transform.asciidoc

@@ -12,21 +12,15 @@ beta[]
 
 Deletes an existing {dataframe-transform}.
 
-
-==== Request
+[discrete]
+[[delete-data-frame-transform-request]]
+==== {api-request-title}
 
 `DELETE _data_frame/transforms/<data_frame_transform_id>`
 
-==== Description
-
-NOTE: Before you can delete the {dataframe-transform}, you must stop it.
-
-==== Path Parameters
-
-`data_frame_transform_id` (required)::
-  (string) Identifier for the {dataframe-transform}.
-
-==== Authorization
+[discrete]
+[[delete-data-frame-transform-prereqs]]
+==== {api-prereq-title}
 
 If the {es} {security-features} are enabled, you must have
 `manage_data_frame_transforms` cluster privileges to use this API. The built-in
@@ -34,9 +28,22 @@ If the {es} {security-features} are enabled, you must have
 see {stack-ov}/security-privileges.html[Security privileges] and
 {stack-ov}/built-in-roles.html[Built-in roles].
 
-==== Examples
+[discrete]
+[[delete-data-frame-transform-desc]]
+==== {api-description-title}
+
+NOTE: Before you can delete the {dataframe-transform}, you must stop it.
+
+[discrete]
+[[delete-data-frame-transform-path-parms]]
+==== {api-path-parms-title}
+
+`<data_frame_transform_id>` (Required)::
+  (string) Identifier for the {dataframe-transform}.
 
-The following example deletes the `ecommerce_transform` {dataframe-transform}:
+[discrete]
+[[delete-data-frame-transform-examples]]
+==== {api-example-title}
 
 [source,js]
 --------------------------------------------------

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

@@ -12,8 +12,9 @@ beta[]
 
 Retrieves usage information for {dataframe-transforms}.
 
-
-==== Request
+[discrete]
+[[get-data-frame-transform-stats-request]]
+==== {api-request-title}
 
 
 `GET _data_frame/transforms/<data_frame_transform_id>/_stats`
@@ -26,45 +27,57 @@ Retrieves usage information for {dataframe-transforms}.
 
 `GET _data_frame/transforms/*/_stats` +
 
-//===== Description
+[discrete]
+[[get-data-frame-transform-stats-prereqs]]
+==== {api-prereq-title}
 
-==== Path Parameters
+If the {es} {security-features} are enabled, you must have
+`monitor_data_frame_transforms` cluster privileges to use this API. The built-in
+`data_frame_transforms_user` role has these privileges. For more information,
+see {stack-ov}/security-privileges.html[Security privileges] and
+{stack-ov}/built-in-roles.html[Built-in roles].
+
+//[discrete]
+//[[get-data-frame-transform-stats-desc]]
+//===== {api-description-title}
 
-`data_frame_transform_id`::
+[discrete]
+[[get-data-frame-transform-stats-path-parms]]
+==== {api-path-parms-title}
+
+`<data_frame_transform_id>` (Optional)::
   (string) Identifier for the {dataframe-transform}. It can be a
   {dataframe-transform} identifier or a wildcard expression. If you do not
   specify one of these options, the API returns information for all
   {dataframe-transforms}.
+  
+[discrete]
+[[get-data-frame-transform-stats-query-parms]]
+==== {api-query-parms-title}
 
-==== Query Parameters
+`allow_no_match` (Optional)::
+  (boolean) Whether to ignore if a wildcard expression matches no
+  {dataframe-transforms}. This includes `_all` string or when no transforms have
+  been specified. The default is `true`.
 
-`from`::
+`from` (Optional)::
     (integer) Skips the specified number of {dataframe-transforms}. The
     default value is `0`.
 
-`size`::
-    (integer) Specifies the maximum number of {dataframe-transforms} to obtain. The default value is `100`.
-
-`allow_no_match`::
-  (boolean) Whether to ignore if a wildcard expression matches no data frame transforms.
-  This includes `_all` string or when no transforms have been specified. The default is `true`.
+`size` (Optional)::
+    (integer) Specifies the maximum number of {dataframe-transforms} to obtain.
+    The default value is `100`.
 
-==== Results
-
-The API returns the following information:
+[discrete]
+[[get-data-frame-transform-stats-response]]
+==== {api-response-body-title}
 
 `transforms`::
   (array) An array of statistics objects for {dataframe-transforms}, which are
   sorted by the `id` value in ascending order.
 
-==== Authorization
-
-If the {es} {security-features} are enabled, you must have
-`monitor_data_frame_transforms` cluster privileges to use this API. The built-in
-`data_frame_transforms_user` role has these privileges. For more information,
-see {stack-ov}/security-privileges.html[Security privileges] and
-{stack-ov}/built-in-roles.html[Built-in roles].
-
+[discrete]
+[[get-data-frame-transform-stats-example]]
 ==== Examples
 
 The following example skips for the first five {dataframe-transforms} and

+ 34 - 25
docs/reference/data-frames/apis/get-transform.asciidoc

@@ -12,8 +12,9 @@ beta[]
 
 Retrieves configuration information for {dataframe-transforms}.
 
-
-==== Request
+[discrete]
+[[get-data-frame-transform-request]]
+==== {api-request-title}
 
 `GET _data_frame/transforms/<data_frame_transform_id>` +
 
@@ -25,46 +26,54 @@ Retrieves configuration information for {dataframe-transforms}.
 
 `GET _data_frame/transforms/*`
 
-//===== Description
+[discrete]
+[[get-data-frame-transform-prereqs]]
+==== {api-prereq-title}
+
+If the {es} {security-features} are enabled, you must have
+`monitor_data_frame_transforms` cluster privileges to use this API. The built-in
+`data_frame_transforms_user` role has these privileges. For more information,
+see {stack-ov}/security-privileges.html[Security privileges] and
+{stack-ov}/built-in-roles.html[Built-in roles].
 
-==== Path Parameters
+[discrete]
+[[get-data-frame-transform-path-parms]]
+==== {api-path-parms-title}
 
-`data_frame_transform_id`::
+`<data_frame_transform_id>` (Optional)::
   (string) Identifier for the {dataframe-transform}. It can be a
   {dataframe-transform} identifier or a wildcard expression. If you do not
   specify one of these options, the API returns information for all
   {dataframe-transforms}.
+  
+[discrete]
+[[get-data-frame-transform-query-parms]]
+==== {api-query-parms-title}
 
-==== Query Parameters
+`allow_no_match` (Optional)::
+  (boolean) Whether to ignore if a wildcard expression matches no
+  {dataframe-transforms}. This includes `_all` string or when no transforms have
+  been specified. The default is `true`.
 
-`from`::
+`from` (Optional)::
       (integer) Skips the specified number of {dataframe-transforms}. The
       default value is `0`.
 
-`size`::
-      (integer) Specifies the maximum number of {dataframe-transforms} to obtain. The default value is `100`.
-
-`allow_no_match`::
-  (boolean) Whether to ignore if a wildcard expression matches no data frame transforms.
-  This includes `_all` string or when no transforms have been specified. The default is `true`.
+`size` (Optional)::
+      (integer) Specifies the maximum number of {dataframe-transforms} to obtain.
+      The default value is `100`.
 
-==== Results
-
-The API returns the following information:
+[discrete]
+[[get-data-frame-transform-response]]
+==== {api-response-body-title}
 
 `transforms`::
   (array) An array of transform resources, which are sorted by the `id` value in
   ascending order.
 
-==== Authorization
-
-If the {es} {security-features} are enabled, you must have
-`monitor_data_frame_transforms` cluster privileges to use this API. The built-in
-`data_frame_transforms_user` role has these privileges. For more information,
-see {stack-ov}/security-privileges.html[Security privileges] and
-{stack-ov}/built-in-roles.html[Built-in roles].
-
-==== Examples
+[discrete]
+[[get-data-frame-transform-example]]
+==== {api-example-title}
 
 The following example retrieves information about a maximum of ten transforms:
 

+ 18 - 16
docs/reference/data-frames/apis/preview-transform.asciidoc

@@ -12,22 +12,15 @@ beta[]
 
 Previews a {dataframe-transform}.
 
-
-==== Request
+[discrete]
+[[preview-data-frame-transform-request]]
+==== {api-request-title}
 
 `POST _data_frame/transforms/_preview`
 
-//==== Description
-//==== Path Parameters
-
-==== Request Body
-
-`source`:: The source index or index pattern.
-
-`pivot`:: Defines the pivot function `group by` fields and the aggregation to
-reduce the data.
-
-==== Authorization
+[discrete]
+[[preview-data-frame-transform-prereq]]
+==== {api-prereq-title}
 
 If the {es} {security-features} are enabled, you must have
 `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
 {stack-ov}/security-privileges.html[Security privileges] and
 {stack-ov}/built-in-roles.html[Built-in roles].
 
-==== Examples
+[discrete]
+[[preview-data-frame-transform-request-body]]
+==== {api-request-body-title}
+
+`source` (Required)::
+  (object) The source index or index pattern.
+
+`pivot` (Required)::
+  (object) Defines the pivot function `group by` fields and the aggregation to
+  reduce the data. See <<data-frame-transform-pivot>>.
 
-The following example obtains a preview of a {dataframe-transform} on the {kib}
-eCommerce sample data:
+[discrete]
+==== {api-example-title}
 
 [source,js]
 --------------------------------------------------

+ 40 - 29
docs/reference/data-frames/apis/put-transform.asciidoc

@@ -12,12 +12,28 @@ beta[]
 
 Instantiates a {dataframe-transform}.
 
-
-==== Request
+[discrete]
+[[put-data-frame-transform-request]]
+==== {api-request-title}
 
 `PUT _data_frame/transforms/<data_frame_transform_id>`
 
-===== Description
+[discrete]
+[[put-data-frame-transform-prereqs]]
+==== {api-prereq-title}
+
+If the {es} {security-features} are enabled, you must have
+`manage_data_frame_transforms` cluster privileges to use this API. The built-in
+`data_frame_transforms_admin` role has these privileges. You must also
+have `read` and `view_index_metadata` privileges on the source index and `read`,
+`create_index`, and `index` privileges on the destination index. For more
+information, see {stack-ov}/security-privileges.html[Security privileges] and
+{stack-ov}/built-in-roles.html[Built-in roles].
+
+
+[discrete]
+[[put-data-frame-transform-desc]]
+===== {api-description-title}
 
 IMPORTANT:  You must use {kib} or this API to create a {dataframe-transform}.
             Do not put a {dataframe-transform} directly into any
@@ -25,42 +41,37 @@ IMPORTANT:  You must use {kib} or this API to create a {dataframe-transform}.
             If {es} {security-features} are enabled, do not give users any
             privileges on `.data-frame-internal*` indices.
 
-==== Path Parameters
+[discrete]
+[[put-data-frame-transform-path-parms]]
+==== {api-path-parms-title}
 
-`data_frame_transform_id` (required)::
+`<data_frame_transform_id>` (Required)::
   (string) Identifier for the {dataframe-transform}. This identifier can contain
   lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It
   must start and end with alphanumeric characters.
 
+[discrete]
+[[put-data-frame-transform-request-body]]
+==== {api-request-body-title}
 
-==== Request Body
-
-`source` (required):: (object) The source configuration, consisting of `index` and optionally
-a `query`.
+`description` (Optional)::
+  (string) Free text description of the {dataframe-transform}.
 
-`dest` (required):: (object) The destination configuration, consisting of `index` and optionally a
-`pipeline` id.
+`dest` (Required)::
+  (object) The destination configuration, which consists of `index` and
+  optionally a `pipeline` id.
 
-`pivot`:: (object) Defines the pivot function `group by` fields and the aggregation to
-reduce the data. See <<data-frame-transform-pivot, data frame transform pivot objects>>.
-
-`description`:: Optional free text description of the data frame transform
-
-
-==== Authorization
-
-If the {es} {security-features} are enabled, you must have
-`manage_data_frame_transforms` cluster privileges to use this API. The built-in
-`data_frame_transforms_admin` role has these privileges. You must also
-have `read` and `view_index_metadata` privileges on the source index and `read`,
-`create_index`, and `index` privileges on the destination index. For more
-information, see {stack-ov}/security-privileges.html[Security privileges] and
-{stack-ov}/built-in-roles.html[Built-in roles].
+`pivot` (Optional)::
+  (object) Defines the pivot function `group by` fields and the aggregation to
+  reduce the data. See <<data-frame-transform-pivot>>.
 
-==== Examples
+`source` (Required)::
+  (object) The source configuration, which consists of `index` and optionally
+  a `query`.
 
-The following example creates a {dataframe-transform} for the {kib} eCommerce
-sample data:
+[discrete]
+[[put-data-frame-transform-example]]
+==== {api-example-title}
 
 [source,js]
 --------------------------------------------------

+ 17 - 14
docs/reference/data-frames/apis/start-transform.asciidoc

@@ -12,21 +12,15 @@ beta[]
 
 Starts one or more {dataframe-transforms}.
 
-==== Request
+[discrete]
+[[start-data-frame-transform-request]]
+==== {api-request-title}
 
 `POST _data_frame/transforms/<data_frame_transform_id>/_start`
 
-//==== Description
-
-==== Path Parameters
-
-`data_frame_transform_id` (required)::
-  (string) Identifier for the {dataframe-transform}. This identifier can contain
-  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It
-  must start and end with alphanumeric characters.
-
-//==== Request Body
-==== Authorization
+[discrete]
+[[start-data-frame-transform-prereqs]]
+==== {api-prereq-title}
 
 If the {es} {security-features} are enabled, you must have
 `manage_data_frame_transforms` cluster privileges to use this API. You must also
@@ -35,9 +29,18 @@ have `view_index_metadata` privileges on the source index for the
 {stack-ov}/security-privileges.html[Security privileges] and
 {stack-ov}/built-in-roles.html[Built-in roles].
 
-==== Examples
+[discrete]
+[[start-data-frame-transform-path-parms]]
+==== {api-path-parms-title}
+
+`<data_frame_transform_id>` (Required)::
+  (string) Identifier for the {dataframe-transform}. This identifier can contain
+  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It
+  must start and end with alphanumeric characters.
 
-The following example starts the `ecommerce_transform` {dataframe-transform}:
+[discrete]
+[[start-data-frame-transform-example]]
+==== {api-example-title}
 
 [source,js]
 --------------------------------------------------

+ 47 - 34
docs/reference/data-frames/apis/stop-transform.asciidoc

@@ -12,7 +12,9 @@ beta[]
 
 Stops one or more {dataframe-transforms}.
 
-==== Request
+[discrete]
+[[stop-data-frame-transform-request]]
+==== {api-request-title}
 
 `POST _data_frame/transforms/<data_frame_transform_id>/_stop` +
 
@@ -20,48 +22,59 @@ Stops one or more {dataframe-transforms}.
 
 `POST _data_frame/transforms/_all/_stop`
 
+[discrete]
+[[stop-data-frame-transform-prereq]]
+==== {api-prereq-title}
+
+If the {es} {security-features} are enabled, you must have
+`manage_data_frame_transforms` cluster privileges to use this API. The built-in
+`data_frame_transforms_admin` role has these privileges. For more information,
+see {stack-ov}/security-privileges.html[Security privileges] and
+{stack-ov}/built-in-roles.html[Built-in roles].
+
+[discrete]
+[[stop-data-frame-transform-desc]]
+==== {api-description-title}
 
-==== Description
 You can stop multiple {dataframe-transforms} in a single API request by using a
 comma-separated list of {dataframe-transforms} or a wildcard expression.
-All {dataframe-transforms} can be stopped by using `_all` or `*` as the `<data_frame_transform_id>`.
+All {dataframe-transforms} can be stopped by using `_all` or `*` as the
+`<data_frame_transform_id>`.
 
-==== Path Parameters
+[discrete]
+[[stop-data-frame-transform-path-parms]]
+==== {api-path-parms-title}
 
-`data_frame_transform_id` (required)::
+`<data_frame_transform_id>` (Required)::
   (string) Identifier for the {dataframe-transform}. This identifier can contain
   lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It
   must start and end with alphanumeric characters.
 
-==== Query Parameters
-
-`wait_for_completion`::
-  (boolean) If set to true, causes the API to block until the indexer state completely stops. If set to false, the API returns immediately and the indexer will be stopped asynchronously in the background. Defaults to `false`.
-
- `timeout`::
-   (time value) If `wait_for_completion=true`, the API blocks for (at maximum)
-   the specified duration while waiting for the transform to stop. If more than
-   `timeout` time has passed, the API throws a timeout exception. Even if a
-   timeout exception is thrown, the stop request is still processing and
-   eventually moves the transform to `STOPPED`. The timeout simply means the API
-   call itself timed out while waiting for the status change. Defaults to `30s`
-
- `allow_no_match`::
-   (boolean) Whether to ignore if a wildcard expression matches no data frame transforms.
-   This includes `_all` string or when no transforms have been specified. The default is `true`.
-
-//==== Request Body
-==== Authorization
-
-If the {es} {security-features} are enabled, you must have
-`manage_data_frame_transforms` cluster privileges to use this API. The built-in
-`data_frame_transforms_admin` role has these privileges. For more information,
-see {stack-ov}/security-privileges.html[Security privileges] and
-{stack-ov}/built-in-roles.html[Built-in roles].
-
-==== Examples
-
-The following example stops the `ecommerce_transform` {dataframe-transform}:
+[discrete]
+[[stop-data-frame-transform-query-parms]]
+==== {api-query-parms-title}
+
+`allow_no_match` (Optional)::
+  (boolean) Whether to ignore if a wildcard expression matches no
+  {dataframe-transforms}. This includes `_all` string or when no transforms have
+  been specified. The default is `true`.
+
+`timeout` (Optional)::
+  (time value) If `wait_for_completion=true`, the API blocks for (at maximum)
+  the specified duration while waiting for the transform to stop. If more than
+  `timeout` time has passed, the API throws a timeout exception. Even if a
+  timeout exception is thrown, the stop request is still processing and
+  eventually moves the transform to `STOPPED`. The timeout simply means the API
+  call itself timed out while waiting for the status change. Defaults to `30s`
+
+`wait_for_completion` (Optional)::
+  (boolean) If set to `true`, causes the API to block until the indexer state
+  completely stops. If set to `false`, the API returns immediately and the
+  indexer will be stopped asynchronously in the background. Defaults to `false`.
+
+[discrete]
+[[stop-data-frame-transform-example]]
+==== {api-example-title}
 
 [source,js]
 --------------------------------------------------