Product SiteDocumentation Site

Red Hat Enterprise Virtualization REST API 0.9

REST API Guide

A RESTful API for Red Hat Enterprise Virtualization

Edition 0

Mark McLoughlin

Red Hat Engineering

Eoghan Glynn

Red Hat Engineering

David Jorm

Red Hat Engineering Content Services

Legal Notice

Copyright © 2010 Red Hat, Inc..
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
All other trademarks are the property of their respective owners.


1801 Varsity Drive
 RaleighNC 27606-2072 USA
 Phone: +1 919 754 3700
 Phone: 888 733 4281
 Fax: +1 919 754 3701

Abstract
This document describes the REST API for Red Hat Enterprise Virtualization.

Preface
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. We Need Feedback!
1. Introduction
1.1. Resources
1.2. Collections
1.3. URIs
1.4. Representations
1.5. Requests
1.6. Methods
1.7. Headers
1.8. Message Entities
1.9. Actions
2. Example
2.1. Access API Entry Point
2.2. List Data Center Collection
2.3. List Host Cluster Collection
2.4. List Logical Networks Collection
2.5. List Host Collection
2.6. Approve Host
2.7. Create NFS Data Storage
2.8. Create NFS ISO Storage
2.9. Attach Storage Domains to Data Center
2.10. Activate Storage Domains
2.11. Create Virtual Machine
2.12. Attach NIC to Virtual Machine
2.13. Attach Storage Disk to Virtual Machine
2.14. Attach ISO Image to Virtual Machine
2.15. Start Virtual Machine
2.16. Check System Events
2.17. Error Handling
3. Authentication
4. Entry Point
4.1. Link elements
4.2. Special object elements
4.3. Summary element
5. Localization
6. Compatibility Level Versions
7. Capabilities
7.1. Version-Dependent Capabilities
7.1.1. Current Version
7.1.2. Features
7.1.3. CPUs
7.1.4. Power Managers
7.1.5. Fence Types
7.1.6. Storage Types
7.1.7. Storage Domain Types
7.1.8. Virtual Machine Types
7.1.9. Boot Devices
7.1.10. Display Types
7.1.11. NIC Types
7.1.12. Disk Types
7.1.13. Disk Formats
7.1.14. Disk Interfaces
7.1.15. Virtual Machine Affinities
7.1.16. Custom Properties
7.1.17. Boot Protocols
7.1.18. Error Handling
7.1.19. Storage Formats
7.2. Permits
7.3. Scheduling Policies
7.4. Capabilities Example
8. Common Features
8.1. Representations
8.2. Collections
8.2.1. Listing All Resources in a Collection
8.2.2. Listing Extended Resource Sub-Collections
8.2.3. Search Queries
8.3. Resources
8.3.1. Retrieving a Resource
8.3.2. Creating a Resource
8.3.3. Creating a Resource Asynchronously
8.3.4. Updating a Resource
8.3.5. Deleting a Resource
8.3.6. Sub-Collection Relationships
8.3.7. XML Element Relationships
8.3.8. Actions
8.3.9. Permissions
8.3.10. Handling Errors
9. Data Centers
9.1. Storage Domains Sub-Collection
9.1.1. Activate Action
9.1.2. Deactivate Action
9.1.3. Export Storage Domains
10. Host Clusters
10.1. Networks Sub-Collection
11. Networks
12. Storage Domains
12.1. Storage types
12.1.1. NFS
12.1.2. iSCSI and FCP
12.1.3. LOCAL
12.2. Files Sub-Collection
12.3. Import Existing Storage Domain
12.4. Delete Storage Domain
13. Hosts
13.1. Power Management
13.2. Memory Management
13.3. Network Interface Sub-Collection
13.3.1. Bonded Interfaces
13.3.2. Attach Action
13.3.3. Detach Action
13.4. Storage Sub-Collection
13.5. Actions
13.5.1. Install Action
13.5.2. Activate Action
13.5.3. Fence Action
13.5.4. Deactivate Action
13.5.5. Approve Action
13.5.6. iSCSI Login Action
13.5.7. iSCSI Discover Action
13.5.8. Commit Network Configuration Action
14. Virtual Machines
14.1. Disks Sub-Collection
14.2. Network Interfaces Sub-Collection
14.3. CD-ROMs Sub-Collection
14.4. Snapshots Sub-Collection
14.5. Users Sub-Collection
14.6. Actions
14.6.1. Start Action
14.6.2. Stop Action
14.6.3. Shutdown Action
14.6.4. Suspend Action
14.6.5. Detach Action
14.6.6. Migrate Action
14.6.7. Export Action
14.6.8. Import Action
14.6.9. Move Action
14.6.10. Ticket Action
15. Templates
15.1. Export Action
15.2. Import Action
16. Virtual Machine Pools
17. Roles
17.1. Permits Sub-Collection
18. Users
19. Domains
19.1. Domain Users Sub-Collection
19.2. Domain Groups Sub-Collection
20. Tags
20.1. Associating Tags With a Host, User or VM
20.2. Parent Tags
21. Events
22. Statistics
A. Event Codes
B. Timezones
C. Revision History