Menu Close REST API Guide 1. Introduction Expand section "1. Introduction" Collapse section "1. Introduction" 1.1. Representational State Transfer 1.2. Red Hat Enterprise Virtualization REST API Prerequisites 2. Authentication and Security Expand section "2. Authentication and Security" Collapse section "2. Authentication and Security" 2.1. TLS/SSL Certification 2.2. HTTP Authentication 2.3. Authentication Sessions 3. REST API Quick Start Example Expand section "3. REST API Quick Start Example" Collapse section "3. REST API Quick Start Example" 3.1. Example: Access API Entry Point 3.2. Example: List Data Center Collection 3.3. Example: List Host Cluster Collection 3.4. Example: List Logical Networks Collection 3.5. Example: List Host Collection 3.6. Example: List CPU Profiles 3.7. Example: Approve Host 3.8. Example: Create NFS Data Storage 3.9. Example: Create NFS ISO Storage 3.10. Example: Attach Storage Domains to Data Center 3.11. Example: Activate Storage Domains 3.12. Example: Create Virtual Machine 3.13. Example: Create Virtual Machine NIC 3.14. Example: Create Virtual Machine Storage Disk 3.15. Example: Attach ISO Image to Virtual Machine 3.16. Example: Start Virtual Machine 3.17. Example: Check System Events 4. Entry Point Expand section "4. Entry Point" Collapse section "4. Entry Point" 4.1. Product Information 4.2. Link Elements 4.3. Special Object Elements 4.4. Summary Element 4.5. RESTful Service Description Language (RSDL) 4.6. Red Hat Enterprise Virtualization Windows Guest VSS Support 4.7. QEMU Guest Agent Overview 4.8. VSS Transaction Flow 5. Compatibility Level Versions Expand section "5. Compatibility Level Versions" Collapse section "5. Compatibility Level Versions" 5.1. Upgrading Compatibility Levels 6. Capabilities Expand section "6. Capabilities" Collapse section "6. Capabilities" 6.1. Version-Dependent Capabilities 6.2. Current Version 6.3. Features 7. Common Features Expand section "7. Common Features" Collapse section "7. Common Features" 7.1. Element Property Icons 7.2. Representations Expand section "7.2. Representations" Collapse section "7.2. Representations" 7.2.1. Representations 7.2.2. Common Attributes to Resource Representations 7.2.3. Common Elements to Resource Representations 7.3. Collections Expand section "7.3. Collections" Collapse section "7.3. Collections" 7.3.1. Collections 7.3.2. Listing All Resources in a Collection 7.3.3. Listing Extended Resource Sub-Collections 7.3.4. Searching Collections with Queries 7.3.5. Maximum Results Parameter 7.3.6. Case Sensitivity 7.3.7. Query Syntax 7.3.8. Wildcards 7.3.9. Pagination 7.3.10. Creating a Resource in a Collection 7.3.11. Asynchronous Requests 7.4. Resources Expand section "7.4. Resources" Collapse section "7.4. Resources" 7.4.1. Resources 7.4.2. Retrieving a Resource 7.4.3. Updating a Resource 7.4.4. Deleting a Resource 7.4.5. Sub-Collection Relationships 7.4.6. XML Element Relationships 7.4.7. Actions 7.4.8. Permissions 7.4.9. Handling Errors 8. The Backup and Restore API Expand section "8. The Backup and Restore API" Collapse section "8. The Backup and Restore API" 8.1. Backing Up a Virtual Machine 8.2. Restoring a Virtual Machine 9. Data Centers Expand section "9. Data Centers" Collapse section "9. Data Centers" 9.1. Data Center Elements 9.2. XML Representation of a Data Center 9.3. JSON Representation of a Data Center 9.4. Methods Expand section "9.4. Methods" Collapse section "9.4. Methods" 9.4.1. Creating a New Data Center 9.4.2. Updating a Data Center 9.4.3. Removing a Data Center 9.5. Sub-Collections Expand section "9.5. Sub-Collections" Collapse section "9.5. Sub-Collections" 9.5.1. Storage Domains Sub-Collection 9.5.2. Network Sub-Collection 9.5.3. Quotas Sub-Collection 9.6. Actions Expand section "9.6. Actions" Collapse section "9.6. Actions" 9.6.1. Force Remove Data Center Action 10. Clusters Expand section "10. Clusters" Collapse section "10. Clusters" 10.1. Cluster Elements 10.2. Memory Policy Elements 10.3. Scheduling Policy Elements 10.4. XML Representation of a Cluster 10.5. JSON Representation of a Cluster 10.6. Methods Expand section "10.6. Methods" Collapse section "10.6. Methods" 10.6.1. Creating a Cluster 10.6.2. Updating a Cluster 10.6.3. Removing a Cluster 10.7. Sub-Collections Expand section "10.7. Sub-Collections" Collapse section "10.7. Sub-Collections" 10.7.1. Networks Sub-Collection 10.7.2. Storage Volumes Sub-Collection 10.7.3. Affinity Groups Sub-Collection 11. Networks Expand section "11. Networks" Collapse section "11. Networks" 11.1. Network Elements 11.2. XML Representation of a Network Resource 11.3. JSON Representation of a Network Resource 11.4. Methods Expand section "11.4. Methods" Collapse section "11.4. Methods" 11.4.1. Creating a Network Resource 11.4.2. Updating a Network Resource 11.4.3. Removing a Network Resource 11.5. Sub-collections Expand section "11.5. Sub-collections" Collapse section "11.5. Sub-collections" 11.5.1. Network VNIC Profile Sub-Collection 11.5.2. Network Labels Sub-Collection 11.5.3. Methods 12. Storage Domains Expand section "12. Storage Domains" Collapse section "12. Storage Domains" 12.1. Storage Domain Elements 12.2. XML Representation of a Storage Domain 12.3. JSON Representation of a Storage Domain 12.4. Methods Expand section "12.4. Methods" Collapse section "12.4. Methods" 12.4.1. Creating a Storage Domain 12.4.2. Updating a Storage Domain 12.4.3. Removing a Storage Domain 12.5. Storage Types Expand section "12.5. Storage Types" Collapse section "12.5. Storage Types" 12.5.1. Storage Types 12.5.2. NFS Storage 12.5.3. PosixFS Storage 12.5.4. iSCSI and FCP Storage 12.5.5. LocalFS Storage 12.6. Export Storage Domains Expand section "12.6. Export Storage Domains" Collapse section "12.6. Export Storage Domains" 12.6.1. Export Storage Domains 12.7. Glance Image Storage Domains Expand section "12.7. Glance Image Storage Domains" Collapse section "12.7. Glance Image Storage Domains" 12.7.1. Glance Image Storage Domains 12.8. Importing a Block Storage Domain Expand section "12.8. Importing a Block Storage Domain" Collapse section "12.8. Importing a Block Storage Domain" 12.8.1. Importing a Block Storage Domain 12.9. Sub-Collections Expand section "12.9. Sub-Collections" Collapse section "12.9. Sub-Collections" 12.9.1. Files Sub-Collection 12.10. Actions Expand section "12.10. Actions" Collapse section "12.10. Actions" 12.10.1. Importing an Existing Storage Domain 12.10.2. Deleting a Storage Domain 12.10.3. Refreshing the LUN Size 13. Storage Connections Expand section "13. Storage Connections" Collapse section "13. Storage Connections" 13.1. Storage Connection Elements 13.2. XML representation of a Storage Connection Resource 13.3. Methods Expand section "13.3. Methods" Collapse section "13.3. Methods" 13.3.1. Creating a New Storage Connection 13.3.2. Deleting a Storage Connection 13.3.3. Updating a Storage Connection 13.3.4. Updating an iSCSI Storage Connection 13.3.5. Adding New Storage Domain with Existing Storage Connection 13.3.6. Attaching an Additional Storage Connection to iSCSI Storage 13.3.7. Detaching a Storage Connection from iSCSI Storage 13.3.8. Defining Credentials to an iSCSI Target 14. Hosts Expand section "14. Hosts" Collapse section "14. Hosts" 14.1. Host Elements 14.2. XML Representation of a Host 14.3. JSON Representation of a Host 14.4. Power Management Elements 14.5. Memory Management Elements 14.6. Methods Expand section "14.6. Methods" Collapse section "14.6. Methods" 14.6.1. Creating a Host 14.6.2. Updating a Host 14.6.3. Removing a Host 14.7. Sub-Collections Expand section "14.7. Sub-Collections" Collapse section "14.7. Sub-Collections" 14.7.1. Host Network Attachments Sub-Collection 14.7.2. Host Network Interface Sub-Collection 14.7.3. Storage Sub-Collection 14.7.4. Host NUMA Nodes Sub-Collection 14.7.5. Host Statistics Sub-Collection 14.8. Actions Expand section "14.8. Actions" Collapse section "14.8. Actions" 14.8.1. Install VDSM Action 14.8.2. Activate Host Action 14.8.3. Host Network Setup Action 14.8.4. Fence Host Action 14.8.5. Deactivate Host Action 14.8.6. Approve Host Action 14.8.7. Host iSCSI Login Action 14.8.8. Host iSCSI Discover Action 14.8.9. Commit Host Network Configuration Action 14.8.10. Setting SPM 15. Virtual Machines Expand section "15. Virtual Machines" Collapse section "15. Virtual Machines" 15.1. Virtual Machine Elements 15.2. XML Representation of a Virtual Machine 15.3. XML Representation of Additional OVF Data for a Virtual Machine 15.4. JSON Representation of a Virtual Machine 15.5. Methods Expand section "15.5. Methods" Collapse section "15.5. Methods" 15.5.1. Creating a Virtual Machine 15.5.2. Updating a Virtual Machine 15.5.3. Removing a Virtual Machine 15.5.4. Removing a Virtual Machine but not the Virtual Disk 15.6. Sub-Collections Expand section "15.6. Sub-Collections" Collapse section "15.6. Sub-Collections" 15.6.1. Disks Sub-Collection 15.6.2. Network Interfaces Sub-Collection 15.6.3. Virtual NUMA Nodes Sub-Collection 15.6.4. CD-ROMs Sub-Collection 15.6.5. Snapshots Sub-Collection 15.6.6. Statistics Sub-Collection 15.6.7. Displaying Virtual Machine Session Information 15.7. Actions Expand section "15.7. Actions" Collapse section "15.7. Actions" 15.7.1. Start Virtual Machine Action 15.7.2. Start Virtual Machine with Cloud-Init Action 15.7.3. Stop Virtual Machine Action 15.7.4. Shutdown Virtual Machine Action 15.7.5. Suspend Virtual Machine Action 15.7.6. Reboot Virtual Machine Action 15.7.7. Enable user logon to access a virtual machine from an external console 15.7.8. Detach Virtual Machine from Pool Action 15.7.9. Migrate Virtual Machine Action 15.7.10. Cancel Virtual Machine Migration Action 15.7.11. Export Virtual Machine Action 15.7.12. Virtual Machine Ticket Action 15.7.13. Force Remove Virtual Machine Action 15.7.14. Freeze Virtual Machine Filesystems Action 15.7.15. Thaw Virtual Machine Filesystems Action 16. Floating Disks Expand section "16. Floating Disks" Collapse section "16. Floating Disks" 16.1. Floating Disk Elements 16.2. XML Representation of a Floating Disk 16.3. Methods Expand section "16.3. Methods" Collapse section "16.3. Methods" 16.3.1. Creating a Floating Disk 16.4. Sub-Collections Expand section "16.4. Sub-Collections" Collapse section "16.4. Sub-Collections" 16.4.1. Statistics Sub-Collection 16.5. Actions Expand section "16.5. Actions" Collapse section "16.5. Actions" 16.5.1. Copying a Floating Disk 17. Templates Expand section "17. Templates" Collapse section "17. Templates" 17.1. Virtual Machine Template Elements 17.2. XML Representation of a Virtual Machine Template 17.3. Methods Expand section "17.3. Methods" Collapse section "17.3. Methods" 17.3.1. Creating a New Template 17.3.2. Creating a New Template Sub Version 17.3.3. Updating a Template 17.3.4. Updating a Template Sub Version 17.3.5. Removing a Template 17.4. Actions Expand section "17.4. Actions" Collapse section "17.4. Actions" 17.4.1. Export Template Action 18. Virtual Machine Pools Expand section "18. Virtual Machine Pools" Collapse section "18. Virtual Machine Pools" 18.1. Virtual Machine Pool Elements 18.2. XML Representation of a Virtual Machine Pool 18.3. Methods Expand section "18.3. Methods" Collapse section "18.3. Methods" 18.3.1. Creating a New Virtual Machine Pool 18.3.2. Updating a Virtual Machine Pool 18.3.3. Removing a Virtual Machine Pool 18.4. Actions Expand section "18.4. Actions" Collapse section "18.4. Actions" 18.4.1. Allocate Virtual Machine Action 19. Domains Expand section "19. Domains" Collapse section "19. Domains" 19.1. Domain Elements 19.2. XML Representation of a Domain Resource 19.3. Sub-Collections Expand section "19.3. Sub-Collections" Collapse section "19.3. Sub-Collections" 19.3.1. Domain Users Sub-Collection 19.3.2. Domain Groups Sub-Collection 20. Groups Expand section "20. Groups" Collapse section "20. Groups" 20.1. Imported Group Elements 20.2. XML Representation of a Group Resource 20.3. Adding a Group from a Directory Service 21. Roles Expand section "21. Roles" Collapse section "21. Roles" 21.1. Role Elements 21.2. XML Representation of the Roles Collection 21.3. Methods Expand section "21.3. Methods" Collapse section "21.3. Methods" 21.3.1. Creating a Role 21.3.2. Updating a Role 21.3.3. Removing a Role 21.4. Roles Permits Sub-Collection Expand section "21.4. Roles Permits Sub-Collection" Collapse section "21.4. Roles Permits Sub-Collection" 21.4.1. Roles Permits Sub-Collection 21.4.2. Assign a Permit to a Role 21.4.3. Remove a Permit from a Role 22. Users Expand section "22. Users" Collapse section "22. Users" 22.1. User Elements 22.2. XML representation of a User Resource 22.3. Methods Expand section "22.3. Methods" Collapse section "22.3. Methods" 22.3.1. Adding a User 22.3.2. Adding Roles to a User 23. MAC Address Pools Expand section "23. MAC Address Pools" Collapse section "23. MAC Address Pools" 23.1. MAC Address Pool Elements 23.2. XML Representation of the MAC Address Pools Collection 23.3. Methods Expand section "23.3. Methods" Collapse section "23.3. Methods" 23.3.1. Creating a MAC Address Pool 23.3.2. Updating a MAC Address Pool 23.3.3. Removing a MAC Address Pool 24. Tags Expand section "24. Tags" Collapse section "24. Tags" 24.1. Tag Elements 24.2. XML Representation of a Tag Resource 24.3. Associating Tags Expand section "24.3. Associating Tags" Collapse section "24.3. Associating Tags" 24.3.1. Associating Tags With a Host, User or VM 24.3.2. Removing a Tag 24.3.3. Querying a Collection for Tagged Resources 24.4. Parent Tags Expand section "24.4. Parent Tags" Collapse section "24.4. Parent Tags" 24.4.1. Parent Tags 24.4.2. Setting a Parent Tag 24.4.3. Changing a Parent Tag 25. Events Expand section "25. Events" Collapse section "25. Events" 25.1. Event Elements 25.2. XML Representation of the Events Collection 25.3. XML Representation of a Virtual Machine Creation Event 25.4. Methods Expand section "25.4. Methods" Collapse section "25.4. Methods" 25.4.1. Searching Events 25.4.2. Paginating Events 25.4.3. Adding Events 25.4.4. Removing Events A. API Usage with cURL Expand section "A. API Usage with cURL" Collapse section "A. API Usage with cURL" A.1. API Usage with cURL A.2. Installing cURL A.3. Using cURL A.4. Examples Expand section "A.4. Examples" Collapse section "A.4. Examples" A.4.1. GET Request with cURL A.4.2. POST Request with cURL A.4.3. PUT Request with cURL A.4.4. DELETE Request with cURL A.4.5. DELETE Request Including Body with cURL B. Enumerated Value Translation Expand section "B. Enumerated Value Translation" Collapse section "B. Enumerated Value Translation" B.1. Enumerated Value Translation C. Event Codes Expand section "C. Event Codes" Collapse section "C. Event Codes" C.1. Event Codes D. Timezones Expand section "D. Timezones" Collapse section "D. Timezones" D.1. Timezones E. Revision History Legal Notice Document options Language: 日本語 简体中文 English Format: Single-page HTML PDF ePub A.2. Installing cURL A Red Hat Enterprise Linux user installs cURL with the following terminal command: yum install curl For other platforms, seek installation instructions on the cURL website (http://curl.haxx.se/). Previous Next