POST Reports ID Schedules

The POST /Reports/{id}/Schedules operation creates a schedule for the built-in report with the specified report ID. On success, the operation returns HTTP 200 OK with  the details of the report schedule.

Important:  The v1 report endpoints use the legacy reporting system and have been deprecated. They are retained for backward compatibility but require the legacy reports to be installed (see the Logi component in Install Keyfactor Command on a Windows Server Under IIS). New development should use the v2 endpoints, which use the current reporting system.
Tip:  The following permissions (see Security Roles and Claims) are required to use this feature:

/reports/modify/

Table 721: 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 operation 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 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 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:  Keep these things in mind:
  • The path must be provided in UNC format (\\servername\sharename\path).
  • The path must be accessible from the Keyfactor Command administration server.
  • There should be no trailing backslash (\) in the report path.
  • The location where you want the outputted report to be saved must be writable by the application pool service account.
  • When scheduling a report, schedule it for at least 10 minutes in advance of the current time. 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 722: 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 False).
Save Report A Boolean indicating whether the report will be saved to the UNC path defined by SaveReportPath (True or 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.