# Define Action in http output

**URL:** <https://discuss.elastic.co/t/define-action-in-http-output/59112>\
**Category:** Logstash\
**Created:** [August 28, 2016, 9:16am UTC](https://discuss.elastic.co/t/define-action-in-http-output/59112 "2016-08-28T09:16:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)\
**Post date:** [August 28, 2016, 9:16am UTC](https://discuss.elastic.co/t/define-action-in-http-output/59112/1 "2016-08-28T09:16:20Z")

</div>

How to define action in http output?

Here is my http output file

```
output {
  http {
    url => "https://xyz,com?WSDL"
	content_type => "text/xml;charset=UTF-8"
    http_method => "post"
    format => "message" 
	message=> "create_object_service_name"
    mapping => ["Name", "%{subject}", "Description","%{message}"]
	headers => ["Host: xyz.com:443","Authorization: Basic a2V2aW4uc2Nob3R0OlhEQzg4NTk0"]
  }
}
```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 28, 2016, 9:28am UTC](https://discuss.elastic.co/t/define-action-in-http-output/59112/2 "2016-08-28T09:28:29Z")

</div>

What do you mean by action?

---

<div class="post-metadata">

**Author:** ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)\
**Post date:** [August 28, 2016, 9:35am UTC](https://discuss.elastic.co/t/define-action-in-http-output/59112/3 "2016-08-28T09:35:18Z")

</div>

By Action i mean SOAP Action like Create/Update/Delete

I tried my solution using SOAP UI that is working well.  
I my case i need only POST data, so i am using http outpit

I want to incorporate same here with logstash http-output

I want to define the following stuff in my output config file

```
Endpoint
Username
Password
SOAP Request URL
Pass the variable value for sending the data to endpoint

```

I posted one more question in forum, but i ddint got any response so I proceeded with this  
steps  
This is previously posted question

> [@How to send data to a http end point using LS output plugin](https://discuss.elastic.co/t/how-to-send-data-to-a-http-end-point-using-ls-output-plugin/58959):
>
> Hi All I have a CSV file which contains three simple fields and i want post its value one after another to http endpoint using LS http output plugin The csv files contain 3 header : Name, Description, Age The end point WSDL URL is https://abc.xyz.com/acnUserService/UserService?WSDL I have its username and Password For End point i have a XML \<?xml version="1.0" encoding="UTF-8"?\> \<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ide="http://xmlns.xxxx.com/a…

Please let me know if we can do this?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 28, 2016, 9:55am UTC](https://discuss.elastic.co/t/define-action-in-http-output/59112/4 "2016-08-28T09:55:33Z")

</div>

You can do [https://www.elastic.co/guide/en/logstash/current/plugins-outputs-http.html#plugins-outputs-http-http\_method](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-http.html#plugins-outputs-http-http_method) only.

---

<div class="post-metadata">

**Author:** ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)\
**Post date:** [August 28, 2016, 10:01am UTC](https://discuss.elastic.co/t/define-action-in-http-output/59112/5 "2016-08-28T10:01:56Z")

</div>

Yes i understand that

In my **headers** , i want to define  
Username, password, Authentication : Basic/NTLM,

and in **message** data with variables.

How to use parameters to define. In the documentation it is not clear.

Is it possible for you to give me any example config file of http output for SOAP. where we can do POST action

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [August 28, 2016, 2:57pm UTC](https://discuss.elastic.co/t/define-action-in-http-output/59112/6 "2016-08-28T14:57:51Z")

</div>

Just read the html output doc it has a field for custom headers

[https://www.elastic.co/guide/en/logstash/current/plugins-outputs-http.html#plugins-outputs-http-headers](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-http.html#plugins-outputs-http-headers)

---

<div class="post-metadata">

**Author:** ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)\
**Post date:** [August 28, 2016, 3:10pm UTC](https://discuss.elastic.co/t/define-action-in-http-output/59112/7 "2016-08-28T15:10:18Z")

</div>

Hi

Thanks for responding this.  
I don't think i will have to create a new plugin.

The information that i am lacking here is how to provide this below information  
Username  
Password  
Send Data with variables

I have read a blog, where he has tried out this, but that is incomplete for me

> **[How to Configure the HTTP Logstash output - EagerElk](http://blog.eagerelk.com/how-to-configure-the-http-logstash-output/)**
>
> This short guide will look at the HTTP output for Logstash. HTTP is ubiquitous on the Internet. So much so that most people don’t even know they use it every day. Most API’s out there use HTTP. Logstash provides both an HTTP input and output,...

But i don't have information with practical example. So basically i have incomplete information how to define

message and header

---

<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:** [July 6, 2017, 4:41am UTC](https://discuss.elastic.co/t/define-action-in-http-output/59112/8 "2017-07-06T04:41:17Z")

</div>


