Forum Discussion
gfeng
Aug 12, 2022Copper Contributor
KQL "externaldata" operator fail
KQL code as follow: let ipdetail=(ip:string) { let myurl=strcat('"https://ipapi.co/', ip, '/json"'); let mydetail=externaldata(detail:string )[h@myurl]with(format="raw"); mydetail...
Clive_Watson
Aug 12, 2022Bronze Contributor
I'm not sure that will do what you need. You can build the string this way
let ipdetail= (ip:string) { strcat('externaldata(detail:string )[h@"', strcat("https://ipapi.co/",ip,'/json'),'"]with(format="raw")') };
print ipdetail("18.140.16.195")
However the result is the string you built not the result of the execution of the externaldata operator