Context
Customers are generating a variety of IT Operations Management reports through the VCF Operations user interface. One key requirement is the ability to generate reports on the last day of the month, as this would provide a comprehensive month-to-date report for the entire month.
The VCF Operations product allows users to schedule reports; however, as of version 8.18.3, scheduling reports to run on the last day of the month is not supported through the user interface. Since the last day of the month varies (e.g., January has 31 days, February has 28 or 29 days, and April has 30 days), selecting a specific day, like the 31st, as a recurrence option doesn’t work for all months. Below is a screenshot of the report schedule definition in the VCF Operations 8.18.3 user interface.

Solution
The following are some of the solutions for generating a report on the last day of the month:
- Schedule report to run daily
- Run the report directly in the user interface on the last day of the month
- Automate report generation using the VCF Operations REST APIs and an external program
Schedule report to run daily
While scheduling the report to run daily addresses the issue of generating a report on the last day of the month, it also results in unnecessary report generation on other days of the month.
Run the report directly in the user interface on the last day of the month
While running a report directly in the user interface manually on the last day of the month is one of the viable options, it requires manual human interaction.
Automate report generation using the VCF Operations REST API and an external program
The VCF operations REST APIs can be used to automate report generation on the last day of the month using an external program. This external program can be written in any programming language that can invoke REST APIs.
Here are the high level steps to be performed in the external program to automate report generation on the last day of the month:
- Get ID of the report definition
VCF Operations REST API Details | Values |
Endpoint | /api/reportdefinitions |
Method | GET |
Parameters | “name” array containing report definition/template name. Refer to the API documentation for the other parameters that can also be used. |
Response | Get ID of the report definition from the response |
- Get resource ID for the object on which the report definition must be run
VCF Operations REST API Details | Values |
Endpoint | /api/resources |
Method | GET |
Parameters | “name” array containing resource name. Refer to the API documentation for the other parameters that can also be used. |
Response | Get value of the “identifier” key in the JSON response. |
- Generate a report on the last day of the month using the report definition ID and the resource ID that were retrieved in earlier steps. Determining the last day of the month must be handled within the external program.
VCF Operations REST API Details | Values |
Endpoint | /api/reports |
Method | POST |
Body | { “resourceId” : “c40bb51e-34f7-4864-b540-bbb8420d6288”, “reportDefinitionId” : “59c32c79-adea-4c58-bb6f-56daa23bcb5e” } Replace resourceId and reportDefinitionId values using the values from earlier steps. |
Response | Extract report ID from the JSON response. |
- Download the report using the report ID from the earlier step.
VCF Operations REST API Details | Values |
Endpoint | /api/reports/{id}/download |
Method | GET |
Parameters | Format: PDF or CSVId: 6758cdf1-361c-4d6a-a5f2-1f854c85d225 Replace value for ID parameter using the extracted ID value from the JSON response. |
Response body | File |