Chapter 1. Introduction
The Red Hat Virtualization Manager provides a Representational State Transfer (REST) API. The API provides software developers and system administrators with control over their Red Hat Virtualization environment outside of the standard web interface. The API is useful for developers and administrators to integrate the functionality of a Red Hat Virtualization environment with custom scripts or external applications that access the API via the standard Hypertext Transfer Protocol (HTTP).
The benefits of the API are:
- Broad client support - Any programming language, framework, or system with support for HTTP protocol can use the API.
- Self descriptive - Client applications require minimal knowledge of the virtualization infrastructure, as many details are discovered at runtime.
- Resource-based model - The resource-based REST model provides a natural way to manage a virtualization platform.
This provides developers and administrators with the ability to:
- Integrate with enterprise IT systems.
- Integrate with third-party virtualization software.
- Perform automated maintenance or error-checking tasks.
- Automate repetitive tasks in a Red Hat Virtualization environment with scripts.
This documentation acts as a reference for the Red Hat Virtualization API. It aims to provide developers and administrators with instructions and examples to help harness the functionality of their Red Hat Virtualization environment through the API, either directly or using the provided SDKs.
1.1. Representational State Transfer
Representational State Transfer (REST) is a design architecture that focuses on resources for a specific service and their representations. A resource representation is a key abstraction of information that corresponds to one specific managed element on a server. A client sends a request to a server element located at a Uniform Resource Identifier (URI) and performs operations with standard HTTP methods, such as GET
, POST
, PUT
, and DELETE
. This provides a stateless communication between the client and server where each request acts independently of any other request, and contains all the information necessary to complete the request.
1.2. API Prerequisites
Prerequisites for using the Red Hat Virtualization API:
- A networked installation of Red Hat Virtualization Manager, which includes the API.
A client or programming library that initiates and receives HTTP requests from the API server. For example:
- The oVirt Python SDK.
- The oVirt Ruby SDK.
- The oVirt Java SDK.
- The cURL command line tool.
- RESTClient, a debugger for RESTful web services.
- Knowledge of Hypertext Transfer Protocol (HTTP), the protocol used for REST API interactions. The Internet Engineering Task Force provides a Request for Comments (RFC) explaining the Hypertext Transfer Protocol at http://www.ietf.org/rfc/rfc2616.txt.
- Knowledge of Extensible Markup Language (XML) or JavaScript Object Notation (JSON), which the API uses to construct resource representations. The W3C provides a full specification on XML at http://www.w3.org/TR/xml. ECMA International provide a free publication on JSON at http://www.ecma-international.org.