Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - [Docs] Add example for filter-http #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,37 @@ include::{include_path}/plugin_header.asciidoc[]

==== Description

The HTTP filter provides integration with external web services/REST APIs.
The HTTP filter integrates with external web services/REST APIs, and enables
lookup enrichment against any HTTP service or endpoint. This plugin is well
suited for many enrichment use cases, such as social APIs, sentiment APIs,
security feed APIs, and business service APIs.

*Sample*

[source,txt]
-----
http {
url => "https://neutrinoapi.com/convert"
body => {
"user-id" => "auser"
"api-key" => "anapikey"
"from-value" => "%{millimeters}"
"from-type" => "mm"
"to-type" => "inch"
}
verb => "POST"
body_format => "json"
target_body => "neutrinoapi_convert_mm_to_in"
add_tag => ["from_api"]
id => "http-neutrino-lookup"
}
mutate {
# needed because the neutrino response JSON object includes unneeded extra key/values
copy => {"[neutrinoapi_convert_mm_to_in][result]" => "[inches]"}
remove_field => ["neutrinoapi_convert_mm_to_in"]
id => "copy-to-inches"
}
-----

[id="plugins-{type}s-{plugin}-options"]
==== HTTP Filter Configuration Options
Expand Down