List Alerts
Get a list of alerts during the specified date range by invoking the following endpoint:
GET https://YourAccount.lacework.net/api/v2/Alerts?startTime={startTime}&endTime={endTime}
Use the following formats to specify the startTime and endTime:
-
yyyy-MM-dd for example, 2022-06-28
-
yyyy-MM-ddTHH for example, 2022-06-28T08
-
yyyy-MM-ddTHH:mm:ssZ for example, 2022-06-28T08:00:00Z
-
yyyy-MM-ddTHH:mm:ss.SSSZ for example, 2022-06-28T08:00:00.000Z
Here is an example invocation:
GET https://YourAccount.lacework .net/api/v2/Alerts?startTime=2022-06-30T00:00:00Z&endTime=2022-06-30T08:00:00Z
FortiCNAPP highly recommends specifying a time range. Without a specified time range, the request uses the default time range of 24 hours prior to the current time. The maximum time range per API request is 7 days.
Pagination metadata is located within the response's paging field, which contains information for rows, totalRows, and urls. The urls field contains the nextPage field with the Next Page URL. The Next Page URLs stay valid for 24 hours.
To get the next page of the result, use the entire Next Page URL and send a GET request with the two required HTTP headers: "Authorization: Bearer {YourAPIToken}" and "Content-Type: application/json".
Example:
GET https://YourAccount.lacework.net/api/v2/Alerts/abcxyz123...
Query parameters
Returns only recorded actions that occurred after this timestamp.
Returns only recorded actions that occurred before this timestamp. If empty or missing, the current time is used.
Headers
Bearer Access Token. For example, "Bearer {YourAPIToken}"
application/json
Response
No Error (List of Alerts)