Configure RIPE NCC API Tools

Hello,
Do you know how to configure the RIPE NCC API Tools? I have the error message: RIPE API call failed: The parameter ‘resource’ is requiered.
Thank you

Maybe : RIPEstat docs | Whois | Docs and RIPEstat docs | Abuse Contact Finder | Docs

I occasionally get an error in /opt/librenm/log/librenms.log

[2022-11-07T14:28:58.644708+01:00] production.ERROR: cURL error 28: Connection timed out after 3001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://stat.ripe.net/data/abuse-contact-finder/data.json?query%5Bresource%5D=ns328855.ip-37-187-115.eu {"userId":1,"exception":"[object] (Illuminate\\Http\\Client\\ConnectionException(code: 0): cURL error 28: Connection timed out after 3001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://stat.ripe.net/data/abuse-contact-finder/data.json?query%5Bresource%5D=ns328855.ip-37-187-115.eu at /opt/librenms/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:711)
[previous exception] [object] (GuzzleHttp\\Exception\\ConnectException(code: 0): cURL error 28: Connection timed out after 3001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://stat.ripe.net/data/abuse-contact-finder/data.json?query%5Bresource%5D=ns328855.ip-37-187-115.eu at /opt/librenms/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210)"} 

And indeed ‘resource’ is not complete in the request above or below:

https://stat.ripe.net/data/abuse-contact-finder/data.json?query[resource]=ns328855.ip-37-187-115.eu

If I replace/correct directly in the URL : …data.json?resource=ns328855.ip-37-187-115.eu

https://stat.ripe.net/data/abuse-contact-finder/data.json?resource=ns328855.ip-37-187-115.eu

I don’t have the error anymore ! A bad formation of the URL in the code ?
Thanks

When I click to validate my request on “Query” and I look in firefox debug mode. I have :slight_smile:

The …/ajax/ripe/raw page does not exist ?

If I modify the code directly, it works! Is it possible to update the code correctly, Thanks


librenms:~/app/ApiClients$ diff RipeApi.php RipeApi.php.sav 
46c46,48
<                 'resource' => $resource
---
>             'query' => [
>                 'resource' => $resource,
>             ],

Capture d’écran de 2022-11-08 16-31-41

You can fix it in one spot further down as an alternative:

However I can’t get the abuse contact one to display content, despite it returning data in the browser:

Versus whois which works, can’t find the (probably very obvious) magic:

Thanks, it works as well and I prefer your code
I will look at the “powder magic” for the “Abuse contact finder”.:slight_smile:

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