REST APIs for downloading jobs and generating reports

To generate reports and download logs for VMware vSphere web client jobs using REST APIs, you must use the REST API calls for VMware vSphere.

For each REST API, add https://<server>:<port> at the front of the REST API to form a complete endpoint.

Getting job details

Use the following REST APIs in the Jobs section to get detailed information on jobs:

REST API Description
/4.1/jobs Get all jobs gets the job details for multiple jobs. You can narrow the scope of the request by specifying a job type, such as backup, mountBackup, or restore.
/4.1/jobs/{id} Get job details gets detailed information for the specified job.

Downloading logs

Use the following REST API in the Jobs section to download job logs:

REST API Description
/4.1/jobs/{id}/logs getJobLogsById downloads the logs for the specified job.

Generating reports

Use the following REST APIs in the Reports section to generate reports:

REST API Description
4.1/reports/protectedVM Get Protected VM List gets a list of the protected VMs during the last seven days.
/4.1/reports/unProtectedVM Get Unprotected VM List gets a list of the unprotected VMs during the last seven days.

The output format of the Report APIs is JSON. You must use third-party tools to convert the JSON output to other formats, for example, to CSV or HTML.