Skip to content

Commit 81a9cff

Browse files
authored
[7.x][DOCS] Remove redundant results from ML APIs (#50565)
1 parent e19585b commit 81a9cff

30 files changed

+101
-189
lines changed

docs/reference/ml/anomaly-detection/apis/close-job.asciidoc

+1-3
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,9 @@ has closed. The default value is 30 minutes.
8888
[[ml-close-job-example]]
8989
==== {api-examples-title}
9090

91-
The following example closes the `total-requests` job:
92-
9391
[source,console]
9492
--------------------------------------------------
95-
POST _ml/anomaly_detectors/total-requests/_close
93+
POST _ml/anomaly_detectors/low_request_rate/_close
9694
--------------------------------------------------
9795
// TEST[skip:sometimes fails due to https://github.com/elastic/elasticsearch/pull/48583#issuecomment-552991325 - on unmuting use setup:server_metrics_openjob-raw]
9896

docs/reference/ml/anomaly-detection/apis/delete-calendar-event.asciidoc

+4-6
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,16 @@ events and delete the calendar, see the
3131
==== {api-path-parms-title}
3232

3333
`<calendar_id>`::
34-
(Required, string) Identifier for the calendar.
34+
(Required, string)
35+
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
3536

3637
`<event_id>`::
37-
(Required, string) Identifier for the scheduled event. You can obtain this
38-
identifier by using the <<ml-get-calendar-event,get calendar events API>>.
38+
(Required, string) Identifier for the scheduled event. You can obtain this
39+
identifier by using the <<ml-get-calendar-event,get calendar events API>>.
3940

4041
[[ml-delete-calendar-event-example]]
4142
==== {api-examples-title}
4243

43-
The following example deletes a scheduled event from the `planned-outages`
44-
calendar:
45-
4644
[source,console]
4745
--------------------------------------------------
4846
DELETE _ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st

docs/reference/ml/anomaly-detection/apis/delete-calendar-job.asciidoc

+4-6
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,16 @@ Deletes {anomaly-jobs} from a calendar.
2424
==== {api-path-parms-title}
2525

2626
`<calendar_id>`::
27-
(Required, string) Identifier for the calendar.
27+
(Required, string)
28+
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
2829

2930
`<job_id>`::
30-
(Required, string) An identifier for the {anomaly-jobs}. It can be a job
31-
identifier, a group name, or a comma-separated list of jobs or groups.
31+
(Required, string)
32+
include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection-list]
3233

3334
[[ml-delete-calendar-job-example]]
3435
==== {api-examples-title}
3536

36-
The following example removes the association between the `planned-outages`
37-
calendar and `total-requests` job:
38-
3937
[source,console]
4038
--------------------------------------------------
4139
DELETE _ml/calendars/planned-outages/jobs/total-requests

docs/reference/ml/anomaly-detection/apis/delete-calendar.asciidoc

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ calendar.
3030
==== {api-path-parms-title}
3131

3232
`<calendar_id>`::
33-
(Required, string) Identifier for the calendar.
33+
(Required, string)
34+
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
3435

3536
[[ml-delete-calendar-example]]
3637
==== {api-examples-title}
3738

38-
The following example deletes the `planned-outages` calendar:
39-
4039
[source,console]
4140
--------------------------------------------------
4241
DELETE _ml/calendars/planned-outages

docs/reference/ml/anomaly-detection/apis/delete-datafeed.asciidoc

-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=datafeed-id]
4141
[[ml-delete-datafeed-example]]
4242
==== {api-examples-title}
4343

44-
The following example deletes the `datafeed-total-requests` {dfeed}:
45-
4644
[source,console]
4745
--------------------------------------------------
4846
DELETE _ml/datafeeds/datafeed-total-requests

docs/reference/ml/anomaly-detection/apis/delete-filter.asciidoc

+2-3
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@ update or delete the job before you can delete the filter.
3131
==== {api-path-parms-title}
3232

3333
`<filter_id>`::
34-
(Required, string) Identifier for the filter.
34+
(Required, string)
35+
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
3536

3637
[[ml-delete-filter-example]]
3738
==== {api-examples-title}
3839

39-
The following example deletes the `safe_domains` filter:
40-
4140
[source,console]
4241
--------------------------------------------------
4342
DELETE _ml/filters/safe_domains

docs/reference/ml/anomaly-detection/apis/delete-forecast.asciidoc

+5-6
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ For more information, see
4141
==== {api-path-parms-title}
4242

4343
`<forecast_id>`::
44-
(Optional, string) A comma-separated list of forecast identifiers.
45-
If you do not specify this optional parameter or if you specify `_all`, the
46-
API deletes all forecasts from the job.
44+
(Optional, string) A comma-separated list of forecast identifiers. If you do not
45+
specify this optional parameter or if you specify `_all`, the API deletes all
46+
forecasts from the job.
4747

4848
`<job_id>`::
49-
(Required, string) Required. Identifier for the job.
49+
(Required, string)
50+
include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
5051

5152
[[ml-delete-forecast-query-parms]]
5253
==== {api-query-parms-title}
@@ -65,8 +66,6 @@ For more information, see
6566
[[ml-delete-forecast-example]]
6667
==== {api-examples-title}
6768

68-
The following example deletes all forecasts from the `total-requests` job:
69-
7069
[source,console]
7170
--------------------------------------------------
7271
DELETE _ml/anomaly_detectors/total-requests/_forecast/_all

docs/reference/ml/anomaly-detection/apis/delete-job.asciidoc

-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ wait until the job deletion completes. Defaults to `true`.
5656
[[ml-delete-job-example]]
5757
==== {api-examples-title}
5858

59-
The following example deletes the `total-requests` job:
60-
6159
[source,console]
6260
--------------------------------------------------
6361
DELETE _ml/anomaly_detectors/total-requests

docs/reference/ml/anomaly-detection/apis/delete-snapshot.asciidoc

-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=snapshot-id]
4040
[[ml-delete-snapshot-example]]
4141
==== {api-examples-title}
4242

43-
The following example deletes the `1491948163` snapshot:
44-
4543
[source,console]
4644
--------------------------------------------------
4745
DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163

docs/reference/ml/anomaly-detection/apis/eventresource.asciidoc

-27
This file was deleted.

docs/reference/ml/anomaly-detection/apis/filterresource.asciidoc

-17
This file was deleted.

docs/reference/ml/anomaly-detection/apis/flush-job.asciidoc

-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
6767
[[ml-flush-job-example]]
6868
==== {api-examples-title}
6969

70-
The following example flushes the `total-requests` job:
71-
7270
[source,console]
7371
--------------------------------------------------
7472
POST _ml/anomaly_detectors/total-requests/_flush

docs/reference/ml/anomaly-detection/apis/forecast.asciidoc

-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
5757
[[ml-forecast-example]]
5858
==== {api-examples-title}
5959

60-
The following example requests a 10 day forecast for the `total-requests` job:
61-
6260
[source,console]
6361
--------------------------------------------------
6462
POST _ml/anomaly_detectors/total-requests/_forecast

docs/reference/ml/anomaly-detection/apis/get-calendar-event.asciidoc

+22-27
Original file line numberDiff line numberDiff line change
@@ -35,57 +35,52 @@ For more information, see
3535
==== {api-path-parms-title}
3636

3737
`<calendar_id>`::
38-
(Required, string) Identifier for the calendar.
38+
(Required, string)
39+
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
3940

4041
[[ml-get-calendar-event-request-body]]
4142
==== {api-request-body-title}
4243

4344
`end`::
44-
(Optional, string) Specifies to get events with timestamps earlier than this
45-
time.
45+
(Optional, string) Specifies to get events with timestamps earlier than this
46+
time.
4647

4748
`from`::
48-
(Optional, integer) Skips the specified number of events.
49+
(Optional, integer) Skips the specified number of events.
4950

5051
`size`::
51-
(Optional, integer) Specifies the maximum number of events to obtain.
52+
(Optional, integer) Specifies the maximum number of events to obtain.
5253

5354
`start`::
54-
(Optional, string) Specifies to get events with timestamps after this time.
55+
(Optional, string) Specifies to get events with timestamps after this time.
5556

5657
[[ml-get-calendar-event-results]]
5758
==== {api-response-body-title}
5859

59-
The API returns the following information:
60+
The API returns an array of scheduled event resources, which have the
61+
following properties:
6062

61-
`events`::
62-
(array) An array of scheduled event resources. An events resource has the
63-
following properties:
63+
`calendar_id`::
64+
(string)
65+
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
6466

65-
`calendar_id`:::
66-
(string) An identifier for the calendar that contains the scheduled
67-
event.
67+
`description`::
68+
(string) A description of the scheduled event.
6869

69-
`description`:::
70-
(string) A description of the scheduled event.
70+
`end_time`::
71+
(date) The timestamp for the end of the scheduled event in milliseconds since
72+
the epoch or ISO 8601 format.
7173

72-
`end_time`:::
73-
(date) The timestamp for the end of the scheduled event
74-
in milliseconds since the epoch or ISO 8601 format.
74+
`event_id`::
75+
(string) An automatically-generated identifier for the scheduled event.
7576

76-
`event_id`:::
77-
(string) An automatically-generated identifier for the scheduled event.
78-
79-
`start_time`:::
80-
(date) The timestamp for the beginning of the scheduled event
81-
in milliseconds since the epoch or ISO 8601 format.
77+
`start_time`::
78+
(date) The timestamp for the beginning of the scheduled event in milliseconds
79+
since the epoch or ISO 8601 format.
8280

8381
[[ml-get-calendar-event-example]]
8482
==== {api-examples-title}
8583

86-
The following example gets information about the scheduled events in the
87-
`planned-outages` calendar:
88-
8984
[source,console]
9085
--------------------------------------------------
9186
GET _ml/calendars/planned-outages/events

docs/reference/ml/anomaly-detection/apis/get-calendar.asciidoc

+13-18
Original file line numberDiff line numberDiff line change
@@ -35,39 +35,34 @@ For more information, see
3535
==== {api-path-parms-title}
3636

3737
`<calendar_id>`::
38-
(Required, string) Identifier for the calendar.
38+
(Required, string)
39+
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
3940

4041
[[ml-get-calendar-request-body]]
4142
==== {api-request-body-title}
4243

43-
`page`::
44-
`from`:::
45-
(Optional, integer) Skips the specified number of calendars.
44+
`page`.`from`::
45+
(Optional, integer) Skips the specified number of calendars.
4646

47-
`size`:::
48-
(Optional, integer) Specifies the maximum number of calendars to obtain.
47+
`page`.`size`::
48+
(Optional, integer) Specifies the maximum number of calendars to obtain.
4949

5050
[[ml-get-calendar-results]]
5151
==== {api-response-body-title}
5252

53-
The API returns the following information:
53+
The API returns an array of calendar resources, which have the following
54+
properties:
5455

55-
`calendars`::
56-
(array) An array of calendar resources. A calendar resource has the following
57-
properties:
58-
`calendar_id`:::
59-
(string) A numerical character string that uniquely identifies the calendar.
56+
`calendar_id`::
57+
(string)
58+
include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
6059

61-
`job_ids`:::
62-
(array) An array of {anomaly-job} identifiers. For example:
63-
`["total-requests"]`.
60+
`job_ids`::
61+
(array) An array of {anomaly-job} identifiers. For example: `["total-requests"]`.
6462

6563
[[ml-get-calendar-example]]
6664
==== {api-examples-title}
6765

68-
The following example gets configuration information for the `planned-outages`
69-
calendar:
70-
7166
[source,console]
7267
--------------------------------------------------
7368
GET _ml/calendars/planned-outages

docs/reference/ml/anomaly-detection/apis/get-filter.asciidoc

+16-19
Original file line numberDiff line numberDiff line change
@@ -32,40 +32,37 @@ You can get a single filter or all filters. For more information, see
3232
==== {api-path-parms-title}
3333

3434
`<filter_id>`::
35-
(Optional, string) Identifier for the filter.
35+
(Optional, string)
36+
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
3637

3738
[[ml-get-filter-query-parms]]
3839
==== {api-query-parms-title}
3940

40-
`from`:::
41-
(Optional, integer) Skips the specified number of filters.
41+
`from`::
42+
(Optional, integer) Skips the specified number of filters.
4243

43-
`size`:::
44-
(Optional, integer) Specifies the maximum number of filters to obtain.
44+
`size`::
45+
(Optional, integer) Specifies the maximum number of filters to obtain.
4546

4647
[[ml-get-filter-results]]
4748
==== {api-response-body-title}
4849

49-
The API returns the following information:
50+
The API returns an array of filter resources, which have the following
51+
properties:
5052

51-
`filters`::
52-
(array) An array of filter resources. A filter resource has the following
53-
properties:
54-
`filter_id`:::
55-
(string) A string that uniquely identifies the filter.
56-
57-
`description`:::
58-
(string) A description of the filter.
53+
`description`::
54+
(string) A description of the filter.
55+
56+
`filter_id`::
57+
(string)
58+
include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
5959

60-
`items`:::
61-
(array of strings) An array of strings which is the filter item list.
60+
`items`::
61+
(array of strings) An array of strings which is the filter item list.
6262

6363
[[ml-get-filter-example]]
6464
==== {api-examples-title}
6565

66-
The following example gets configuration information for the `safe_domains`
67-
filter:
68-
6966
[source,console]
7067
--------------------------------------------------
7168
GET _ml/filters/safe_domains

0 commit comments

Comments
 (0)