v1

latestOpenAPI 3.0.3FortiCNAPP Use License2026-08-041754351.1 MB
Alerts

Search Alerts

Search alerts by invoking the following endpoint:

POST https://YourAccount.lacework.net/api/v2/Alerts/search

Optionally specify filters in the request body. For more information about using filters, see the Simple & Advanced Search section.

For the timeFilter filter, these are the supported time formats:

  • yyyy-MM-dd for example, 2022-07-08

  • yyyy-MM-ddTHH for example, 2022-07-08T08

  • yyyy-MM-ddTHH:mm:ssZ for example, 2022-07-08T08:00:00Z

  • yyyy-MM-ddTHH:mm:ss.SSSZ for example, 2022-07-08T08:00:00.000Z

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. To use the current time as the end time, exclude the endTime field.

To limit the returned result, optionally specify one or more filters in the request body. These fields can be set in the filters: alertId, alertType, severity, status, subCategory, category, and source. In the filter, specify the field on which to filter, the eq operator, and the value against which the field value is compared.

You can optionally filter the returned alerts by one or more of the top-level fields. See Filter Alerts for the filter values.

Here are some example body payloads:

  • { "timeFilter": { "startTime": "2022-07-08T00:00:00Z", "endTime": "2022-07-08T08:00:00Z"}, "filters": [ { "field": "alertType", "expression": "eq", "value": "SuspiciousUserFailedLogin" } ] }
  • { "timeFilter": { "startTime": "2022-07-08T00:00:00Z", "endTime": "2022-07-08T08:00:00Z"}, "filters": [ { "field": "severity", "expression": "eq", "value": "Critical" }, { "field": "status", "expression": "eq", "value": "Open" } ],
    "returns": [ "alertId", "alertName", "alertType", "alertInfo" ] }

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...

post/api/v2/Alerts/search

Headers

Authorizationstring required

Bearer Access Token. For example, "Bearer {YourAPIToken}"

Content-Typestring required

application/json

Request body

returnsstring[]

Use this attribute to specify which top-level fields of the response schema you want to receive.

Response

No Error (List of Alerts)