I can successfully get a list of assets using the API call referenced here: InsightVM Cloud Integrations API
I am running into issues when I want to include multiple criteria in the search parameters. For instance. A single condition for an asset and or vulnerability works fine, as formatted here:
{
"asset": "last_scan_end > 2019-09-04T23:16:57.903Z",
"vulnerability": "severity IN ['Critical', 'Severe']"
}
But how would I specify an additional condition for asset; for example,
host_name CONTAINS 'abc123.com'
I have tried multiple ways, resulting in an error “Your query string format is not valid.” Some of the unsuccessful variations:
{
"asset": "host_name CONTAINS 'abc123.com' AND last_scan_end > 2019-09-04T23:16:57.903Z",
"vulnerability": "severity IN ['Critical', 'Severe']"
}
---
{
"asset": "host_name CONTAINS 'abc123.com' + last_scan_end > 2019-09-04T23:16:57.903Z",
"vulnerability": "severity IN ['Critical', 'Severe']"
}
---
{
"asset": "(host_name CONTAINS 'abc123.com') AND (last_scan_end > 2019-09-04T23:16:57.903Z)",
"vulnerability": "severity IN ['Critical', 'Severe']"
}