POST Alerts Pending Test
The POST /Alerts/Pending/Test method is used to test individual pending certificate request alerts. This method returns HTTP 200 OK on a success with details about the resulting alerts generated.
Tip: Alerts are generated for all certificate requests that have not previously been alerted on, unless the system has been configured to send multiple alerts per request. By default, one alert is sent to each recipient for any given request. The number of alerts to send for a given request is configurable with the
Pending Alert Max Reminders setting in
Keyfactor Command application settings (see
Application Settings: Console Tab). If a certificate remains in a pending state after the configured number of alerts has been sent, no further alerts will be sent.
By default, a maximum of 100 alerts will be generated during a test. The maximum value is configurable with the Pending 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) when the test is run. This is true regardless of the setting of the sendAlertsEmails flag.
Tip: The following permissions (see
Security Roles and Claims) are required to use this feature:
/monitoring/alerts/read/
/monitoring/alerts/test/
Important: This has been deprecated since it only works with the legacy alerting system. It is retained for backwards compatibility, but new development should not use this method.
Table 220: POST Alerts Pending Test Input Parameters
AlertId |
Body |
An integer indicating the Keyfactor Command reference ID for the pending alert. |
SendAlerts |
Body |
A Boolean indicating whether to send alert emails with the test (true), or not (false). |
Table 221: POST Alerts Pending Test Response Data
PendingAlerts |
An object containing alert details resulting from the test. Show pending alert details.
Subject |
A string indicating the subject for the email message that will be delivered when the alert is triggered.
Tip: Substitutable special text may be used in the subject line. Substitutable special text uses a variable in the alert definition that is replaced by data from the certificate request or certificate metadata at processing time. For example, you can enter {rcn} in the alert definition and each alert generated at processing time will contain the specific requested common name of the given certificate request instead of the variable {rcn}.
|
Message |
A string indicating the email message that will be delivered when the alert is triggered. The email message is made up of regular text and substitutable special text. If desired, you can format the message body using HTML.
|
Recipients |
An array of strings containing a list of strings with the recipients for the alert. Each alert can have multiple recipients. You can use specific email addresses and/or use substitutable special text to replace an email address variable with actual email addresses at processing time.
|
CARequestId |
An string containing the CA's reference ID for the certificate request. |
CommonName |
A string indicating the common name of the certificate request. |
LogicalName |
A string indicating the logical name of the certificate authority from which the certificate was requested. |
|
AlertBuildResult |
A string indicating the result of pending alerts test (e.g. Success). |
Tip: See the
Keyfactor API Reference and Utility which provides a utility through which the
Keyfactor endpoints can be called and results returned. It is intended to be used primarily for validation, testing and development. It also serves secondarily as documentation for the API. The link to the
Keyfactor API Reference and Utility is in the dropdown from the help icon (

) at the top of the
Management Portal page next to the
Log Out button.