Skip to content

Commit cc33a99

Browse files
committed
[DOCS] Adds allow no jobs param to the GET, GET stats and Close APIs (#44503)
1 parent 1943444 commit cc33a99

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,20 @@ results the job might have recently produced or might produce in the future.
5959
[[ml-close-job-query-parms]]
6060
==== {api-query-parms-title}
6161

62+
`allow_no_jobs`::
63+
(Optional, boolean) Specifies what to do when the request:
64+
+
65+
--
66+
* Contains wildcard expressions and there are no jobs that match.
67+
* Contains the `_all` string or no identifiers and there are no matches.
68+
* Contains wildcard expressions and there are only partial matches.
69+
70+
The default value is `true`, which returns an empty `jobs` array
71+
when there are no matches and the subset of results when there are partial
72+
matches. If this parameter is `false`, the request returns a `404` status code
73+
when there are no matches or only partial matches.
74+
--
75+
6276
`force`::
6377
(boolean) Use to close a failed job, or to forcefully close a job which has not
6478
responded to its initial close request.
@@ -73,6 +87,13 @@ results the job might have recently produced or might produce in the future.
7387
You must have `manage_ml`, or `manage` cluster privileges to use this API.
7488
For more information, see {stack-ov}/security-privileges.html[Security privileges].
7589

90+
[[ml-close-job-response-codes]]
91+
==== {api-response-codes-title}
92+
93+
`404` (Missing resources)::
94+
If `allow_no_jobs` is `false`, this code indicates that there are no
95+
resources that match the request or only partial matches for the request.
96+
7697
[[ml-close-job-example]]
7798
==== {api-examples-title}
7899

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ IMPORTANT: This API returns a maximum of 10,000 jobs.
3737
or a wildcard expression. If you do not specify one of these options, the API
3838
returns statistics for all jobs.
3939

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

@@ -53,6 +70,13 @@ You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
5370
privileges to use this API. For more information, see
5471
{stack-ov}/security-privileges.html[Security Privileges].
5572

73+
[[ml-get-job-stats-response-codes]]
74+
==== {api-response-codes-title}
75+
76+
`404` (Missing resources)::
77+
If `allow_no_jobs` 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-get-job-stats-example]]
5781
==== {api-examples-title}
5882

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ IMPORTANT: This API returns a maximum of 10,000 jobs.
3737
or a wildcard expression. If you do not specify one of these options, the API
3838
returns information for all jobs.
3939

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

@@ -53,6 +70,13 @@ You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
5370
privileges to use this API. For more information, see
5471
{stack-ov}/security-privileges.html[Security Privileges].
5572

73+
[[ml-get-job-response-codes]]
74+
==== {api-response-codes-title}
75+
76+
`404` (Missing resources)::
77+
If `allow_no_jobs` 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-get-job-example]]
5781
==== {api-examples-title}
5882

0 commit comments

Comments
 (0)