Skip to content

Commit 0933a97

Browse files
committed
[DOCS] Adds allow no datafeeds query param to the GET, GET stats and STOP datafeed APIs (elastic#44499)
1 parent 3697ddb commit 0933a97

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
@@ -42,6 +42,24 @@ IMPORTANT: This API returns a maximum of 10,000 {dfeeds}.
4242
wildcard expression. If you do not specify one of these options, the API
4343
returns statistics for all {dfeeds}.
4444

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

@@ -58,6 +76,13 @@ You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
5876
privileges to use this API. For more information, see
5977
{stack-ov}/security-privileges.html[Security Privileges].
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
@@ -39,6 +39,23 @@ IMPORTANT: This API returns a maximum of 10,000 {dfeeds}.
3939
wildcard expression. If you do not specify one of these options, the API
4040
returns information about all {dfeeds}.
4141

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

@@ -55,6 +72,13 @@ You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
5572
privileges to use this API. For more information, see
5673
{stack-ov}/security-privileges.html[Security Privileges].
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
@@ -36,6 +36,23 @@ comma-separated list of {dfeeds} or a wildcard expression. You can close all
3636
(string) Identifier for the {dfeed}. It can be a {dfeed} identifier or a
3737
wildcard expression.
3838

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

@@ -53,6 +70,13 @@ You must have `manage_ml`, or `manage` cluster privileges to use this API.
5370
For more information, see
5471
{stack-ov}/security-privileges.html[Security privileges].
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)