Alerts Operations Count

Alerts Operations Count
Get active alert count for topbar badge - a count over the whole matching set, never derived from a capped list page

Counts security and license-expiration alerts for the navigation badge. activeCount is newCount plus acknowledgedCount, and count is the number of alerts in the requested states (activeCount when no state is given). Every figure is counted over the whole matching set and never derived from a capped list page. Requires the ADMIN, SECURITY_OPERATOR or AUDITOR role. Also accepts a Bearer API token with Read-only or Full access.

Request
URI
GET
https://{api_host}/api/v1/alerts/count
COPY
Query Parameters
of AlertState array
state
Optional

Filter by lifecycle states

state example
NEW

Authentication
This operation uses the following authentication methods.
Responses
200

200 OK successful response envelope. The alert counts for the requested states

Returns AlertCountResponse of type(s) application/json
{
    "activeCount": 3,
    "newCount": 2,
    "acknowledgedCount": 1,
    "count": 3
}
integer As int64 As int64
activeCount
Required  

Total count of active alerts requiring attention (NEW + ACKNOWLEDGED)

integer As int64 As int64
newCount
Required  

Count of un-triaged alerts in NEW state

integer As int64 As int64
acknowledgedCount
Required  

Count of alerts currently under triage in ACKNOWLEDGED state

integer As int64 As int64
count
Required  

Backwards-compatible alias for activeCount


400

400 Bad Request: INVALID_ARGUMENT when a state is not a known alert state

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


401

401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked

Returns Unauthenticated of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


403

403 Forbidden: PASSWORD_CHANGE_REQUIRED when the account must change its password first (only GET /api/v1/auth/session, POST /api/v1/auth/logout and POST /api/v1/auth/change-password are exempt); LICENSE_REQUIRED or LICENSE_EXPIRED while the license pool is restricted (no license, or expired past grace) (exempt: every route under /api/v1/auth, GET /api/v1/user/preferences, GET /api/v1/licensing/summary and POST /api/v1/licensing/licenses)

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/v1/alerts/count