Get Reports
DescriptionReturns the location Reports.Location information for downloading the report for the specified file name. Retrieving a report involves two steps:
- Step 1: Invoke the Reports.get operation to provision a token and a URI.
- Step 2: Make an HTTP GET request by using the URI and the token returned in step 1 to retrieve the report.
The HTTP GET request will:
- Return 401 (Not Authorized) if the download URI is recognized, but the token is invalid, 404 if the URL is not recognized otherwise return 200 (OK)
- Provide the CSV contents as the output of the request. The API accepts the file name as input, reads the contents of that CSV file, and returns this text as the result of the API.
Request
URLURL
https://{api_host}/api/vcenter/lcm/reports/{report}
Path Parameters
Path Parameters
string
report
Required
The parameter must be an identifier for the resource type: com.vmware.vcenter.lcm.report.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Response
Response
Response BodyResponse Body
200 OK returns
LcmReportsLocation of type application/json
{
"download_file_token": {
"expiry": "string",
"token": "string"
},
"uri": "string"
}
download_file_token
Required
Information about the token required in the HTTP GET request to retrieve the report
string
uri
Required
Report Download URI.
cURL Command
curl -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/api/vcenter/lcm/reports/{report}
Errors
404
com.vmware.vapi.std.errors.not_found : If there is no file associated with report in the system.
500
com.vmware.vapi.std.errors.error : If there is some unknown internal error. The accompanying error message will give more details about the failure.