Skip to content

Commit 4d09297

Browse files
committed
[DOCS] Adds allow no datafeeds query param to the GET, GET stats and STOP datafeed APIs (#44499)
1 parent 9d4f78f commit 4d09297

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed

docs/reference/ml/anomaly-detection/apis/get-datafeed-stats.asciidoc

+25
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@ IMPORTANT: This API returns a maximum of 10,000 {dfeeds}.
4949
or a wildcard expression. If you do not specify one of these options, the API
5050
returns statistics for all {dfeeds}.
5151

52+
[[ml-get-datafeed-stats-query-parms]]
53+
==== {api-query-parms-title}
54+
55+
`allow_no_datafeeds`::
56+
(Optional, boolean) Specifies what to do when the request:
57+
+
58+
--
59+
* Contains wildcard expressions and there are no {datafeeds} that match.
60+
* Contains the `_all` string or no identifiers and there are no matches.
61+
* Contains wildcard expressions and there are only partial matches.
62+
63+
The default value is `true`, which returns an empty `datafeeds` array when
64+
there are no matches and the subset of results when there are partial matches.
65+
If this parameter is `false`, the request returns a `404` status code when there
66+
are no matches or only partial matches.
67+
--
68+
69+
5270
[[ml-get-datafeed-stats-results]]
5371
==== {api-response-body-title}
5472

@@ -58,6 +76,13 @@ The API returns the following information:
5876
(array) An array of {dfeed} count objects.
5977
For more information, see <<ml-datafeed-counts>>.
6078

79+
[[ml-get-datafeed-stats-response-codes]]
80+
==== {api-response-codes-title}
81+
82+
`404` (Missing resources)::
83+
If `allow_no_datafeeds` is `false`, this code indicates that there are no
84+
resources that match the request or only partial matches for the request.
85+
6186
[[ml-get-datafeed-stats-example]]
6287
==== {api-examples-title}
6388

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

+24
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,23 @@ IMPORTANT: This API returns a maximum of 10,000 {dfeeds}.
4646
or a wildcard expression. If you do not specify one of these options, the API
4747
returns information about all {dfeeds}.
4848

49+
[[ml-get-datafeed-query-parms]]
50+
==== {api-query-parms-title}
51+
52+
`allow_no_datafeeds`::
53+
(Optional, boolean) Specifies what to do when the request:
54+
+
55+
--
56+
* Contains wildcard expressions and there are no {datafeeds} that match.
57+
* Contains the `_all` string or no identifiers and there are no matches.
58+
* Contains wildcard expressions and there are only partial matches.
59+
60+
The default value is `true`, which returns an empty `datafeeds` array when
61+
there are no matches and the subset of results when there are partial matches.
62+
If this parameter is `false`, the request returns a `404` status code when there
63+
are no matches or only partial matches.
64+
--
65+
4966
[[ml-get-datafeed-results]]
5067
==== {api-response-body-title}
5168

@@ -55,6 +72,13 @@ The API returns the following information:
5572
(array) An array of {dfeed} objects.
5673
For more information, see <<ml-datafeed-resource>>.
5774

75+
[[ml-get-datafeed-response-codes]]
76+
==== {api-response-codes-title}
77+
78+
`404` (Missing resources)::
79+
If `allow_no_datafeeds` is `false`, this code indicates that there are no
80+
resources that match the request or only partial matches for the request.
81+
5882
[[ml-get-datafeed-example]]
5983
==== {api-examples-title}
6084

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

+24
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,23 @@ comma-separated list of {dfeeds} or a wildcard expression. You can close all
4343
(Required, string) Identifier for the {dfeed}. It can be a {dfeed} identifier
4444
or a wildcard expression.
4545

46+
[[ml-stop-datafeed-query-parms]]
47+
==== {api-query-parms-title}
48+
49+
`allow_no_datafeeds`::
50+
(Optional, boolean) Specifies what to do when the request:
51+
+
52+
--
53+
* Contains wildcard expressions and there are no {datafeeds} that match.
54+
* Contains the `_all` string or no identifiers and there are no matches.
55+
* Contains wildcard expressions and there are only partial matches.
56+
57+
The default value is `true`, which returns an empty `datafeeds` array when
58+
there are no matches and the subset of results when there are partial matches.
59+
If this parameter is `false`, the request returns a `404` status code when there
60+
are no matches or only partial matches.
61+
--
62+
4663
[[ml-stop-datafeed-request-body]]
4764
==== {api-request-body-title}
4865

@@ -53,6 +70,13 @@ comma-separated list of {dfeeds} or a wildcard expression. You can close all
5370
(Optional, time) Controls the amount of time to wait until a {dfeed} stops.
5471
The default value is 20 seconds.
5572

73+
[[ml-stop-datafeed-response-codes]]
74+
==== {api-response-codes-title}
75+
76+
`404` (Missing resources)::
77+
If `allow_no_datafeeds` is `false`, this code indicates that there are no
78+
resources that match the request or only partial matches for the request.
79+
5680
[[ml-stop-datafeed-example]]
5781
==== {api-examples-title}
5882

0 commit comments

Comments
 (0)