Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/reference/ml/anomaly-detection/apis/close-job.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/ml/anomaly-detection/apis/delete-job.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 0 additions & 27 deletions docs/reference/ml/anomaly-detection/apis/eventresource.asciidoc

This file was deleted.

17 changes: 0 additions & 17 deletions docs/reference/ml/anomaly-detection/apis/filterresource.asciidoc

This file was deleted.

2 changes: 0 additions & 2 deletions docs/reference/ml/anomaly-detection/apis/flush-job.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/ml/anomaly-detection/apis/forecast.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 13 additions & 18 deletions docs/reference/ml/anomaly-detection/apis/get-calendar.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 16 additions & 19 deletions docs/reference/ml/anomaly-detection/apis/get-filter.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions docs/reference/ml/anomaly-detection/apis/open-job.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading