# Filter HTTP or filter ruby

**URL:** https://discuss.elastic.co/t/filter-http-or-filter-ruby/356477
**Category:** Logstash
**Created:** [March 29, 2024, 8:55pm UTC](https://discuss.elastic.co/t/filter-http-or-filter-ruby/356477 "2024-03-29T20:55:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![francieliton\_araujo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/francieliton_araujo/32/47771_2.png) [@francieliton\_araujo](https://discuss.elastic.co/u/francieliton_araujo)
#### Post date: [March 29, 2024, 8:55pm UTC](https://discuss.elastic.co/t/filter-http-or-filter-ruby/356477/1 "2024-03-29T20:55:29Z")

</div>

I need to make a new query in an api after INPUT, however the filter is giving an error.

´´´  
[ERROR] 2024-03-29 17:46:12.286 [[main]\>worker0] http - error during HTTP request {:url=\>"[teste.net](https://teste.net/teste)", :code=\>500, :headers=\>{"date"=\>"Fri, 29 Mar 2024 20:46:12 GMT", "content-length"=\>"0", "connection"=\>"keep-alive", "access-control-allow-credentials"=\>"true", "access-control-allow-origin"=\>"_", "access-control-expose-headers"=\>"_", "strict-transport-security"=\>"max-age=31536000; includeSubDomains", "x-xss-protection"=\>"1"}, :response=\>""}  
´´´

```auto
input {
        http_poller {
                urls => {
                        teste=> {
                                method => post
                                url => "https://msging.net/commands?status=Waiting"
                                        body => '{
                                                        "id": "teste",
                                                        "to": "teste@desk.teste.net",
                                                        "method": "get",
                                                        "uri": "/tickets?$take=1"
                                        }'
                        headers => {"Content-Type" => "application/json" "Authorization" => "Key teste"}
                        }
                }
                request_timeout => 20
                schedule => { every =>"1000000000000s"}
                codec => "json"
                metadata_target => "http_poller_metadata"
        # type => "elastic-blip"
        }
}
filter{
        if [type] == "application/vnd.lime.collection+json" {

 http {
        url => "https://teste.net/teste"
        target_body => '{
                "to": "teste@desk.teste.net",
                 "method": "get",
                 "uri": "/teste/teste/messages"
                 }'
        headers => {"Content-Type" => "application/json" "Authorization" => "Key teste"}
       }

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 26, 2024, 8:56pm UTC](https://discuss.elastic.co/t/filter-http-or-filter-ruby/356477/2 "2024-04-26T20:56:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
