List AWS or Azure cloud connectors using API

Hello,
Is there a way to list the AWS or Azure discovery connectors in InsightVM?

I tried using get_discovery_connections, but it’s not working as expected.

Hello @Alex ,

When you say that it is not working as expected, can you provide a bit more information as to what is occurring please?

I’ve included the URL of the InsightVM REST API documentation, in case that is helpful to you.
https://help.rapid7.com/insightvm/en-us/api/index.html#tag/Asset-Discovery

Cheers,
Joel

Hi @Alex,

I would suggest opening a support case with Rapid7 support from here. The connections should be listed, and the support team will need to take some investigative steps to determine why they are not returned when you make the API call

When I run the API code or API call, I don’t get the discovery connections I’m expecting, I only received 1 ( see below)

{‘links’: [{‘href’: ‘https://rapid7-console-url:3780/api/3/discovery_connections?page=0&size=10&sort=sort_example,asc’,
‘rel’: ‘self’}],
‘page’: {‘number’: 0, ‘size’: 10, ‘total_pages’: 1, ‘total_resources’: 1},
‘resources’: [{‘access_key_id’: None,
‘address’: None,
‘arn’: None,
‘aws_session_name’: None,
‘connection_type’: None,
‘event_source’: None,
‘exchange_server_hostname’: None,
‘exchange_user’: None,
‘folder_path’: None,
‘id’: 1,
‘ldap_server’: None,
‘links’: [{‘href’: ‘https://rapid7-console-url:3780/api/3/discovery_connections/1’,
‘rel’: ‘self’}],
‘name’: ‘Sonar’,
‘port’: None,
‘protocol’: None,
‘region’: None,
‘scan_engine_is_inside_aws’: None,
‘secret_access_key’: None,
‘status’: ‘Connected’,
‘username’: None,
‘win_rm_server’: None}]}

See code:

api_instance = rapid7vmconsole.AssetDiscoveryApi(client)
api_response = api_instance.get_discovery_connections()

I also get the same result in the browser:
https://rapid7-console-url:3780/api/3/discovery_connections

1 Like

Hi Alex,
Did you manage to raise and receive a response from support?
I’m seeing the same behavior in another environment.

Raised a ticket with R7 support, provided diagnostic info, but I haven’t received a solution yet. Will keep you posted.

1 Like