vcenter lcm reports: get
Returns the location vcenter.lcm.reports.location information for downloading the report for the specified file name.
Retrieving a report involves two steps:
- Step 1: Invoke the 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:
HTTP request
GET https://{server}/api/vcenter/lcm/reports/{report}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
report | string |
Response:
HTTP Status Code: 200
Response Body Structure:
{
"uri" : "http://myurl.com",
"download_file_token" : {
"expiry" : "2015-01-01T22:13:05.651Z",
"token" : "string"
}
}
"uri" : "http://myurl.com",
"download_file_token" : {
"expiry" : "2015-01-01T22:13:05.651Z",
"token" : "string"
}
}
Headers:
NoneType:
Name | Type | Description |
---|---|---|
bold = required | ||
- | location | |
-.uri | URI | Report Download URI. |
-.download_file_token | token | Information about the token required in the HTTP GET request to retrieve the report |
-.download_file_token.token | string | A one-time, short-lived token required in the HTTP header of the request to the url. This token needs to be passed in as a header with the name "session-id". |
-.download_file_token.expiry | date_time | Expiry time of the token |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
401 | unauthenticated | if the user can not be authenticated. |
404 | not_found | If there is no file associated with report in the system. |
500 | error | If there is some unknown internal error. The accompanying error message will give more details about the failure. |