Hi Hank,
On 18 Jun 2021, at 07:36, Hank Nussbacher <hank@interall.co.il> wrote:
On 18/06/2021 00:38, Edward Shryane wrote:
This helps as a start. I had played with standard search: http://rest.db.ripe.net/search?type-filter=inetnum&query-string=TEST but as per the documentation in github: https://github.com/RIPE-NCC/whois/wiki/WHOIS-REST-API-search with: type-filter Optional. If specified the results will be filtered by object-type, multiple type-filters can be specified.
doesn't seem to work since I am getting object-types other than inetnum (such as role or person). Unless I am doing something wrong. Can you clue me in to the proper syntax? Will type-filter=inetnum work on fulltextsearch as well?
Related objects are returned by default (this is also the behaviour on port 43: "-T inetnum TEST" will return related person/role objects). You need to add the "-r" flag to switch *off* referenced object lookup: "-T inetnum -r TEST" Or using the REST API, add the "flags=r" query parameter: http://rest.db.ripe.net/search?type-filter=inetnum&query-string=TEST&flags=r
Incidentally, the first and second examples on that RIPE github page: http://rest.db.ripe.net/search?inverse-attribute=org&type-filter=inetnum&source=ripe&query-string=ORG-NCC1-RIPE results in: ERROR:101: no entries found No entries found in source %s. Seems like source=ripe is causing issues.
The example uses the RIPE NCC organisation with org-type: RIR, that isn't referenced from any inetnum resources, which isn't very useful! A better example is RIPE NCC with org-type: LIR (ORG-RIEN1-RIPE) that *does* return inetnums: http://rest.db.ripe.net/search?inverse-attribute=org&type-filter=inetnum&source=ripe&query-string=ORG-RIEN1-RIPE I'll correct the examples, thanks for pointing it out. Regards Ed Shryane RIPE NCC