SQL query for fetching license and agent details

Hi All,

I have checked several sources including Github but i didnt found any query to fetch Licence details(Used, free, total ) and also Agent (installed , active, inactive, stale).

None of that information is contained within the SQL database.

However, you could use the Console API to get License details as well as querying the assets themselves to see the total amount of assets vs the actual license count. You would need to do some scripting or spit the results into a CSV or something to do the actual calculations for you though.

The agent details however is actually outside of the Console API and have their own GraphQL endpoint that you could hit to get all of those metrics. https://{{region-code}}.api.insight.rapid7.com/graphql

Getting below error "“message”: “Body of request is empty or nil”

For the Graphql endpoint you will need to share in the region code that you’re hosted in in replace of {{region-code}} and pass an API-key from the platform. If you’re using something like Postman to populate it, then it should come up as soon as you put in the API-Key