Get anomaly detection job results for buckets
Added in 5.4.0
The API presents a chronological view of the records, grouped by bucket.
Path parameters
-
job_id
string Required Identifier for the anomaly detection job.
Query parameters
-
anomaly_score
number Returns buckets with anomaly scores greater or equal than this value.
-
desc
boolean If
true
, the buckets are sorted in descending order. -
end
string | number Returns buckets with timestamps earlier than this time.
-1
means it is unset and results are not limited to specific timestamps. -
exclude_interim
boolean If
true
, the output excludes interim results. -
expand
boolean If true, the output includes anomaly records.
-
from
number Skips the specified number of buckets.
-
size
number Specifies the maximum number of buckets to obtain.
-
sort
string Specifies the sort field for the requested buckets.
-
start
string | number Returns buckets with timestamps after this time.
-1
means it is unset and results are not limited to specific timestamps.
Body
-
anomaly_score
number Refer to the description for the
anomaly_score
query parameter. -
desc
boolean Refer to the description for the
desc
query parameter. end
string | number A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
-
exclude_interim
boolean Refer to the description for the
exclude_interim
query parameter. -
expand
boolean Refer to the description for the
expand
query parameter. -
page
object -
sort
string Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
start
string | number A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
curl \
--request POST 'http://api.example.com/_ml/anomaly_detectors/{job_id}/results/buckets' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"anomaly_score":42.0,"desc":true,"":"string","exclude_interim":true,"expand":true,"page":{"from":42.0,"size":42.0},"sort":"string"}'
{
"anomaly_score": 42.0,
"desc": true,
"": "string",
"exclude_interim": true,
"expand": true,
"page": {
"from": 42.0,
"size": 42.0
},
"sort": "string"
}
{
"buckets": [
{
"anomaly_score": 42.0,
"bucket_influencers": [
{
"anomaly_score": 42.0,
"": "string",
"influencer_field_name": "string",
"initial_anomaly_score": 42.0,
"is_interim": true,
"job_id": "string",
"probability": 42.0,
"raw_anomaly_score": 42.0,
"result_type": "string"
}
],
"": "string",
"event_count": 42.0,
"initial_anomaly_score": 42.0,
"is_interim": true,
"job_id": "string",
"result_type": "string"
}
],
"count": 42.0
}