Really appreciate your help with this!
I actually tried both of those techniques and more, but unfortunately nothing works so far. Our internal REST API requires authentication so I'm using the "headerfield" option to pass a custom header containing an auth token. The method is "GET".
If I specify the "headerfield" and explicitly list the IP as part of the text of the URI then I get the expected response from the API for the IP in question. So it works for "hard coded" IPs. This shows that it's working and I have the header correct, but isn't useful for searches.
I also tried concatenating the IP field value to the URI (like you'd do with an eval: uri="http://www.ourcompany.com/internalapi/".ip) but that doesn't work either, and I get a 502 error. From the "curl_message" I can see a message from the API that no IP was passed.
The "datafield" method above doesn't work because the API I'm hitting won't accept a URL like "http://www.ourcompany.com/internalapi/?1.1.1.1". When I try that technique I get a 404 error. My guess is that "whois" wasn't as good an example as I'd intended since it appears more flexible than our API.
The "map" method above doesn't seem to pass the "headerfield", which I need for our authentication (we're passing a token in the header field). Using the map technique I get a 401 error. The "curl_response_url" appears correct (and it's hitting the API otherwise it would get a 404), but I guess the header is not being passed? The "curl_status" is 401, but the "curl_message" field contains "{… "error":"received Error Code: 405","success":false}".
(Apologies for lack of specifics but I'm trying to hit a company proprietary, internal API.)
Any other suggestions or thoughts are appreciated!
... View more