[7.x][DOCS] Remove redundant results from ML APIs (#50565)

This commit is contained in:
Lisa Cawley 2020-01-02 11:23:26 -08:00 committed by GitHub
parent e19585b47f
commit 81a9cff16f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 101 additions and 189 deletions

View File

@ -88,11 +88,9 @@ has closed. The default value is 30 minutes.
[[ml-close-job-example]] [[ml-close-job-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example closes the `total-requests` job:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/anomaly_detectors/total-requests/_close POST _ml/anomaly_detectors/low_request_rate/_close
-------------------------------------------------- --------------------------------------------------
// TEST[skip:sometimes fails due to https://github.com/elastic/elasticsearch/pull/48583#issuecomment-552991325 - on unmuting use setup:server_metrics_openjob-raw] // TEST[skip:sometimes fails due to https://github.com/elastic/elasticsearch/pull/48583#issuecomment-552991325 - on unmuting use setup:server_metrics_openjob-raw]

View File

@ -31,7 +31,8 @@ events and delete the calendar, see the
==== {api-path-parms-title} ==== {api-path-parms-title}
`<calendar_id>`:: `<calendar_id>`::
(Required, string) Identifier for the calendar. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
`<event_id>`:: `<event_id>`::
(Required, string) Identifier for the scheduled event. You can obtain this (Required, string) Identifier for the scheduled event. You can obtain this
@ -40,9 +41,6 @@ events and delete the calendar, see the
[[ml-delete-calendar-event-example]] [[ml-delete-calendar-event-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example deletes a scheduled event from the `planned-outages`
calendar:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
DELETE _ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st DELETE _ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st

View File

@ -24,18 +24,16 @@ Deletes {anomaly-jobs} from a calendar.
==== {api-path-parms-title} ==== {api-path-parms-title}
`<calendar_id>`:: `<calendar_id>`::
(Required, string) Identifier for the calendar. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
`<job_id>`:: `<job_id>`::
(Required, string) An identifier for the {anomaly-jobs}. It can be a job (Required, string)
identifier, a group name, or a comma-separated list of jobs or groups. include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection-list]
[[ml-delete-calendar-job-example]] [[ml-delete-calendar-job-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example removes the association between the `planned-outages`
calendar and `total-requests` job:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
DELETE _ml/calendars/planned-outages/jobs/total-requests DELETE _ml/calendars/planned-outages/jobs/total-requests

View File

@ -30,13 +30,12 @@ calendar.
==== {api-path-parms-title} ==== {api-path-parms-title}
`<calendar_id>`:: `<calendar_id>`::
(Required, string) Identifier for the calendar. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
[[ml-delete-calendar-example]] [[ml-delete-calendar-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example deletes the `planned-outages` calendar:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
DELETE _ml/calendars/planned-outages DELETE _ml/calendars/planned-outages

View File

@ -41,8 +41,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=datafeed-id]
[[ml-delete-datafeed-example]] [[ml-delete-datafeed-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example deletes the `datafeed-total-requests` {dfeed}:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
DELETE _ml/datafeeds/datafeed-total-requests DELETE _ml/datafeeds/datafeed-total-requests

View File

@ -31,13 +31,12 @@ update or delete the job before you can delete the filter.
==== {api-path-parms-title} ==== {api-path-parms-title}
`<filter_id>`:: `<filter_id>`::
(Required, string) Identifier for the filter. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
[[ml-delete-filter-example]] [[ml-delete-filter-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example deletes the `safe_domains` filter:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
DELETE _ml/filters/safe_domains DELETE _ml/filters/safe_domains

View File

@ -41,12 +41,13 @@ For more information, see
==== {api-path-parms-title} ==== {api-path-parms-title}
`<forecast_id>`:: `<forecast_id>`::
(Optional, string) A comma-separated list of forecast identifiers. (Optional, string) A comma-separated list of forecast identifiers. If you do not
If you do not specify this optional parameter or if you specify `_all`, the specify this optional parameter or if you specify `_all`, the API deletes all
API deletes all forecasts from the job. forecasts from the job.
`<job_id>`:: `<job_id>`::
(Required, string) Required. Identifier for the job. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
[[ml-delete-forecast-query-parms]] [[ml-delete-forecast-query-parms]]
==== {api-query-parms-title} ==== {api-query-parms-title}
@ -65,8 +66,6 @@ For more information, see
[[ml-delete-forecast-example]] [[ml-delete-forecast-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example deletes all forecasts from the `total-requests` job:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
DELETE _ml/anomaly_detectors/total-requests/_forecast/_all DELETE _ml/anomaly_detectors/total-requests/_forecast/_all

View File

@ -56,8 +56,6 @@ wait until the job deletion completes. Defaults to `true`.
[[ml-delete-job-example]] [[ml-delete-job-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example deletes the `total-requests` job:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
DELETE _ml/anomaly_detectors/total-requests DELETE _ml/anomaly_detectors/total-requests

View File

@ -40,8 +40,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=snapshot-id]
[[ml-delete-snapshot-example]] [[ml-delete-snapshot-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example deletes the `1491948163` snapshot:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163 DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163

View File

@ -1,27 +0,0 @@
[role="xpack"]
[testenv="platinum"]
[[ml-event-resource]]
=== Scheduled event resources
An events resource has the following properties:
`calendar_id`::
(string) An identifier for the calendar that contains the scheduled
event. This property is optional in the <<ml-post-calendar-event>>.
`description`::
(string) A description of the scheduled event.
`end_time`::
(date) The timestamp for the end of the scheduled event
in milliseconds since the epoch or ISO 8601 format.
`event_id`::
(string) An automatically-generated identifier for the scheduled event.
`start_time`::
(date) The timestamp for the beginning of the scheduled event
in milliseconds since the epoch or ISO 8601 format.
For more information, see
{ml-docs}/ml-calendars.html[Calendars and scheduled events].

View File

@ -1,17 +0,0 @@
[role="xpack"]
[testenv="platinum"]
[[ml-filter-resource]]
=== Filter resources
A filter resource has the following properties:
`filter_id`::
(string) A string that uniquely identifies the filter.
`description`::
(string) A description of the filter.
`items`::
(array of strings) An array of strings which is the filter item list.
For more information, see {ml-docs}/ml-rules.html[Machine learning custom rules].

View File

@ -67,8 +67,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
[[ml-flush-job-example]] [[ml-flush-job-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example flushes the `total-requests` job:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/anomaly_detectors/total-requests/_flush POST _ml/anomaly_detectors/total-requests/_flush

View File

@ -57,8 +57,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
[[ml-forecast-example]] [[ml-forecast-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example requests a 10 day forecast for the `total-requests` job:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/anomaly_detectors/total-requests/_forecast POST _ml/anomaly_detectors/total-requests/_forecast

View File

@ -35,7 +35,8 @@ For more information, see
==== {api-path-parms-title} ==== {api-path-parms-title}
`<calendar_id>`:: `<calendar_id>`::
(Required, string) Identifier for the calendar. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
[[ml-get-calendar-event-request-body]] [[ml-get-calendar-event-request-body]]
==== {api-request-body-title} ==== {api-request-body-title}
@ -56,36 +57,30 @@ For more information, see
[[ml-get-calendar-event-results]] [[ml-get-calendar-event-results]]
==== {api-response-body-title} ==== {api-response-body-title}
The API returns the following information: The API returns an array of scheduled event resources, which have the
`events`::
(array) An array of scheduled event resources. An events resource has the
following properties: following properties:
`calendar_id`::: `calendar_id`::
(string) An identifier for the calendar that contains the scheduled (string)
event. include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
`description`::: `description`::
(string) A description of the scheduled event. (string) A description of the scheduled event.
`end_time`::: `end_time`::
(date) The timestamp for the end of the scheduled event (date) The timestamp for the end of the scheduled event in milliseconds since
in milliseconds since the epoch or ISO 8601 format. the epoch or ISO 8601 format.
`event_id`::: `event_id`::
(string) An automatically-generated identifier for the scheduled event. (string) An automatically-generated identifier for the scheduled event.
`start_time`::: `start_time`::
(date) The timestamp for the beginning of the scheduled event (date) The timestamp for the beginning of the scheduled event in milliseconds
in milliseconds since the epoch or ISO 8601 format. since the epoch or ISO 8601 format.
[[ml-get-calendar-event-example]] [[ml-get-calendar-event-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example gets information about the scheduled events in the
`planned-outages` calendar:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
GET _ml/calendars/planned-outages/events GET _ml/calendars/planned-outages/events

View File

@ -35,39 +35,34 @@ For more information, see
==== {api-path-parms-title} ==== {api-path-parms-title}
`<calendar_id>`:: `<calendar_id>`::
(Required, string) Identifier for the calendar. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
[[ml-get-calendar-request-body]] [[ml-get-calendar-request-body]]
==== {api-request-body-title} ==== {api-request-body-title}
`page`:: `page`.`from`::
`from`:::
(Optional, integer) Skips the specified number of calendars. (Optional, integer) Skips the specified number of calendars.
`size`::: `page`.`size`::
(Optional, integer) Specifies the maximum number of calendars to obtain. (Optional, integer) Specifies the maximum number of calendars to obtain.
[[ml-get-calendar-results]] [[ml-get-calendar-results]]
==== {api-response-body-title} ==== {api-response-body-title}
The API returns the following information: The API returns an array of calendar resources, which have the following
`calendars`::
(array) An array of calendar resources. A calendar resource has the following
properties: properties:
`calendar_id`:::
(string) A numerical character string that uniquely identifies the calendar.
`job_ids`::: `calendar_id`::
(array) An array of {anomaly-job} identifiers. For example: (string)
`["total-requests"]`. include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
`job_ids`::
(array) An array of {anomaly-job} identifiers. For example: `["total-requests"]`.
[[ml-get-calendar-example]] [[ml-get-calendar-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example gets configuration information for the `planned-outages`
calendar:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
GET _ml/calendars/planned-outages GET _ml/calendars/planned-outages

View File

@ -32,40 +32,37 @@ You can get a single filter or all filters. For more information, see
==== {api-path-parms-title} ==== {api-path-parms-title}
`<filter_id>`:: `<filter_id>`::
(Optional, string) Identifier for the filter. (Optional, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
[[ml-get-filter-query-parms]] [[ml-get-filter-query-parms]]
==== {api-query-parms-title} ==== {api-query-parms-title}
`from`::: `from`::
(Optional, integer) Skips the specified number of filters. (Optional, integer) Skips the specified number of filters.
`size`::: `size`::
(Optional, integer) Specifies the maximum number of filters to obtain. (Optional, integer) Specifies the maximum number of filters to obtain.
[[ml-get-filter-results]] [[ml-get-filter-results]]
==== {api-response-body-title} ==== {api-response-body-title}
The API returns the following information: The API returns an array of filter resources, which have the following
`filters`::
(array) An array of filter resources. A filter resource has the following
properties: properties:
`filter_id`:::
(string) A string that uniquely identifies the filter.
`description`::: `description`::
(string) A description of the filter. (string) A description of the filter.
`items`::: `filter_id`::
(string)
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
`items`::
(array of strings) An array of strings which is the filter item list. (array of strings) An array of strings which is the filter item list.
[[ml-get-filter-example]] [[ml-get-filter-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example gets configuration information for the `safe_domains`
filter:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
GET _ml/filters/safe_domains GET _ml/filters/safe_domains

View File

@ -50,9 +50,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
[[ml-open-job-example]] [[ml-open-job-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example opens the `total-requests` job and sets an optional
property:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/anomaly_detectors/total-requests/_open POST _ml/anomaly_detectors/total-requests/_open

View File

@ -30,36 +30,35 @@ of which must have a start time, end time, and description.
==== {api-path-parms-title} ==== {api-path-parms-title}
`<calendar_id>`:: `<calendar_id>`::
(Required, string) Identifier for the calendar. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
[[ml-post-calendar-event-request-body]] [[ml-post-calendar-event-request-body]]
==== {api-request-body-title} ==== {api-request-body-title}
`events`:: `events`::
(Required, array) A list of one of more scheduled events. The event's start (Required, array) A list of one of more scheduled events. The event's start and
and end times may be specified as integer milliseconds since the epoch or as a end times may be specified as integer milliseconds since the epoch or as a
string in ISO 8601 format. An event resource has the following properties: string in ISO 8601 format. An event resource has the following properties:
`calendar_id`::: `events`.`calendar_id`:::
(Optional, string) An identifier for the calendar that contains the scheduled (Optional, string)
event. include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
`description`::: `events`.`description`:::
(Optional, string) A description of the scheduled event. (Optional, string) A description of the scheduled event.
`end_time`::: `events`.`end_time`:::
(Required, date) The timestamp for the end of the scheduled event (Required, date) The timestamp for the end of the scheduled event in
in milliseconds since the epoch or ISO 8601 format. milliseconds since the epoch or ISO 8601 format.
`start_time`::: `events`.`start_time`:::
(Required, date) The timestamp for the beginning of the scheduled event (Required, date) The timestamp for the beginning of the scheduled event in
in milliseconds since the epoch or ISO 8601 format. milliseconds since the epoch or ISO 8601 format.
[[ml-post-calendar-event-example]] [[ml-post-calendar-event-example]]
==== {api-examples-title} ==== {api-examples-title}
You can add scheduled events to the `planned-outages` calendar as follows:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/calendars/planned-outages/events POST _ml/calendars/planned-outages/events

View File

@ -24,7 +24,8 @@ Adds an {anomaly-job} to a calendar.
==== {api-path-parms-title} ==== {api-path-parms-title}
`<calendar_id>`:: `<calendar_id>`::
(Required, string) Identifier for the calendar. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
`<job_id>`:: `<job_id>`::
(Required, string) (Required, string)

View File

@ -30,7 +30,8 @@ For more information, see
==== {api-path-parms-title} ==== {api-path-parms-title}
`<calendar_id>`:: `<calendar_id>`::
(Required, string) Identifier for the calendar. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
[[ml-put-calendar-request-body]] [[ml-put-calendar-request-body]]
==== {api-request-body-title} ==== {api-request-body-title}

View File

@ -96,8 +96,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=scroll-size]
[[ml-put-datafeed-example]] [[ml-put-datafeed-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example creates the `datafeed-total-requests` {dfeed}:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT _ml/datafeeds/datafeed-total-requests PUT _ml/datafeeds/datafeed-total-requests

View File

@ -31,7 +31,8 @@ the `custom_rules` property of detector configuration objects.
==== {api-path-parms-title} ==== {api-path-parms-title}
`<filter_id>`:: `<filter_id>`::
(Required, string) Identifier for the filter. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
[[ml-put-filter-request-body]] [[ml-put-filter-request-body]]
==== {api-request-body-title} ==== {api-request-body-title}
@ -47,8 +48,6 @@ the `custom_rules` property of detector configuration objects.
[[ml-put-filter-example]] [[ml-put-filter-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example creates the `safe_domains` filter:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT _ml/filters/safe_domains PUT _ml/filters/safe_domains

View File

@ -231,8 +231,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=results-retention-days]
[[ml-put-job-example]] [[ml-put-job-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example creates the `total-requests` job:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT _ml/anomaly_detectors/total-requests PUT _ml/anomaly_detectors/total-requests

View File

@ -70,8 +70,6 @@ IMPORTANT: No new {ml} jobs can be opened while the `upgrade_mode` setting is
[[ml-set-upgrade-mode-example]] [[ml-set-upgrade-mode-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example enables `upgrade_mode` for the cluster:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/set_upgrade_mode?enabled=true&timeout=10m POST _ml/set_upgrade_mode?enabled=true&timeout=10m

View File

@ -95,8 +95,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=datafeed-id]
[[ml-start-datafeed-example]] [[ml-start-datafeed-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example starts the `datafeed-total-requests` {dfeed}:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/datafeeds/datafeed-total-requests/_start POST _ml/datafeeds/datafeed-total-requests/_start

View File

@ -70,8 +70,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=allow-no-datafeeds]
[[ml-stop-datafeed-example]] [[ml-stop-datafeed-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example stops the `datafeed-total-requests` {dfeed}:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/datafeeds/datafeed-total-requests/_stop POST _ml/datafeeds/datafeed-total-requests/_stop

View File

@ -105,9 +105,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=scroll-size]
[[ml-update-datafeed-example]] [[ml-update-datafeed-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example updates the query for the `datafeed-total-requests`
{dfeed} so that only log entries of error level are analyzed:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/datafeeds/datafeed-total-requests/_update POST _ml/datafeeds/datafeed-total-requests/_update

View File

@ -24,7 +24,8 @@ Updates the description of a filter, adds items, or removes items.
==== {api-path-parms-title} ==== {api-path-parms-title}
`<filter_id>`:: `<filter_id>`::
(Required, string) Identifier for the filter. (Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
[[ml-update-filter-request-body]] [[ml-update-filter-request-body]]
==== {api-request-body-title} ==== {api-request-body-title}
@ -41,9 +42,6 @@ Updates the description of a filter, adds items, or removes items.
[[ml-update-filter-example]] [[ml-update-filter-example]]
==== {api-examples-title} ==== {api-examples-title}
You can change the description, add and remove items to the `safe_domains`
filter as follows:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/filters/safe_domains/_update POST _ml/filters/safe_domains/_update

View File

@ -158,8 +158,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=results-retention-days]
[[ml-update-job-example]] [[ml-update-job-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example updates the `total-requests` job:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ml/anomaly_detectors/total-requests/_update POST _ml/anomaly_detectors/total-requests/_update

View File

@ -139,6 +139,10 @@ analyzing the splits with respect to their own history. It is used for finding
unusual values in the context of the split. unusual values in the context of the split.
end::by-field-name[] end::by-field-name[]
tag::calendar-id[]
A string that uniquely identifies a calendar.
end::calendar-id[]
tag::categorization-analyzer[] tag::categorization-analyzer[]
If `categorization_field_name` is specified, you can also define the analyzer If `categorization_field_name` is specified, you can also define the analyzer
that is used to interpret the categorization field. This property cannot be used that is used to interpret the categorization field. This property cannot be used
@ -568,6 +572,10 @@ optional. If it is not specified, no token filters are applied prior to
categorization. categorization.
end::filter[] end::filter[]
tag::filter-id[]
A string that uniquely identifies a filter.
end::filter-id[]
tag::frequency[] tag::frequency[]
The interval at which scheduled queries are made while the {dfeed} runs in real The interval at which scheduled queries are made while the {dfeed} runs in real
time. The default value is either the bucket span for short bucket spans, or, time. The default value is either the bucket span for short bucket spans, or,