Tests a Grok pattern on some text Added in 8.13.0
Query parameters
-
ecs_compatibility string
The mode of compatibility with ECS compliant Grok patterns (disabled or v1, default: disabled).
Body Required
-
Lines of text to run the Grok pattern on.
GET /_text_structure/test_grok_pattern
curl \
-X GET http://api.example.com/_text_structure/test_grok_pattern \
-H "Content-Type: application/json" \
-d '{"grok_pattern":"string","text":["string"]}'
Request examples
{
"grok_pattern": "string",
"text": [
"string"
]
}
Response examples (200)
{
"matches": [
{
"matched": true,
"fields": {
"additionalProperty1": [
{
"match": "string",
"offset": 42.0,
"length": 42.0
}
],
"additionalProperty2": [
{
"match": "string",
"offset": 42.0,
"length": 42.0
}
]
}
}
]
}