HackNotice icon

HackNotice

Call the HackNotice extensions API (alerts, assessments, and more)

Actions85

First Party Alert → Get First Party Alert Count

AI-generated

Summary

Fetches the total count of first party alerts matching the selected saved search and optional filters.

Inputs

  • firstPartySavedSearchId — Saved search name or ID. Uses the saved search's filter criteria if provided.
  • timeRange — Optionally filter alerts by time (Last Day, Last Week, Last Month, or Custom Date Range).
  • startDate — Start date for the custom date range (required when timeRange is 'custom').
  • endDate — End date for the custom date range (required when timeRange is 'custom').
  • alertAdditionalFilters — Additional JSON filters to merge into the request body, overriding saved search filters.

Output shape

A single record containing the alert count, page size, and total page count.

Returns an object with 'count' (the total number of matching alerts), 'pageSize', and 'pageCount'.

Examples

Example 1: Count first party alerts from the last 7 days using a custom date range.

timeRange: 'custom', startDate: '2023-01-01', endDate: '2023-01-07'

Example 2: Count alerts using a saved search filter without time restrictions.

firstPartySavedSearchId: 'Saved Search Name', timeRange: 'none'

Example 3: Count alerts applying a custom filter to the saved search results.

firstPartySavedSearchId: 'Saved Search Name', alertAdditionalFilters: '{ "password_length": 12 }'

Links

Discussion