IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Get influencers API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Get influencers API
editRetrieves anomaly detection job results for one or more influencers.
Request
editGET _ml/anomaly_detectors/<job_id>/results/influencers
Prerequisites
edit-
If the Elasticsearch security features are enabled, you must have
monitor_ml,monitor,manage_ml, ormanagecluster privileges to use this API. You also needreadindex privilege on the index that stores the results. Themachine_learning_adminandmachine_learning_userroles provide these privileges. See Security privileges and Built-in roles.
Path parameters
edit-
<job_id> - (Required, string) Identifier for the anomaly detection job.
Request body
edit-
desc - (Optional, boolean) If true, the results are sorted in descending order.
-
end - (Optional, string) Returns influencers with timestamps earlier than this time.
-
exclude_interim - (Optional, boolean) If true, the output excludes interim results. By default, interim results are included.
-
influencer_score - (Optional, double) Returns influencers with anomaly scores greater than or equal to this value.
-
page -
-
from - (Optional, integer) Skips the specified number of influencers.
-
size - (Optional, integer) Specifies the maximum number of influencers to obtain.
-
-
sort -
(Optional, string) Specifies the sort field for the requested influencers. By
default, the influencers are sorted by the
influencer_scorevalue. -
start - (Optional, string) Returns influencers with timestamps after this time.
Response body
editThe API returns the following information:
-
influencers - (array) An array of influencer objects. For more information, see Influencers.
Examples
editThe following example gets influencer information for the it_ops_new_kpi job:
GET _ml/anomaly_detectors/it_ops_new_kpi/results/influencers
{
"sort": "influencer_score",
"desc": true
}
In this example, the API returns the following information, sorted based on the influencer score in descending order:
{
"count": 28,
"influencers": [
{
"job_id": "it_ops_new_kpi",
"result_type": "influencer",
"influencer_field_name": "kpi_indicator",
"influencer_field_value": "online_purchases",
"kpi_indicator": "online_purchases",
"influencer_score": 94.1386,
"initial_influencer_score": 94.1386,
"probability": 0.000111612,
"bucket_span": 600,
"is_interim": false,
"timestamp": 1454943600000
},
...
]
}