[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]]
==== {api-examples-title}
The following example closes the `total-requests` job:
[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]

View File

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

View File

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

View File

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

View File

@ -41,8 +41,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=datafeed-id]
[[ml-delete-datafeed-example]]
==== {api-examples-title}
The following example deletes the `datafeed-total-requests` {dfeed}:
[source,console]
--------------------------------------------------
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}
`<filter_id>`::
(Required, string) Identifier for the filter.
(Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
[[ml-delete-filter-example]]
==== {api-examples-title}
The following example deletes the `safe_domains` filter:
[source,console]
--------------------------------------------------
DELETE _ml/filters/safe_domains

View File

@ -41,12 +41,13 @@ For more information, see
==== {api-path-parms-title}
`<forecast_id>`::
(Optional, string) A comma-separated list of forecast identifiers.
If you do not specify this optional parameter or if you specify `_all`, the
API deletes all forecasts from the job.
(Optional, string) A comma-separated list of forecast identifiers. If you do not
specify this optional parameter or if you specify `_all`, the API deletes all
forecasts from the job.
`<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]]
==== {api-query-parms-title}
@ -65,8 +66,6 @@ For more information, see
[[ml-delete-forecast-example]]
==== {api-examples-title}
The following example deletes all forecasts from the `total-requests` job:
[source,console]
--------------------------------------------------
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]]
==== {api-examples-title}
The following example deletes the `total-requests` job:
[source,console]
--------------------------------------------------
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]]
==== {api-examples-title}
The following example deletes the `1491948163` snapshot:
[source,console]
--------------------------------------------------
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]]
==== {api-examples-title}
The following example flushes the `total-requests` job:
[source,console]
--------------------------------------------------
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]]
==== {api-examples-title}
The following example requests a 10 day forecast for the `total-requests` job:
[source,console]
--------------------------------------------------
POST _ml/anomaly_detectors/total-requests/_forecast

View File

@ -35,57 +35,52 @@ For more information, see
==== {api-path-parms-title}
`<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]]
==== {api-request-body-title}
`end`::
(Optional, string) Specifies to get events with timestamps earlier than this
time.
(Optional, string) Specifies to get events with timestamps earlier than this
time.
`from`::
(Optional, integer) Skips the specified number of events.
(Optional, integer) Skips the specified number of events.
`size`::
(Optional, integer) Specifies the maximum number of events to obtain.
(Optional, integer) Specifies the maximum number of events to obtain.
`start`::
(Optional, string) Specifies to get events with timestamps after this time.
(Optional, string) Specifies to get events with timestamps after this time.
[[ml-get-calendar-event-results]]
==== {api-response-body-title}
The API returns the following information:
The API returns an array of scheduled event resources, which have the
following properties:
`events`::
(array) An array of scheduled event resources. An events resource has the
following properties:
`calendar_id`::
(string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
`calendar_id`:::
(string) An identifier for the calendar that contains the scheduled
event.
`description`::
(string) A description of the scheduled 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.
`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.
`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.
`start_time`::
(date) The timestamp for the beginning of the scheduled event in milliseconds
since the epoch or ISO 8601 format.
[[ml-get-calendar-event-example]]
==== {api-examples-title}
The following example gets information about the scheduled events in the
`planned-outages` calendar:
[source,console]
--------------------------------------------------
GET _ml/calendars/planned-outages/events

View File

@ -35,39 +35,34 @@ For more information, see
==== {api-path-parms-title}
`<calendar_id>`::
(Required, string) Identifier for the calendar.
(Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
[[ml-get-calendar-request-body]]
==== {api-request-body-title}
`page`::
`from`:::
(Optional, integer) Skips the specified number of calendars.
`page`.`from`::
(Optional, integer) Skips the specified number of calendars.
`size`:::
(Optional, integer) Specifies the maximum number of calendars to obtain.
`page`.`size`::
(Optional, integer) Specifies the maximum number of calendars to obtain.
[[ml-get-calendar-results]]
==== {api-response-body-title}
The API returns the following information:
The API returns an array of calendar resources, which have the following
properties:
`calendars`::
(array) An array of calendar resources. A calendar resource has the following
properties:
`calendar_id`:::
(string) A numerical character string that uniquely identifies the calendar.
`calendar_id`::
(string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
`job_ids`:::
(array) An array of {anomaly-job} identifiers. For example:
`["total-requests"]`.
`job_ids`::
(array) An array of {anomaly-job} identifiers. For example: `["total-requests"]`.
[[ml-get-calendar-example]]
==== {api-examples-title}
The following example gets configuration information for the `planned-outages`
calendar:
[source,console]
--------------------------------------------------
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}
`<filter_id>`::
(Optional, string) Identifier for the filter.
(Optional, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
[[ml-get-filter-query-parms]]
==== {api-query-parms-title}
`from`:::
(Optional, integer) Skips the specified number of filters.
`from`::
(Optional, integer) Skips the specified number of filters.
`size`:::
(Optional, integer) Specifies the maximum number of filters to obtain.
`size`::
(Optional, integer) Specifies the maximum number of filters to obtain.
[[ml-get-filter-results]]
==== {api-response-body-title}
The API returns the following information:
The API returns an array of filter resources, which have the following
properties:
`filters`::
(array) An array of 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.
`description`:::
(string) A description of the filter.
`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.
`items`::
(array of strings) An array of strings which is the filter item list.
[[ml-get-filter-example]]
==== {api-examples-title}
The following example gets configuration information for the `safe_domains`
filter:
[source,console]
--------------------------------------------------
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]]
==== {api-examples-title}
The following example opens the `total-requests` job and sets an optional
property:
[source,console]
--------------------------------------------------
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}
`<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]]
==== {api-request-body-title}
`events`::
(Required, array) A list of one of more scheduled events. The event's start
and 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:
(Required, array) A list of one of more scheduled events. The event's start and
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:
`calendar_id`:::
(Optional, string) An identifier for the calendar that contains the scheduled
event.
`events`.`calendar_id`:::
(Optional, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
`description`:::
(Optional, string) A description of the scheduled event.
`events`.`description`:::
(Optional, string) A description of the scheduled event.
`end_time`:::
(Required, date) The timestamp for the end of the scheduled event
in milliseconds since the epoch or ISO 8601 format.
`events`.`end_time`:::
(Required, date) The timestamp for the end of the scheduled event in
milliseconds since the epoch or ISO 8601 format.
`start_time`:::
(Required, date) The timestamp for the beginning of the scheduled event
in milliseconds since the epoch or ISO 8601 format.
`events`.`start_time`:::
(Required, date) The timestamp for the beginning of the scheduled event in
milliseconds since the epoch or ISO 8601 format.
[[ml-post-calendar-event-example]]
==== {api-examples-title}
You can add scheduled events to the `planned-outages` calendar as follows:
[source,console]
--------------------------------------------------
POST _ml/calendars/planned-outages/events

View File

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

View File

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

View File

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

View File

@ -31,7 +31,8 @@ the `custom_rules` property of detector configuration objects.
==== {api-path-parms-title}
`<filter_id>`::
(Required, string) Identifier for the filter.
(Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
[[ml-put-filter-request-body]]
==== {api-request-body-title}
@ -47,8 +48,6 @@ the `custom_rules` property of detector configuration objects.
[[ml-put-filter-example]]
==== {api-examples-title}
The following example creates the `safe_domains` filter:
[source,console]
--------------------------------------------------
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]]
==== {api-examples-title}
The following example creates the `total-requests` job:
[source,console]
--------------------------------------------------
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]]
==== {api-examples-title}
The following example enables `upgrade_mode` for the cluster:
[source,console]
--------------------------------------------------
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]]
==== {api-examples-title}
The following example starts the `datafeed-total-requests` {dfeed}:
[source,console]
--------------------------------------------------
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]]
==== {api-examples-title}
The following example stops the `datafeed-total-requests` {dfeed}:
[source,console]
--------------------------------------------------
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]]
==== {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]
--------------------------------------------------
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}
`<filter_id>`::
(Required, string) Identifier for the filter.
(Required, string)
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
[[ml-update-filter-request-body]]
==== {api-request-body-title}
@ -41,9 +42,6 @@ Updates the description of a filter, adds items, or removes items.
[[ml-update-filter-example]]
==== {api-examples-title}
You can change the description, add and remove items to the `safe_domains`
filter as follows:
[source,console]
--------------------------------------------------
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]]
==== {api-examples-title}
The following example updates the `total-requests` job:
[source,console]
--------------------------------------------------
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.
end::by-field-name[]
tag::calendar-id[]
A string that uniquely identifies a calendar.
end::calendar-id[]
tag::categorization-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
@ -568,6 +572,10 @@ optional. If it is not specified, no token filters are applied prior to
categorization.
end::filter[]
tag::filter-id[]
A string that uniquely identifies a filter.
end::filter-id[]
tag::frequency[]
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,