GET Alerts Expiration
The GET /Alerts/Expiration method is used to retrieve details of all expiration alerts configured in Keyfactor Command. Query parameters enable filtering using defined criteria, control over pagination by specifying the page number and return limit, and customization of sorting based on specified fields and order. This method returns HTTP 200 OK on a success with details about the specified alert.
Table 195: GET Alerts Expiration Input Parameters
Name | In | Description |
---|---|---|
QueryString | Query |
A string containing a query to limit the results (e.g. field1 -eq value1 AND field2 -gt value2). The default is to return all records. Fields available for querying through the API for the most part match those that appear in the Keyfactor Command Management Portal search dropdowns for the same feature. For querying guidelines, refer to: Certificate Search Page. The query fields supported for this endpoint are:
|
PageReturned | Query | An integer that specifies how many multiples of the returnLimit to skip and offset by before returning results, to enable paging. The default is 1. |
ReturnLimit | Query | An integer that specifies how many results to return per page. The default is 50. Very large values can result in long processing time. |
SortField | Query | A string containing the property by which the results should be sorted. Fields available for sorting through the API for the most part match those that appear as sortable columns in the Keyfactor Command Management Portal. The default sort field is DisplayName. |
SortAscending | Query | An integer that sets the sort order on the returned results. A value of 0 sorts results in ascending order while a value of 1 sorts results in descending order. The default is ascending. |
Table 196: GET 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 10: 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 legacy alerting system or workflow 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:00 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. When entering email addresses on the Recipients parameter, if more than one recipient is added to a string, all recipients in that string receive the same email and can see the other recipients on the email. To do this, enter email addresses separated by commas or semi-colons withing the string. To include multiple strings, separate each string by a comma within the array. "Recipients": [ "{certemail}", "pkiadmins@keyexample.com,bbrown@keyexample.com" ] 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. |
Use Workflows | A Boolean indicating whether the alert uses workflows to deliver the alerts (true) or the legacy alerting system (false). |
Workflow Id | A string indicating the Keyfactor Command reference GUID of the workflow used to deliver alerts for this expiration alert. |
Workflow Name | A string indicating the name of the workflow used to deliver alerts for this expiration alert. |
Workflow Published Version | An integer indicating the published version of the workflow used to deliver alerts for this expiration alert. |
Workflow Enabled | A Boolean indicating whether the workflow used to deliver alerts for this expiration alert is enabled (true) or not (false). |


