POST Alerts Expiration Test
The POST /Alerts/Expiration/Test method is used to test individual certificate expiration alerts. This method returns HTTP 200 OK on a success with details about the resulting alerts generated or a response of “NoActionTaken” if no certificates match the test criteria entered.
By default, a maximum of 100 alerts will be generated during a test. The maximum value is configurable with the Expiration Alert Test Result Limit setting in Keyfactor Command application settings (see Application Settings: Console Tab). If more than 100 alerts are generated, no email messages will be sent and you'll have the opportunity to view the first 100 alerts generated.
If you're using an event handler, the event handler is run and the handler actions taken (PowerShell script run, event log message written, certificates renewed) when the test is run. This is true regardless of the setting of the SendAlerts flag.

Table 172: POST Alerts Expiration Test Input Parameters
Name |
In |
Description |
---|---|---|
AlertId | Body |
n integer indicating the reference ID of expiration alert to test. Use the GET /Alerts/Expiration method (see GET Alerts Expiration) to retrieve a list of all your expiration alerts to determine the alert Id. |
EvaluationDate | Body |
A string indicating the simulation date for the test. The date and time should be given using the ISO 8601 UTC time format YYYY-MM-DDTHH:mm:ss.000Z (e.g. 2023-11-19T16:23:01Z). You can use the date, along with the PreviousEvaluationDate, to simulate running the alerts a month from now instead of today, for example. |
PreviousEvaluationDate | Body | A string indicating the date to simulate as the last test run date for the test. The date and time should be given using the ISO 8601 UTC time format YYYY-MM-DDTHH:mm:ss.000Z (e.g. 2023-11-19T16:23:01Z). |
SendAlerts | Body | A Boolean indicating whether to send alert emails with the test (true) or not (false). The default is false. |
Table 173: POST Alerts Expiration Test Response Data
Parameter | Description |
---|---|
ExpirationAlerts |
An object containing alert details resulting from the test. |
AlertBuildResult | A string indicating the outcome of the test (e.g. Success). |


