invoke a RESTful service from IS


I want to invoke a RESTful web service which of the ElasticSearch server from Integration server.

If I execute the below CURL commands on the Elastic search server console, it works.

If I execute curl -XPUT ‘’ -d’

“user” : “kimchy2”,
“post_date” : “2009-11-15T14:12:12”,
“message” : “trying out Elasticsearch2”

I get output as

“_index” : “twitter”,
“_type” : “tweet”,
“_id” : “1”,
“_version” : 3,
“_shards” : {
“total” : 2,
“successful” : 1,
“failed” : 0
“created” : false

Also curl -XGET ‘’ shows correct output.

How to invoke these APIs from Integration Server?
Will http client invocations such as with GET method solve the purpose?

Kindly advice how to invoke the get and put restful services on ElasticSearch server?

You can use “pub.client:http” to perform PUTs and GETs to/from Elastic Search.

I have attached an image which gives you a clear idea on how to do PUT. If you are interested in the response after the PUT then use “pub.string:bytesToString” to convert the bytes under body (body/bytes) what comes back from pub.client:http service.

GET is fairly straight forward:

  1. Map your request URL as-is to “url” input of pub.client:http service.
  2. Set “method” to “GET”
  3. DONE
1 Like

Thanks Prasad.

I tried both get and put to elasticSearch server via IS as you suggested.

But I get 403 forbidden access error from IS for both methods.

From Elastic Search console, it executes the commands.

Is there any setting to be done on ElasticSearch side to enable IS to put and get via http requests?


You do not need to do any setting on Elastic Search side to perform PUTs and GETs. Are you passing in the authentication details that are required to access elastic search in your pub.client:http service?

I have attached a new image that shows you where to set the authentication details in pub.client:http.

1 Like

Hi Pramod,

I gave basic authentication parameters with user I had created to run te elasticsearch server with the password.
But still I get 403 error.
I converted the bytes to string and got the below string.

Access control configuration prevents your request from being allowed at this time.

Please verify your proxy-settings. Should point at http:/ for automatic configuration script(PAC)

If you still think this is incorrect, support mail is <a href="

I will reach out to my network guy to dig into it.

Complete response from bytes to string :

ERROR: The requested URL could not be retrieved

Revathi, it looks like your IS is not able to reach the elastic search URL. Is it on the internet or outside your network? Does it require to configure a proxy?

Actually IS and Elasticsearch servers are installed on same machine.
Because this is the dev environment.
When I tweak the URL to have localhost instead of IP of the machine, I get connection refused with ACL and invocation related classes. Connection refused
at pub.clientimpl.http(
at sun.reflect.GeneratedMethodAccessor1598.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.wm.lang.flow.FlowInvoke.invoke(
at com.wm.lang.flow.FlowState.invokeNode(

Check if there are any “Proxy” servers configured on your Dev environment. If you see any, disable them temporarily and try to call your service again with “IP Address” instead of “localhost”

Ok, checking with the network guy.
Will let you know once it works.


if proxies are configured, you might want to add your IP adress to the proxy bypass list.