I only want to see vulnerabilities for hosts that have been running in last 8 hours in my vulnerability reports. How can I craft my API calls to achieve this?
Agent
N/A
Platform
N/A
Cloud
N/A
I only want to see vulnerabilities for hosts that have been running in last 8 hours in my vulnerability reports. How can I craft my API calls to achieve this?
Agent
N/A
Platform
N/A
Cloud
N/A
If I understood the question correctly, you want a list of vulnerabilities for hosts over an 8hr period of time. In this case, you will need to make an API call to:
{{baseUrl}}/api/v2/Vulnerabilities/Hosts/search then in the body, filter by the time.
baseUrl = https://yourinstance.lacework.net
So the API call would look something like this, but adjust your time to the time period that you are looking for, but note that it can not exceed 7 days from start to end time.
Example Time Filter:
{ "timeFilter": {
"startTime": "2023-09-07T00:30:00Z",
"endTime": "2023-09-07T08:30:00Z"
}
}
If you have Postman setup:
Once you get the unfiltered JSON returned, then you can see what data it returns and adjust further fields or filters to match what you are specifically looking for.
Information about setting up postman and also API calls can be found in the following links:
API Information - Vulnerabilities
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.