Create scrpit to add field calling API

Hello,
I wand a add a field by a painless (or another scripting language) to call an API data and show the result in the field by emit for example ???

To be more clearly exactly, for example i have an API http://xxx.xxx.xxx.xxx:yyy?v1=x1&v2=x2&ip=ip1 where ip1 can be retrieve by doc["ipadd.keyword'].value.
Example :

def s = doc['src.keyword'].value;
def v = http://xxx.xxx.xxx.xxx:yyy?v1=x1&v2=x2&ip=s;
if (v ){
    return emit("True");
}
else {
	emit("False");
}

The task is very important for us and i need your help for this if someone directed me to the right path please.

Thanks for the support

You want painless to call an external URL? That's not possible as it's a security risk.

1 Like

Hello @warkolm thanks for your response,

Is there any other way to do what I want to do without using painless but another kibana script or even with the http filter ???

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