removed validate API

This commit is contained in:
ashwinkumar12345 2021-10-04 12:32:08 -07:00
parent f12f4efc02
commit f0f770bfad
1 changed files with 0 additions and 139 deletions

View File

@ -1230,145 +1230,6 @@ DELETE _plugins/_anomaly_detection/detectors/results
---
## Validate detector
Introduced 1.1
{: .label .label-purple }
Validates detector before creating. Lists any invalid fields in your configuration and recommends ways to fix these invalid fields.
#### Request
```json
POST _plugins/_anomaly_detection/detectors/_validate/detector,model
{
"name": "test-detector",
"description": "Test detector",
"time_field": "timestamp",
"indices": [
"order*"
],
"feature_attributes": [
{
"feature_name": "total_order",
"feature_enabled": true,
"aggregation_query": {
"total_order": {
"sum": {
"field": "value"
}
}
}
}
],
"filter_query": {
"bool": {
"filter": [
{
"exists": {
"field": "value",
"boost": 1
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"detection_interval": {
"period": {
"interval": 1,
"unit": "Minutes"
}
},
"window_delay": {
"period": {
"interval": 1,
"unit": "Minutes"
}
},
"category_field": [
"hc_field"
],
"shingle_size": 8
}
```
#### Sample response
```json
{
"detector": {
"name": {
"message": "name should be set|duplicate"
},
"time_field": {
"message": "time_field should be set missing|not_exist"
},
"indices": {
"message": "should be set|not_exist|empty"
},
"feature_attributes": {
"problematic_feature_name1": {
"message": "{field} is invalid with {exceptionMessage}"
}
"problematic_feature_name2": {
"message": "{field} is invalid with {exceptionMessage}"
},
"message": "there exists non-numeric field|duplicate feature names|over 5 features|duplicate feature aggregation query names"
},
"detection_interval": {
"message": "detection_interval should be set|Interval should be non-negative|unit is not supported"
},
"category_field": {
"message": "must only 1 field, and must be IP address or keyword type"
},
"shingle_size": {
"message": "must be between 1 and 1000"
},
},
"model": {
"filter_query": {
"message": "data is too sparse after filter_query is applied"
},
"detection_interval": {
"suggested_value": {
"period": {
"interval": 1,
"unit": "Minutes"
}
}
"message": "use suggested value|no suggested value found, ingest more data"
},
"category_field": {
"message": "data with {category_field} is too sparse, ingest more data"
},
"feature_attributes": {
"problematic_feature_name1": {
"message": "data is too sparse, ingest more data with this {field}"
}
"problematic_feature_name2": {
"message": "data is too sparse, ingest more data with this {field}"
},
"message": "data is too sparse, ingest more data"
},
"memory": {
"message": "model size exceeds memory limit, please stop/delete unused detectors, or reduce shingle size or number of features"
},
"window_delay": {
"suggested_value": {
"period": {
"interval": 1,
"unit": "Minutes"
}
},
"message": "use suggested value(if it exists), and ingest more data if possible"
}
}
}
```
---
## Update detector
Introduced 1.0