My aim is to create a workflow which will prompt user to select a report from a list.
Then the workflow should run the appropriate VRA custom business report and then mail the output to the requestor.
For this the basic requirement is to run the business report. I am not able to find any plugin or any API (REST?) to invoke the required report.
Any help is very much appreciated.
Thanks
-Siva
Apologies for not updating this thread.
I found that with VRB installed, there is a new endpoint URL that createRestClient can use
com.vmware.vcbm.vcbm.api
Using the created rest client, I can do .getFile("/rest/reports-api/export-csv?name=customreport") to get the report output in CSV format.
Though I can't seem to find a way to specify XLS format or date ranges as input to this API.
-Siva
Hi,
The following document will be helpful.
Not able to find which service is for the ITBM business reports. can you help?
Thanks
So you want to run a vRB report via a vRO workflow and not a vRA report?
If it is vRB (ITBM) then you can do this using the API of vRB, the documentation actually contains an example of how to do this using REST calls without vRO (Use Public API to Generate vRealize Business for Cloud Reports).
You can wrap these REST calls into vRO workflows easily enough, I did something similar for a customer by creating a vRO workflow that was published into vRA as an XaaS blueprint so they could request a report from the vRA catalog page by selecting a report and the email address to send it to
Things to note/be awae of:
I can't provide a copy of the workflow but can tell you the general steps used and the key api calls you need (values in <> would be attributes within your workflow containing the relevant values:
https://<vra fqdn>/identity/api/tokens)
'{"username": "' + <username> + '","password": "' + <password> + '","tenant": "' + <tenantName> +'"}'The token is contained in the response as the id field.
https://<vRB fqdn>/itfm-cloud/rest/reports-api/export-csv?name=<report name>Pass in the vRA token value in the headers of this request as a value of
"Bearer " + <token value>and a label of "Authorization" . The contentAsString value provided by the request contains the report data
message.addMimePart(<attachment>, "application/json; charset=UTF-8")
Apologies for not updating this thread.
I found that with VRB installed, there is a new endpoint URL that createRestClient can use
com.vmware.vcbm.vcbm.api
Using the created rest client, I can do .getFile("/rest/reports-api/export-csv?name=customreport") to get the report output in CSV format.
Though I can't seem to find a way to specify XLS format or date ranges as input to this API.
-Siva