I’m working on a project that needs to utilize the InsightVM API so I can pull all of the host’s in an asset group. I have my API Key and I am utilizing it with Postman. I already validated my API key. The problem I am having is what URL I need to use I’ve tried https://us.api.insight.rapid7.com and my company’s own URL like https://mycompanysmanagedR7.com. I’ve read the documentation still no luck. With these URL’s I’ve tried GET requests for https://us.api.insight.rapid7.com/vm/v4/integration/assets/ and I’ve tried that for the other URL. Can anyone point me in the right direction?
You can refer to the documentation for InsightVM APIs, eg, InsightVM API (v3).
For the URL, try something similar to this https://localhost:3780/api/3/assets/{id}, so https://{host}:{port}/api/3/{endpoint} - if you’re using a company’s URL it might look something like https://mycompanysmanagedr7.com:3780/api/3/assets.
Hope this helps, all the best!!
Yes this is correct I am able to access the API through the browser but when I try through postman I get an 500 internal server error. Now this did happen when I tried accessing the API again through the browser but when I logged in again through the sign-on rapid7 I refreshed and it worked. So I am assuming this has something to do with the authentication. But for authentication I have tried the API token and using the basic auth with providing the MFA token. I’m really not sure what else to try to get access with postman.
If you auth with an api key you will always get a 500 when calling a ‘console’ api endpoint. The api key is only used for the ‘platform api’. You must use a console user for the local api. AFAIK and from my experience, YMMV.