This example describes how to search for discovered hosts where given TCP/UDP ports are open, and see if they have already been scanned for vulnerabilities.
-
- Get a list of discovery scans within the current organization:
curl -X POST https://api.radar.f-secure.com/api/integration/discoveryscans\
/withstartindex/0/andpagesize/1000
-H ‘Content-Type: application/json’
-H ‘ApiAccessKey: {ApiAccessKey}’
-H ‘ApiSecretKey: {ApiSecretKey}’
-d ”
-
- Extract the unique Id identifier from each of the returned discovery scans.
- Get a list of hosts assigned to each discovery scan:
Use the previously extracted discovery scan Id as a parameter.
curl -X POST https://api.radar.f-secure.com/api/integration/discoveryscans\
/{discoveryScanId}/reports/latest/hosts/withstartindex/0/andpagesize/100
-H ‘Content-Type: application/json’
-H ‘ApiAccessKey: {ApiAccessKey}’
-H ‘ApiSecretKey: {ApiSecretKey}’
-d ”
-
- Extract Ports from each of the returned hosts and take into account only those where the given TCP/UDP ports were found open.
A unique SystemScanLastReportId identifier for the selected host indicates that it has already been scanned for vulnerabilities.