API Guide
Table Of Contents
- OpenManage Integration for VMware vCenter Version 5.3 API Guide
- Contents
- Overview
- Get started
- Security
- Use cases
- Session management
- License management
- Console management
- Repository profile management
- Cluster profile management
- Firmware repository inventory management
- Firmware inventory management
- Firmware update management
- System profile management
- Drift management
- Get subsystem health report (OMIVV Host Health)
- Host management
- Request body
- Response body
- OMIVV-Specific error codes
DriftDetectionService/Jobs/" + d_job_id;
print("url: " + url )
head = {'Authorization': 'Bearer ' + bearer_token}
response = requests.get(url, verify=False, headers=head)
if (response.status_code == 200):
json_response = json.dumps(response.json(), indent=4, sort_keys=True)
print(json_response)
return json_response
else:
print("Get drift job detail by id.")
```
Invoke the following API to get host level details about specific drift job: /Services/DriftDetectionService/Jobs/
{id}/Details
Sample code to get host level details about specific drift job:
```
def get_drift_job_deatil_by_id(omivv_ip, bearer_token, d_job_id):
""" Get the drift job details details"""
url = "https://" + omivv_ip + "/Spectre/api/rest/v1/Services/
DriftDetectionService/Jobs/" + d_job_id + "/Details";
print("url: " + url )
head = {'Authorization': 'Bearer ' + bearer_token}
response = requests.get(url, verify=False, headers=head)
if (response.status_code == 200):
json_response = json.dumps(response.json(), indent=4, sort_keys=True)
print(json_response)
return json_response
else:
print("Get all drift jobs details failed.")
```
7. View drift report. Drift detection job computes drift details of the hardware, firmware, and driver components from the
baseline.
Invoke the following API to view the complete drift for all clusters: /Services/DriftDetectionService/DriftReport
Sample code to view the complete drift for all clusters:
```
def get_all_drift_jobs_report(omivv_ip, bearer_token):
"""Get all drift report jobs"""
url = "https://" + omivv_ip + "/Spectre/api/rest/v1/Services/
DriftDetectionService/DriftReport"
head = {'Authorization': 'Bearer ' + bearer_token}
response = requests.get(url, verify=False, headers=head)
if (response.status_code == 200):
json_response = json.dumps(response.json(), indent=4, sort_keys=True)
#print(json_response)
return json_response
else:
print("Get all drift jobs report failed.")
```
Invoke the following API to view drift for a specific cluster: /Services/DriftDetectionService/DriftReport/{id}
Sample code to view drift for a specific cluster:
```
def get_drift_job_by_id(omivv_ip, bearer_token, d_job_id):
""" Get the drift job report by job id"""
url = "https://" + omivv_ip + "/Spectre/api/rest/v1/Services/
DriftDetectionService/Jobs/" + d_job_id;
print("url: " + url )
head = {'Authorization': 'Bearer ' + bearer_token}
response = requests.get(url, verify=False, headers=head)
if (response.status_code == 200):
json_response = json.dumps(response.json(), indent=4, sort_keys=True)
print(json_response)
return json_response
Use cases
33