Home > Storage > PowerMax and VMAX > Storage Admin > Using Dell PowerMax with Linux KVM Implementation Guide > REST API
A benefit of an oVirt implementation is a robust REST API delivered through the oVirt Engine. The REST API enables developers or system administrators to use custom scripts or integrate third-party applications that can issue the REST calls. A REST client sends a request with standard HTTP methods: GET, POST, PUT, and DELETE. The oVirt API uses HTTPS with client software, which requires obtaining the CA certificate from the oVirt Engine and importing it into the client host/browser. Authentication requires either OAuth or basic authentication. OAuth is preferred because basic authentication is deprecated as of oVirt 4.0. When the user obtains the bearer token, the user can use it to make calls.
For example, a popular REST client is Postman, software that has both a free and paid version. Using the free version, the user can still make any REST calls to the oVirt environment.
The POST call contains all the values for simplicity, rather than using variables, as shown in Figure 111. The format of the call is:
https://<FQDN of oVirt Engine>/ovirt-engine/sso/oauth/token?grant_type=password&scope=ovirt-app-api&username=admin@ovirt@internalsso&password=<password>
Figure 111. Obtain bearer token for REST API calls
Figure 112. REST API call gathering the hosts in the oVirt environment
The itself is time sensitive and will expire. Expiration results in an HTTP/1.1 401 Unauthorized error. In this case, re-run step 1 and obtain a new token. To avoid expiration, the user can add a Pre-request script for the token so that every REST call gets a valid token. By using the oVirt REST, the user can manage the entire environment without a UI.