POST Reports ID Schedules

The POST /Reports/{id}/Schedules method is used to create a schedule for the built-in report with the specified report ID. This method returns HTTP 200 OK on a success with the details of the report schedule.

Tip:  The following permissions (see Security Roles and Claims) are required to use this feature:

/reports/modify/

Table 664: POST Reports {id} Schedules Input Parameters

Name

In

Description

id

Path

Required. An integer indicating the Keyfactor Command reference ID of the built-in report the schedule is associated with.

Use the GET /Reports method (see GET Reports) to retrieve a list of your built-in reports to determine the report ID to use.

Send Report

Body A Boolean indicating whether the report will be sent to the email recipients configured in EmailRecipients (true) or not (false). The default is false.
Save Report Body A Boolean indicating whether the report will be saved to the UNC path defined by SaveReportPath (true) or not (false). The default is false.
Save Report Path Body

Required*. A string containing the UNC path to which the report will be written, if configured.

Note:  The path for saved reports must be provided in UNC format (\\servername\sharename\path) and must be accessible from the Keyfactor Command administration server. In addition:
  • Do not use a trailing “\” in the report path.
  • Ensure that the application pool service account has permission to write to the location where you want the outputted report to be saved.
  • When scheduling a report, schedule it for at least 10 minutes in advance of the current time if you wish it to run soon. If you want to run it faster than that, the Keyfactor Command Service will need to be restarted.

This field is required if SaveReport is set to true.

Report Format Body

Required. A string containing the report format selected for the scheduled report run. Supported values vary depending on the selected report and include:

  • PDF

  • Excel

  • CSV

Keyfactor Schedule Body

Required. An object providing the schedule for the report. ClosedShow Keyfactor schedule details.

For example:

Copy
"KeyfactorSchedule": {
   "Monthly": {
      "Day": 1,
      "Time": "2021-07-01T17:00:00Z"
   }
},

Or:

Copy
"KeyfactorSchedule": {
   "Weekly": {
      "Days": [
         "Monday",
         "Thursday"
      ],
      "Time": "2021-07-01T17:00:00Z"
   }
},
Email Recipients Body

Required*. An array of strings containing the email addresses of users configured as recipients of the scheduled report, if any. For example:

Copy
"EmailRecipients": [
   "pkiadmins@keyexample.com",
   "john.smith@keyexample.com"
]

This field is required if SendReport is set to true.

Runtime Parameters Body

Required*. An object containing the parameters to be used at run time configured in the report schedule. Runtime parameters will vary depending on the report selected. ClosedShow runtime parameter details.

For example:

Copy
"RuntimeParameters": {
   "StartDate": "60-Day-Before",
   "EndDate": "7-Day-Before",
   "Metadata": "AppOwnerFirstName, AppOwnerLastName",
   "Requesters": "jsmith"
}

This field is required for reports that have runtime parameters.

Table 665: POST Reports {id} Schedules Response Data

Name

Description

Id

An integer indicating the Keyfactor Command reference ID of the report schedule.

Send Report

A Boolean indicating whether the report will be sent to the email recipients configured in EmailRecipients (true) or not (false).
Save Report A Boolean indicating whether the report will be saved to the UNC path defined by SaveReportPath (true) or not (false).
Save Report Path

A string containing the UNC path to which the report will be written, if configured.

Report Format

A string containing the report format selected for the scheduled report run. Supported values vary depending on the selected report and include:

  • PDF

  • Excel

  • CSV

Keyfactor Schedule

An object providing the schedule for the report. ClosedShow Keyfactor schedule details.

Email Recipients

An array of strings containing the email addresses of users configured as recipients of the scheduled report, if any.

Runtime Parameters

An object containing the parameters to be used at run time configured in the report schedule. Runtime parameters will vary depending on the report selected. ClosedShow runtime parameter details.

Tip:  See the Keyfactor API Reference and Utility which provides a utility through which the Keyfactor APIClosed An API is a set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command. endpoints can be called and results returned. It is intended to be used primarily for validation, testing and workflowClosed A workflow is a series of steps necessary to complete a process. In Keyfactor Command, it refers to the workflow builder, which allows you to automate event-driven tasks such as when a certificate is requested, revoked or found in a certificate store. 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.