PUT Alerts Expiration
The PUT /Alerts/Expiration method is used to update an expiration alert. This method returns HTTP 200 OK on a success with details about the alert.
Table 154: PUT Alerts Expiration Input Parameters
Name |
In |
Description |
---|---|---|
id | Path | Required. An integer indicating the Keyfactor Command reference ID of the expiration alert. |
DisplayName | Body | Required. A string indicating the display name for the expiration alert. This name appears in the Expiration Certificate Request Alerts grid in the Management Portal. |
Subject | Body |
Required. 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 or certificate metadata at processing time. For example, you can enter {cn} in the alert definition and each alert generated at processing time will contain the specific common name of the given certificate instead of the variable {cn}.
|
Message | Body |
Required. 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. For example: Copy
See Table 6: Substitutable Special Text for Expiration Alerts for a complete list of available substitutable special text strings. Note: The $(requester:givenname) substitutable special text token is only supported in environments using Active Directory as an identity provider.
|
ExpirationWarningDays | Body |
Required. An integer indicating the number of days prior to expiration to send the warning. Example: When alerts run, the alert engine reports on all the certificates expiring within the next X days (e.g. 30 days) from the execution time that have not previously been reported on. This means that if the alerts run daily and have been running daily regularly for some time, only a single day of expiring certificates will be reported on by any given alert run.
For example, say you create a new alert that has never run before for collection A and set it to 30 days. You configure it to run daily at 5:00 am. The alert runs for the first time at 5:00 am on July 1st. All the certificates in collection A that will expire between July 1st at 12:oo am UTC and July 31 at 12:00 am UTC will be alerted on. The next day when the alert runs again at 5:00 am on July 2nd, the certificates in collection A expiring between July 31st at 12:00 am UTC and August 1st at 12:00 am UTC will be alerted on. If alerts are missed for a period of time (due to an outage, for example), the next run of the alerts will check the previous successful run date for the alerts and report on certificates expiring X days from that outage window. For example, using the collection A alert referenced above, say an outage caused the alerts not to run on August 1 and August 2. On August 3, the alert would run again at 5:00 am, and the certificates in collection A expiring between August 30th at 12:00 am UTC and September 2nd at 12:00 am UTC would be alerted on. |
Recipients | Body |
An array of strings containing 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. Available email substitutable special text strings include:
|
CertificateQueryId | Body |
Required. An integer indicating the certificate collection on which to base the alert. Use the GET /CertificateCollections method (see GET Certificate Collections) to retrieve a list of all the certificate collections to determine the collection ID. |
RegisteredEventHandler | Body | An object containing the event handler configuration for the alert, if applicable. ![]() For more information about event handlers, see Using Event Handlers. |
EventHandlerParameters | Body |
An array of objects containing the parameters configured for use by the event handler. The type of data will vary depending on the configured handler. For example, for a PowerShell handler: Copy
|
Table 155: PUT Alerts Expiration Response Data
Name | Description |
---|---|
Id | An integer indicating the Keyfactor Command reference ID of the expiration alert. |
DisplayName | A string indicating the display name for the expiration alert. This name appears in the Expiration Certificate Request Alerts grid in the Management Portal. |
Subject |
A string indicating the subject for the email message that will be delivered when the alert is triggered. |
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. See Table 6: Substitutable Special Text for Expiration Alerts for a complete list of available substitutable special text strings. |
ExpirationWarningDays |
An integer indicating the number of days prior to expiration to send the warning. Example: When alerts run, the alert engine reports on all the certificates expiring within the next X days (e.g. 30 days) from the execution time that have not previously been reported on. This means that if the alerts run daily and have been running daily regularly for some time, only a single day of expiring certificates will be reported on by any given alert run.
For example, say you create a new alert that has never run before for collection A and set it to 30 days. You configure it to run daily at 5:00 am. The alert runs for the first time at 5:00 am on July 1st. All the certificates in collection A that will expire between July 1st at 12:oo am UTC and July 31 at 12:00 am UTC will be alerted on. The next day when the alert runs again at 5:00 am on July 2nd, the certificates in collection A expiring between July 31st at 12:00 am UTC and August 1st at 12:00 am UTC will be alerted on. If alerts are missed for a period of time (due to an outage, for example), the next run of the alerts will check the previous successful run date for the alerts and report on certificates expiring X days from that outage window. For example, using the collection A alert referenced above, say an outage caused the alerts not to run on August 1 and August 2. On August 3, the alert would run again at 5:00 am, and the certificates in collection A expiring between August 30th at 12:00 am UTC and September 2nd at 12:00 am UTC would be alerted on. |
Recipients |
An array of strings containing 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. Available email substitutable special text strings include:
|
CertificateQuery |
An object indicating the certificate collection on which the alert is based. For more information about certificate collections, see Saving Search Criteria as a Collection. |
RegisteredEventHandler | An object containing the event handler configuration for the alert, if applicable. ![]() For more information about event handlers, see Using Event Handlers. |
EventHandlerParameters |
An array of objects containing the parameters configured for use by the event handler. The type of data will vary depending on the configured handler. |


