Next Generation Cloud Servers™ Developer Guide

Next Generation Cloud Servers™ Developer Guide
docs.rackspace.com/api
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Next Generation Cloud Servers™ Developer Guide
API v2 (2015-02-10)
©2015 Rackspace US, Inc.
This document is intended for software developers who want to develop applications by using the next generation Rackspace Cloud
Servers™ powered by OpenStack. In addition to the core features of the OpenStack Compute Application Programming Interface
(API) v2, Rackspace has deployed certain extensions as permitted by the OpenStack Compute API contract. The document is for informational purposes only and is provided “AS IS.”
RACKSPACE MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS DOCUMENT AND RESERVES THE RIGHT TO MAKE CHANGES TO SPECIFICATIONS AND PRODUCT/SERVICES DESCRIPTION AT ANY TIME WITHOUT NOTICE. RACKSPACE SERVICES OFFERINGS ARE SUBJECT TO CHANGE WITHOUT NOTICE. USERS MUST TAKE FULL RESPONSIBILITY FOR APPLICATION OF ANY SERVICES MENTIONED HEREIN. EXCEPT AS SET
FORTH IN RACKSPACE GENERAL TERMS AND CONDITIONS AND/OR CLOUD TERMS OF SERVICE, RACKSPACE ASSUMES NO LIABILITY
WHATSOEVER, AND DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO ITS SERVICES INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
Except as expressly provided in any written license agreement from Rackspace, the furnishing of this document does not give you any
license to patents, trademarks, copyrights, or other intellectual property.
Rackspace®, Rackspace logo and Fanatical Support® are registered service marks of Rackspace US, Inc. All other product names and
trademarks used in this document are for identification purposes only and are property of their respective owners.
ii
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Table of Contents
Preface ........................................................................................................................... ix
1. Intended Audience ............................................................................................. ix
2. Pricing and Service Level ..................................................................................... xi
1. General API Information ............................................................................................. 1
1.1. Cloud Servers Concepts .................................................................................... 1
1.2. How cURL Commands Work ............................................................................. 2
1.3. Authenticate through the Rackspace Cloud Identity Service ............................... 6
1.4. Request/Response Types ................................................................................. 11
1.5. Links and References ...................................................................................... 15
1.6. Paginated Collections ...................................................................................... 19
1.7. Efficient Polling with the Changes-Since Parameter .................................... 22
1.8. Quotas ........................................................................................................... 23
1.9. Limits ............................................................................................................. 23
1.10. Extensions .................................................................................................... 29
1.11. Faults ............................................................................................................ 36
1.12. Role Based Access Control ............................................................................ 43
1.13. Flavors .......................................................................................................... 44
1.14. Service Access Endpoints ............................................................................... 48
2. API Operations .......................................................................................................... 49
2.1. Servers ............................................................................................................ 49
2.2. Server Key Pairs .............................................................................................. 82
2.3. Server Addresses ............................................................................................ 86
2.4. Server Actions ................................................................................................ 89
2.5. Volume Attachment Actions ......................................................................... 106
2.6. Flavors .......................................................................................................... 111
2.7. Images .......................................................................................................... 124
2.8. Metadata ..................................................................................................... 147
3. Rackspace Extensions .............................................................................................. 156
3.1. Disk Configuration Extension ........................................................................ 156
3.2. Extended Status Extension ............................................................................ 160
3.3. Rescue Mode Extension ................................................................................ 163
3.4. Used Limits Extension ................................................................................... 164
3.5. Scheduled Images Extension ......................................................................... 166
3.6. Flavors Extra Specs Extension ........................................................................ 171
3.7. Instance Actions Extension ............................................................................ 171
3.8. Config Drive Extension .................................................................................. 173
3.9. Launch an instance from a volume ............................................................... 176
3.10. Network extension ..................................................................................... 180
4. Document Change History ....................................................................................... 194
5. Resources ................................................................................................................ 199
Glossary ....................................................................................................................... 200
iii
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
List of Tables
1.1. cURL Command-Line Options .................................................................................... 3
1.2. Rackspace Cloud Identity Service Endpoints .............................................................. 6
1.3. Default Quotas ....................................................................................................... 23
1.4. Default Rate Limits ................................................................................................. 23
1.5. Absolute Max Limits ............................................................................................... 25
1.6. Absolute Total Limits .............................................................................................. 25
1.7. Fault Elements and Error Response Codes ............................................................... 37
1.8. next gen Cloud Servers Product Roles and Permissions ............................................ 43
1.9. Multiproduct (Global) Roles and Permissions ........................................................... 44
1.10. Supported Flavors for Next Generation Cloud Servers ............................................ 47
2.1. List Server Response Fields ...................................................................................... 58
2.2. List Server Response Fields ...................................................................................... 58
2.3. Create Server Request Attributes ............................................................................ 61
2.4. Get Server Details Response Fields .......................................................................... 69
2.5. Update Server Request Attributes ........................................................................... 75
2.6. Change Administrator Password Request Attributes ................................................ 90
2.7. Reboot Server Request Attributes ........................................................................... 91
2.8. Rebuild Server Request Attributes ........................................................................... 92
2.9. Resize Server Request Attributes ............................................................................. 97
2.10. Create Image Request Attributes ........................................................................ 104
2.11. Attach Volume Request Attributes ...................................................................... 106
2.12. Set Metadata Request Attributes ........................................................................ 148
2.13. Update Metadata Request Attributes ................................................................. 150
2.14. Set Metadata Item Request Attributes ................................................................ 153
3.1. Extended Status Extension .................................................................................... 160
3.2. Server Statuses and Corresponding VM and Task Statuses ..................................... 161
3.3. List Networks Response Fields ............................................................................... 182
3.4. Create Network Request Attributes ...................................................................... 183
3.5. Create Network Response Fields ........................................................................... 183
3.6. Provision Server with Isolated Network Request Attributes .................................... 186
3.7. Show Network Response Fields ............................................................................. 189
3.8. List Virtual Interfaces Response Fields ................................................................... 190
3.9. Create Virtual Interface Request Attributes ........................................................... 192
3.10. Create Virtual Interface Response Fields .............................................................. 192
iv
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
List of Examples
1.1. cURL Command Example: JSON Request ................................................................... 2
1.2. cURL Command Example: XML Request .................................................................... 5
1.3. cURL Command Example: XML Response .................................................................. 5
1.4. Authenticate to US Identity Endpoint – Username and Password: JSON Request........ 7
1.5. Authenticate to US Identity Endpoint – Username and API Key: JSON Request ....... 7
1.6. Pretty Printing cURL Output ..................................................................................... 8
1.7. Authenticate: JSON Response ................................................................................... 8
1.8. Request with Headers: JSON ................................................................................... 11
1.9. Response with Headers: XML .................................................................................. 13
1.10. JSON Request with XML Query Extension for the Response ................................... 13
1.11. Image Reference in Create Server Request: JSON Request ..................................... 15
1.12. Full Image Reference in Create Server Request: JSON Request ............................... 15
1.13. Image Reference in Create Server Request: XML Request ...................................... 16
1.14. Full Image Reference in Create Server Request: XML Request ................................ 16
1.15. Server with Self Links: JSON .................................................................................. 17
1.16. Server with Alternate Link: JSON .......................................................................... 17
1.17. Server with Self Links: XML ................................................................................... 17
1.18. Image with Alternate Link: XML ........................................................................... 18
1.19. Images Collection – First Page: JSON ..................................................................... 20
1.20. Images Collection – Second Page: JSON ................................................................ 20
1.21. Images Collection – Last Page: JSON ..................................................................... 20
1.22. Images Collection – First Page: XML ...................................................................... 21
1.23. Images Collection – Second Page: XML ................................................................. 21
1.24. Images Collection – Last Page: XML ...................................................................... 21
1.25. Get Limits: JSON Response .................................................................................... 26
1.26. Get Limits: XML Response ..................................................................................... 28
1.27. Get Extensions: cURL with JSON Request .............................................................. 29
1.28. Get Extensions: JSON Response ............................................................................. 29
1.29. Get Extensions: cURL with XML Request ............................................................... 31
1.30. Get Extensions: XML Response ............................................................................. 31
1.31. Get Extension: cURL with JSON Request ................................................................ 32
1.32. Get Extension: JSON Response .............................................................................. 32
1.33. Get Extension: cURL with XML Request ................................................................. 32
1.34. Get Extension: XML Response ............................................................................... 32
1.35. Extended Server: XML Response ........................................................................... 33
1.36. Extended Server: JSON Response .......................................................................... 34
1.37. Extended Action: XML Request ............................................................................. 35
1.38. Extended Action: JSON Request ............................................................................ 35
1.39. Fault: JSON Response ........................................................................................... 36
1.40. Fault: XML Response ............................................................................................ 36
1.41. Fault, Item Not Found: JSON Response ................................................................. 37
1.42. Fault, Item Not Found: XML Response .................................................................. 37
1.43. Fault, Over Limit: JSON Response .......................................................................... 38
1.44. Fault, Over Limit: XML Response ........................................................................... 38
1.45. Server in Error State: XML .................................................................................... 39
1.46. Server in Error State: JSON ................................................................................... 40
1.47. Image in Error State: XML .................................................................................... 41
1.48. Image in Error State: JSON ................................................................................... 42
v
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.1. List Servers Details: JSON Request in a cURL Command ........................................... 51
2.2. List Servers Details: JSON Response ......................................................................... 51
2.3. List Servers Details Where Servers Have Scheduled Images Enabled: JSON Response ........................................................................................................................... 53
2.4. List Servers Detail: XML Request in a cURL Command .............................................. 54
2.5. List Servers Detail: XML Response ........................................................................... 54
2.6. List Servers Detail Where Servers Have Scheduled Images Enabled: XML Response
...................................................................................................................................... 55
2.7. Create Server: JSON Request .................................................................................. 63
2.8. Create Server: JSON Response ................................................................................ 63
2.9. Create Server: XML Request ................................................................................... 64
2.10. Create Server: XML Response ............................................................................... 64
2.11. Set Administrator Password in Create Server Request: JSON Request ...................... 65
2.12. Create Server with Access IP: JSON Request .......................................................... 67
2.13. Create Server with Access IP: XML Request ........................................................... 67
2.14. Create Server with Multiple Access IPs: JSON Request ............................................ 68
2.15. Create Server with Multiple Access IPs: XML Request ............................................. 68
2.16. Get Server Details: JSON Response ........................................................................ 71
2.17. Get Server Details for a Server with Scheduled Images Enabled: JSON Response
...... 72
2.18. Get Server Details: XML Response ......................................................................... 73
2.19. Get Server Details for a Server with Scheduled Images Enabled: XML Response....... 74
2.20. Update Server Name: JSON Request ..................................................................... 75
2.21. Update Server Name: JSON Response ................................................................... 75
2.22. Update Server Name: XML Request ...................................................................... 77
2.23. Update Server Name: XML Response .................................................................... 77
2.24. Update Server Access Address: JSON Request ........................................................ 77
2.25. Update Server Access Address: JSON Response ...................................................... 77
2.26. Update Server Access Address: XML Request ......................................................... 80
2.27. Update Server Access Address: XML Response ...................................................... 80
2.28. Create Key Pair: JSON Request .............................................................................. 82
2.29. Create Key Pair: JSON Response ............................................................................ 83
2.30. Create Key Pair: XML Request .............................................................................. 83
2.31. Create Key Pair: XML Response ............................................................................ 83
2.32. Upload Existing Key: JSON Request ....................................................................... 84
2.33. Upload Existing Key: JSON Response ..................................................................... 84
2.34. Upload Existing Key: XML Request ........................................................................ 84
2.35. Upload Existing Key: XML Response ...................................................................... 84
2.36. List Key Pairs: JSON Response ............................................................................... 85
2.37. List Key Pairs: XML Response ................................................................................ 85
2.38. List Addresses: JSON Response .............................................................................. 87
2.39. List Addresses: XML Response ............................................................................... 87
2.40. List Addresses by Network: JSON Response ........................................................... 88
2.41. List Addresses by Network: XML Response ............................................................ 88
2.42. Change Administrator Password: JSON Request .................................................... 90
2.43. Change Administrator Password: XML Request ..................................................... 90
2.44. Reboot Server: JSON Request ............................................................................... 91
2.45. Reboot Server: XML Request ................................................................................ 91
2.46. Rebuild Server: JSON Request ............................................................................... 94
2.47. Rebuild Server: JSON Response ............................................................................. 94
2.48. Rebuild Server: XML Request ................................................................................ 96
2.49. Rebuild Server: XML Response .............................................................................. 96
vi
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.50. Resize Server: JSON Request ................................................................................. 98
2.51. Resize Server: XML Request .................................................................................. 98
2.52. Confirm Resize: JSON Request .............................................................................. 99
2.53. Confirm Resize: XML Request ............................................................................... 99
2.54. Revert Resize: JSON Request ............................................................................... 100
2.55. Revert Resize: XML Request ................................................................................ 100
2.56. Rescue Server Request: JSON .............................................................................. 102
2.57. Rescue Server Response: JSON ............................................................................ 102
2.58. Rescue Server Request: XML ............................................................................... 102
2.59. Rescue Server Response: XML ............................................................................. 102
2.60. Unrescue Server Request: JSON ........................................................................... 103
2.61. Unrescue Server Request: XML ............................................................................ 103
2.62. Create Image: JSON Request ............................................................................... 105
2.63. Create Image: XML Request ................................................................................ 105
2.64. Attach Volume Request: JSON ............................................................................ 107
2.65. Attach Volume Response: JSON .......................................................................... 107
2.66. Attach Volume Request: XML ............................................................................. 107
2.67. Attach Volume Response: XML ........................................................................... 107
2.68. List Volume Attachments Response: JSON ........................................................... 109
2.69. List Volume Attachments Response: XML ............................................................ 109
2.70. Get Volume Attachment Details Response: JSON ................................................. 110
2.71. Get Volume Attachment Details Response: XML .................................................. 110
2.72. List Flavors: JSON Response (detail) ..................................................................... 112
2.73. List Flavors: XML Response (detail) ..................................................................... 118
2.74. Get Flavor Details - Compute: JSON Response ..................................................... 122
2.75. Get Flavor Details - Compute: XML Response ...................................................... 123
2.76. Get Flavor Details - OnMetal: JSON Response ...................................................... 123
2.77. Get Flavor Details - OnMetal: XML Response ....................................................... 123
2.78. List Images: JSON Response (detail) .................................................................... 125
2.79. List Images: XML Response (detail) ..................................................................... 127
2.80. List Images: JSON Response ................................................................................ 127
2.81. List Images: XML Response ................................................................................. 139
2.82. Get Image Details: JSON Response ...................................................................... 143
2.83. Get Image Details: XML Response ....................................................................... 145
2.84. List Metadata: JSON Response ............................................................................ 147
2.85. List Metadata: XML Response ............................................................................. 147
2.86. Set Metadata: JSON Request .............................................................................. 148
2.87. Set Metadata: JSON Response ............................................................................ 148
2.88. Set Metadata: XML Request ............................................................................... 148
2.89. Set Metadata: XML Response ............................................................................. 149
2.90. Update Metadata: JSON Request ........................................................................ 150
2.91. Update Metadata: JSON Response ...................................................................... 150
2.92. Update Metadata: XML Request ......................................................................... 150
2.93. Update Metadata: XML Response ....................................................................... 151
2.94. Get Metadata Item: JSON Response .................................................................... 152
2.95. Get Metadata Item: XML Response ..................................................................... 152
2.96. Set Metadata Item: JSON Request ...................................................................... 153
2.97. Set Metadata Item: JSON Response .................................................................... 153
2.98. Set Metadata Item: XML Request ....................................................................... 154
2.99. Set Metadata Item: XML Response ..................................................................... 154
3.1. Create Server with OS-DCF:diskConfig: JSON Request ............................................ 157
vii
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
3.2. Create Server with OS-DCF:diskConfig: XML Request .............................................
3.3. Rebuild Server with OS-DCF:diskConfig: JSON Request ...........................................
3.4. Rebuild Server with OS-DCF:diskConfig: XML Request ............................................
3.5. Resize Server with OS-DCF:diskConfig: JSON Request .............................................
3.6. Resize Server with OS-DCF:diskConfig: XML Request ..............................................
3.7. Place a Server in Rescue Mode: JSON Request .......................................................
3.8. Place a Server in Rescue Mode: JSON Response .....................................................
3.9. Place a Server in Rescue Mode: XML Request ........................................................
3.10. Place a Server in Rescue Mode: XML Response ....................................................
3.11. Unrescue a Server in Rescue Mode: XML Request ................................................
3.12. Used Limits: JSON Response ................................................................................
3.13. Enable daily scheduled images: JSON Request .....................................................
3.14. Enable daily scheduled images: XML Request ......................................................
3.15. Enable weekly scheduled images: JSON Request ..................................................
3.16. Enable weekly scheduled images: XML Request ...................................................
3.17. Show daily scheduled images: JSON Response .....................................................
3.18. Show daily scheduled images: XML Response ......................................................
3.19. Show weekly scheduled images: JSON Response ..................................................
3.20. Show weekly scheduled images: XML Response ...................................................
3.21. Show Scheduled Images Error: JSON Response ....................................................
3.22. Show Scheduled Images Error: XML Response .....................................................
3.23. Show Flavor Extra Specs - Standard: JSON Response ............................................
3.24. Show Flavor Extra Specs - Compute1: JSON Response ..........................................
3.25. List Server Actions: JSON Response .....................................................................
3.26. Show Server Action: JSON Response ...................................................................
3.27. Create server using config_drive with user_data: JSON Request ...........................
3.28. Create server using config_drive with user_data: JSON Response .........................
3.29. Create server using config_drive with user_data: XML Request ............................
3.30. Create server using config_drive with user_data: XML Response ..........................
3.31. One-step create volume and boot server: JSON Request ......................................
3.32. One-step create volume and boot server: JSON Response ....................................
3.33. List Networks: JSON Response ............................................................................
3.34. List Networks: XML Response .............................................................................
3.35. Create Network: JSON Request ...........................................................................
3.36. Create Network: JSON Response .........................................................................
3.37. Create Network: XML Request ............................................................................
3.38. Create Network: XML Response ..........................................................................
3.39. Provision Server with Isolated Network: JSON Request ........................................
3.40. Provision Server with Isolated Network: JSON Response ......................................
3.41. Provision Server with Isolated Network: XML Request .........................................
3.42. Provision Server with Isolated Network: XML Response .......................................
3.43. Show Network: JSON Response ..........................................................................
3.44. Show Network: XML Response ...........................................................................
3.45. List Virtual Interfaces: JSON Response .................................................................
3.46. List Virtual Interfaces: XML Response ..................................................................
3.47. Create Virtual Interface: JSON Request ................................................................
3.48. Create Virtual Interface: JSON Response .............................................................
3.49. Create Virtual Interface: XML Request ................................................................
3.50. Create Virtual Interface: XML Response ..............................................................
viii
158
158
159
160
160
164
164
164
164
164
165
168
169
169
169
169
169
169
170
170
170
171
171
172
173
174
175
175
175
179
180
182
182
183
184
184
184
186
186
188
188
189
189
190
191
192
192
192
193
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Preface
Next generation Cloud Servers powered by OpenStack is a fast, reliable, and scalable cloud
compute solution without the risk of proprietary lock-in. It provides the core features of the
OpenStack Compute API v2 and also deploys certain extensions as permitted by the OpenStack Compute API contract. Some of these extensions are generally available through
OpenStack while others implement Rackspace-specific features to meet customers’ expectations and for operational compatibility. The OpenStack Compute API and the Rackspace extensions are known collectively as API v2.
Important
During 2015, all First Generation servers will be migrated to Next Generation
servers, on a rolling basis.
Notification from Rackspace will be sent to customers informing them of their
30-day window to complete the migration of the specified servers. If you take
no action, your server will be migrated for you.
To migrate your servers, during your migration window, simply perform a SOFT
reboot on your first gen server, either from the Control Panel or by using the reboot API operation. The migration process will preserve all data and configuration settings.
During the 30-day migration window, performing a HARD reboot on a first gen
server will reboot the server without triggering the migration.
You can see information about your migration window's open and close
dates, use the Get Server Details on your first gen server, and look in the metadata section of the response for "FG2NG_self_migration_available_till" and
"FG2NG_self_migration_available_from" key pairs. If your migration window
has not been scheduled, you will not see these metadata keys.
For more information about the server migration see the Knowledge Center article: First Generation to Next Generation cloud server migration FAQ
This document describes the features available with API v2.
We welcome feedback, comments, and bug reports. Log into the Rackspace customer portal at https://feedback.rackspace.com/.
1. Intended Audience
This guide assists software developers who want to develop applications by using next
generation Cloud Servers. To use this information, you should have access to an active
Rackspace Cloud Servers account, and you should also be familiar with the following concepts:
• Rackspace Cloud Servers service
• RESTful web services
• HTTP/1.1
ix
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
• JSON and/or XML data serialization formats
x
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2. Pricing and Service Level
Next generation Cloud Servers is part of the Rackspace Cloud and your use through the
API is billed according to the pricing schedule at http://www.rackspace.com/cloud/public/servers/pricing.
The Service Level Agreement (SLA) for Cloud Servers is available at http://
www.rackspace.com/cloud/legal/sla/#cloud_servers.
xi
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1. General API Information
API v2 is defined as a RESTful HTTP service that uses all aspects of the HTTP protocol, including methods, URIs, media types, and response codes. To request next generation Cloud
Servers services, you must first issue an authentication request to the Rackspace Cloud Identity Service, which is an implementation of the OpenStack Keystone Identity Service v2.0.
API v2 supports both the JSON and XML data serialization request and response formats.
1.1. Cloud Servers Concepts
To use the next generation Cloud Servers service with or without the Cloud Networks extension you should understand these key concepts:
Concept
Description
Server
A virtual machine (VM) instance running on a host. To create a server, you must specify a name, flavor reference,
and image reference. See create server.
Host
A physical server running multiple VM instances.
Flavor
A resource configuration for a server. Each flavor is a
unique combination of disk space, memory capacity, vCPUs, and network bandwidth. See flavors.
Image
A collection of files for a specific operating system (OS)
that you use to create or rebuild a server. Rackspace provides pre-built images. You can also create custom images
from servers that you have launched. Custom images can
be used for data backups or as "gold" images for additional servers. See images.
Reboot
This action performs either a soft or hard reboot of a server. A soft reboot is a graceful shutdown and restart of the
operating system on your server. A hard reboot power cycles your server, which performs an immediate shutdown
and restart. See reboot server.
Rebuild
This action removes all data on the server and replaces it
with the specified image. Server ID and IP addresses on
the server remain the same. See rebuild server.
Resize
This action converts an existing server to a different flavor,
which scales the server up or down. The original server is
saved for a period of time to allow rollback if a problem
occurs. You can confirm or revert a resize. A confirmed resize removes the original server. A reverted resize restores
the original server. All resizes are automatically confirmed
after 24 hours if you do not explicitly confirm or revert
them. See resize server.
CIDR
Classless Inter-Domain Routing (CIDR). A method for allocating IP addresses and routing Internet Protocol packets.
When you create an isolated network through Cloud Networks, you specify a CIDR.
isolated network
A virtual Layer 2 network that your create through Cloud
Networks and that you can attach to a new Next Generation Cloud Server. Use an isolated network to keep your
server separate from the Rackspace network, the Internet,
or both. When you create a isolated network, it is associated with your tenant ID.
PublicNet
Provides access to the Internet, Rackspace services such
as Cloud Monitoring, Managed Operations Service Level,
1
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Concept
API v2
Description
RackConnect, Cloud Backup, and certain operating system
updates. When you list networks through Cloud Networks,
PublicNet is labeled public.
ServiceNet
An internal only, multi-tenant network connection within
each Rackspace data center. Provides access to Rackspace
services, such as Cloud Files, Cloud Databases, Cloud Backup, and to certain packages and patches. ServiceNet IPs
are not accessible from the Internet and are local to each
data center. You can configure your account resources to
use a ServiceNet IP address so that traffic over the internal network is not billed. When you list networks through
Cloud Networks, ServiceNet is labeled as private.
1.2. How cURL Commands Work
cURL is a command-line tool that you can use to interact with REST interfaces. cURL lets
you to transmit and receive HTTP requests and responses from the command line or a shell
script, which enables you to work with the API directly. It is available for Linux distributions,
Mac OS X, and Windows. For information about cURL, see http://curl.haxx.se/.
To use XML requests and responses, see Section 1.2.1, “XML Requests and Responses” [5].
To run the cURL request examples shown in this guide, copy each example from the HTML
version of this guide directly to the command line or a script.
The following command is an example cURL command that provisions a server with an isolated network:
Example 1.1. cURL Command Example: JSON Request
$ curl https://dfw.servers.api.rackspacecloud.com/v2/$account/servers \
-X POST \
-H "X-Auth-Project-Id: $account" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Auth-Token: $token" \
-d '{"server": {"name": "my_server_with_network", "imageRef": "d42f821e-c2d1-4796-9f07af5ed7912d0e", "flavorRef": "2", "max_count": 1, "min_count": 1, "networks": [{"uuid":
"538a112a-34d1-47ff-bf1e-c40639e886e2"}, {"uuid": "00000000-0000-0000-0000-000000000000"}, {"uuid":
"11111111-1111-1111-1111-111111111111"}]}}' \
| python -m json.tool
Note
The carriage returns in the cURL request examples use a backslash (\) as an
escape character. The escape character allows continuation of the command
across multiple lines. However, do not include the escape character in the JSON
or XML request body within the cURL command.
2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
The cURL examples in this guide use the following command-line options:
Table 1.1. cURL Command-Line Options
Option
Description
-d
Sends the specified data in a POST request to the
HTTP server. Use this option to send a JSON or
XML request body to the server.
-H
Specifies an extra HTTP header in the request.
You can specify any number of extra headers.
Precede each header with the -H option.
Common headers in Rackspace API requests are
as follows:
• Content-Type. Required for operations with
a request body.
Specifies the format of the request body. Following is the syntax for the header where
format is either json or xml.
Content-Type: application/format
• X-Auth-Token. Required. Specifies the authentication token.
• X-Auth-Project-Id. Optional. Specifies the
project ID, which can be your account number
or another value.
• Accept. Optional.
Specifies the format of the response body.
Following is the syntax for the header where
format is either json or xml. The default is
json.
Accept: application/format
-i
Includes the HTTP header in the output.
-s
Specifies silent or quiet mode, which makes cURL
mute. No progress or error messages are shown.
-T
Transfers the specified local file to the remote
URL.
-X
Specifies the request method to use when communicating with the HTTP server. The specified
request is used instead of the default method,
which is GET.
Note
For commands that return a response, you can append the following code to
the command to call json.tool to pretty-print output:
| python -m json.tool
To use json.tool, import the json module. For information about json.tool, see
json — JSON encoder and decoder.
If you run a Python version older than 2.6, import the simplejson module and
use simplejson.tool. For information about simplejson.tool, see simplejson —
JSON encoder and decoder.
3
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
If you do not want to pretty-print JSON output, omit this code.
4
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.2.1. XML Requests and Responses
The following example shows a cURL command that specifies an XML request body and returns an XML response. The command creates a server.
Example 1.2. cURL Command Example: XML Request
$ curl -i https://dfw.servers.api.rackspacecloud.com/v2/$account/servers.xml
-X POST \
-H "X-Auth-Project-Id: $account" \
\
-H "Content-Type: application/xml" \
-H "Accept: application/xml" \
-H "X-Auth-Token: $token" \
-T server_post_req.xml
| ppxml
This example includes the following changes to the basic JSON request format in Example 1.1, “cURL Command Example: JSON Request” [2]:
The endpoint in the cURL command has .xml appended to it to return an XML response.
The Content-Type: header specifies application/xml instead of application/json.
The Accept: header specifies application/xml instead of application/json.
The request body, if required, should be specified it in XML format. In this example,
the XML body is passed in the server_post_req.xml file, as follows:
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" imageRef="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001"
flavorRef="2"
name="api-test-server-xml2">
<metadata>
<meta key="My Server Name">API Test Server XML</meta>
</metadata>
<personality>
<file path="/etc/banner.txt"> ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA==</file>
</personality>
<networks>
<network uuid="0ef47ac7-6797-4e01-8a47-ed26ec3aaa56"/>
<network uuid="00000000-0000-0000-0000-000000000000"/>
<network uuid="11111111-1111-1111-1111-111111111111"/>
</networks>
<keypair>
<key_name>name_of_keypair-96bbe50e-05e1-4d59-9115-4779a3ebcc2e</key_name>
</keypair>
</server>
To pretty-print the XML output, set the ppxml alias, as follows:
$ alias ppxml='python -c "import sys, xml.dom.minidom; print xml.dom.minidom.parseString(sys.stdin.read()).toprettyxml()"'
Then, append the ppxml alias to the cURL command.
The cURL command returns information about the new server in XML format, as shown in
the following example.
Example 1.3. cURL Command Example: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<server
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1"
id="ed5c7754-29b6-45fa-96cb-ab64958c8c0a" adminPass="Dd5pNZtpVVQ3"
OS-DCF:diskConfig="AUTO">
5
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<metadata/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ed5c7754-29b6-45fa-96cbab64958c8c0a"
rel="self"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/servers/ed5c7754-29b6-45fa-96cbab64958c8c0a"
rel="bookmark"/>
</server>
1.3. Authenticate through the Rackspace Cloud
Identity Service
To authenticate access to Rackspace Cloud services, you issue an authentication request to
a Rackspace Cloud Identity Service endpoint. The Rackspace Cloud Identity Service is an implementation of the OpenStack Keystone Identity Service v2.0.
In response to valid credentials, an authentication request to the Rackspace Cloud Identity
Service returns an authentication token and a service catalog that contains a list of all services and endpoints available for this token. Because the authentication token expires after
24 hours, you must generate a token once a day.
The following sections list the Rackspace Cloud Identity Service endpoints, show you how
make an authentication request, and describe the authentication response.
For detailed information about the Identity Service v2.0, see the Cloud Identity Client Developer Guide API v2.0.
1.3.1. Rackspace Cloud Identity Service Endpoints
Important
Multiple Rackspace Cloud Identity Service endpoints exist. You may use any
endpoint, regardless of where your account was created.
When you authenticate, use one of the following endpoints:
Tip
To help you decide which regionalized endpoint to use, read about special
considerations for choosing a data center at http://ord.admin.kc.rakr.net/
knowledge_center/article/about-regions.
Table 1.2. Rackspace Cloud Identity Service Endpoints
National location
Rackspace Cloud Identity Service endpoint
US
https://identity.api.rackspacecloud.com/v2.0
UK
https://lon.identity.api.rackspacecloud.com/v2.0
For information about support for legacy identity endpoints, see Alternate Authentication
Endpoints in the Cloud Identity Client Developer Guide.
6
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.3.2. Authentication Request
To authenticate, issue a POST /tokens request to the appropriate Rackspace Cloud Identity
Service endpoint. See Section 1.3.1, “Rackspace Cloud Identity Service Endpoints” [6].
In the request body, supply one of the following sets of credentials:
• Username and password
• Username and API key
Your username and password are the ones that you use to log in to the Rackspace Cloud
Control Panel.
Note
If you authenticate with username and password credentials, you can use multi-factor authentication to add an additional level of account security. This feature is not implemented for username and API credentials. For more information, see Multifactor authentication in the Cloud Identity Client Developer
Guide.
To find your API key, perform the following steps:
1. Log in to the Cloud Control Panel (http://mycloud.rackspace.com).
2. On the upper-right side of the top navigation pane, click your username.
3. From the menu, select Account Settings.
4. In the Login Details section of the Account Settings page, locate the API Key field and
click Show.
The following cURL examples show how to get an authentication token by entering your
username and either password or your API key.
Example 1.4. Authenticate to US Identity Endpoint – Username and
Password: JSON Request
$ curl -s https://identity.api.rackspacecloud.com/v2.0/tokens -X 'POST' \
-d '{"auth":{"passwordCredentials":{"username":"MyRackspaceAcct", "password":"MyRackspacePwd"}}}' \
-H "Content-Type: application/json" | python -m json.tool
Example 1.5. Authenticate to US Identity Endpoint – Username and API Key:
JSON Request
$ curl -s https://identity.api.rackspacecloud.com/v2.0/tokens -X 'POST' \
-d '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"MyRackspaceAcct", "apiKey":"0000000000000000000"}}}' \
-H "Content-Type: application/json" | python -m json.tool
Note
In these examples, the following code is appended to the cURL commands to
make the JSON output more readable:
7
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 1.6. Pretty Printing cURL Output
| python -m json.tool
1.3.3. Authentication Response
In response to valid credentials, your request returns an authentication token and a service
catalog with the endpoints that you use to request services.
Note
If you authenticated with username and password credentials, and the Identity
service returns a 401 message requesting additional credentials, your account is
configured for multi-factor authentication. To complete the authentication process, submit a second POST tokens request with multi-factor authentication credentials.
Do not include explicit API endpoints in your scripts and applications. Instead, find the endpoint for your service and region.
The following output shows a partial authentication response in JSON format:
Example 1.7. Authenticate: JSON Response
{
"access": {
"serviceCatalog": [
{
"endpoints": [
{
"internalURL": "https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_530f8649-324c-499ca075-2195854d52a7",
"publicURL": "https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_530f8649-324c-499ca075-2195854d52a7",
"region": "DFW",
"tenantId": "MossoCloudFS_530f8649-324c-499c-a075-2195854d52a7"
},
{
"internalURL": "https://snet-storage101.ord1.clouddrive.com/v1/MossoCloudFS_530f8649-324c-499ca075-2195854d52a7",
"publicURL": "https://storage101.ord1.clouddrive.com/v1/MossoCloudFS_530f8649-324c-499ca075-2195854d52a7",
"region": "ORD",
"tenantId": "MossoCloudFS_530f8649-324c-499c-a075-2195854d52a7"
}
],
"name": "cloudFiles",
"type": "object-store"
},
{
"endpoints": [
{
"publicURL": "https://servers.api.rackspacecloud.com/v1.0/010101",
"tenantId": "010101",
"versionId": "1.0",
"versionInfo": "https://servers.api.rackspacecloud.com/v1.0",
"versionList": "https://servers.api.rackspacecloud.com/"
}
],
"name": "cloudServers",
"type": "compute"
},
{
"endpoints": [
{
"publicURL": "https://dfw.servers.api.rackspacecloud.com/v2/010101",
"region": "DFW",
"tenantId": "010101",
"versionId": "2",
"versionInfo": "https://dfw.servers.api.rackspacecloud.com/v2",
"versionList": "https://dfw.servers.api.rackspacecloud.com/"
},
8
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
{
"publicURL": "https://ord.servers.api.rackspacecloud.com/v2/010101",
"region": "ORD",
"tenantId": "010101",
"versionId": "2",
"versionInfo": "https://ord.servers.api.rackspacecloud.com/v2",
"versionList": "https://ord.servers.api.rackspacecloud.com/"
}
],
"name": "cloudServersOpenStack",
"type": "compute"
}
],
"token": {
"expires": "2012-09-14T15:11:57.585-05:00",
"id": "858fb4c2-bf15-4dac-917d-8ec750ae9baa"
,
"tenant": {
"id": "010101",
"name": "010101"
}
},
"user": {
"RAX-AUTH:defaultRegion": "DFW",
"id": "170454",
"name": "MyRackspaceAcct",
"roles": [
{
"description": "User Admin Role.",
"id": "3",
"name": "identity:user-admin"
}
]
}
}
}
Successful authentication returns the following information:
Endpoints to request Rackspace Cloud services. Appears in the endpoints element
in the serviceCatalog element.
Endpoint information includes the public URL, which is the endpoint that you use to
access the service, as well as region, tenant ID, and version information.
To access the Cloud Networks or next generation Cloud Servers service, use the endpoint for the cloudServersOpenStack service.
Tip
To help you decide which regionalized endpoint to use, read about special
considerations for choosing a data center at http://ord.admin.kc.rakr.net/
knowledge_center/article/about-regions.
Tenant ID. Appears in the tenantId field in the endpoints element. The tenant ID
is also known as the account number.
You include the tenant ID in the endpoint URL when you call a cloud service.
In the following example, you export the tenant ID, 010101, to the account environment variable and the authentication token to the token environment variable. Then,
you issue a cURL command to send a request to a service as follows:
$ export account="010101"
$ export token="00000000-0000-0000-000000000000"
$ curl -s https://dfw.servers.api.rackspacecloud.com/v2/$account/images/detail \
-H "X-Auth-Token: $token" | python -m json.tool
The name of the service. Appears in the name field.
Locate the correct service name in the service catalog, as follows:
• First generation Cloud Servers. Named cloudServers in the catalog.
9
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
If you use the authentication token to access this service, you can view and perform
first generation Cloud Servers API operations against your first generation Cloud
Servers.
• Cloud Networks or next generation Cloud Servers. Named cloudServersOpenStack in the catalog.
To access the Cloud Networks or next generation Cloud Servers service, use the
publicURL value for the cloudServersOpenStack service.
The service might show multiple endpoints to enable regional choice. Select the appropriate endpoint for the region that you want to interact with by examining the
region field.
Tip
To help you decide which regionalized endpoint to use, read
about special considerations for choosing a data center at http://
ord.admin.kc.rakr.net/knowledge_center/article/about-regions.
If you use the authentication token to access this service, you can view and perform
Cloud Networks or next generation Cloud Servers API operations against your next
generation Cloud Servers.
Expiration date and time for authentication token. Appears in the expires field in
the token element.
After this date and time, the token is no longer valid.
This field predicts the maximum lifespan for a token, but does not guarantee that the
token reaches that lifespan.
Clients are encouraged to cache a token until it expires.
Because the authentication token expires after 24 hours, you must generate a token
once a day.
Authentication token. Appears in the id field in the token element.
You pass the authentication token in the X-Auth-Token header each time that you
send a request to a service.
In the following example, you export the tenant ID, 010101, to the account environment variable. You also export the authentication token,
00000000-0000-0000-000000000000, to the token environment variable. Then,
you issue a cURL command to send a request to a service as follows:
$ export account="010101"
$ export token="00000000-0000-0000-000000000000"
$ curl -s https://dfw.servers.api.rackspacecloud.com/v2/$account/images/detail \
-H "X-Auth-Token: $token" | python -m json.tool
10
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.4. Request/Response Types
API v2 supports both the JSON and XML data serialization request and response formats.
You specify the request format in the Content-Type header in the request. This header is
required for operations that have a request body. The syntax for the Content-Type header is:
Content-Type: application/format
Where format is either json or xml.
You specify the response format by using one of the following methods:
• Accept header. The syntax for the Accept header is:
Accept: application/format
Where format is either json or xml.
Default is json.
• Query extension. Add an .xml or .json extension to the request URI. For example, the
.xml extension in the following URI request specifies that the response body is returned
in XML format:
POST /v2/010101/servers.xml
If you do not specify a response format, JSON is the default.
If you specify conflicting formats in the Accept header and the query extension, the format specified in the query extension takes precedence. For example, if the query extension
is .xml and the Accept header specifies application/json, the response is returned in
XML format.
You can serialize a response in a different format from the request format. Example 1.8,
“Request with Headers: JSON” [11] and Example 1.9, “Response with Headers:
XML” [13] show a request body in JSON format and a response body in XML format.
Example 1.8. Request with Headers: JSON
POST /v2/010101/servers HTTP/1.1
Host: dfw.servers.api.rackspacecloud.com
Content-Type: application/json
Accept: application/xml
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
{
"server" : {
"name" : "api-test-server-1",
"imageRef" : "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"flavorRef" : "2",
"config_drive": true,
"key_name":"name_of_keypair",
"OS-DCF:diskConfig" : "AUTO",
"metadata" : {
"My Server Name" : "API Test Server 1"
},
11
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" :
"ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYS
="
}
],
"networks": [
{
"uuid": "4ebd35cf-bfe7-4d93-b0d8-eb468ce2245a"
},
{
"uuid": "00000000-0000-0000-0000-000000000000"
},
{
"uuid": "11111111-1111-1111-1111-111111111111"
}
]
}
}
12
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 1.9, “Response with Headers: XML” [13] shows the headers and XML response
returned by the JSON request:
Example 1.9. Response with Headers: XML
HTTP/1.1 202 Accepted
Date: Mon, 23 Jul 2012 20:24:48 GMT
Content-Length: 582
Location: https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/06dba123-2c7e-4639bea0-09fbe219b056
Content-Type: application/xml
X-Compute-Request-Id: req-ab05045a-452f-4b46-be0d-86494da02a2b
Server: Jetty(8.0.y.z-SNAPSHOT)
<?xml version='1.0' encoding='UTF-8'?>
<server
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1"
id="ed5c7754-29b6-45fa-96cb-ab64958c8c0a" adminPass="Dd5pNZtpVVQ3"
OS-DCF:diskConfig="AUTO">
<metadata/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
ed5c7754-29b6-45fa-96cb-ab64958c8c0a"
rel="self"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/servers/
ed5c7754-29b6-45fa-96cb-ab64958c8c0a"
rel="bookmark"/>
</server>
The following example shows an alternative method of achieving the same result. The following request uses an URI extension of .xml instead of an Accept header to request an
XML response.
Note
The XML response is not shown.
Example 1.10. JSON Request with XML Query Extension for the Response
POST /v2/010101/servers.xml HTTP/1.1
Host: dfw.servers.api.rackspacecloud.com
Content-Type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
{
"server" : {
"name" : "api-test-server-1",
"imageRef" : "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"flavorRef" : "2",
"config_drive": true,
"key_name":"name_of_keypair",
"OS-DCF:diskConfig" : "AUTO",
"metadata" : {
"My Server Name" : "API Test Server 1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" :
"ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYS
="
13
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
}
],
"networks": [
{
"uuid": "4ebd35cf-bfe7-4d93-b0d8-eb468ce2245a"
},
{
"uuid": "00000000-0000-0000-0000-000000000000"
},
{
"uuid": "11111111-1111-1111-1111-111111111111"
}
]
}
}
14
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.5. Links and References
Resources often need to refer to other resources. For example, when you create a server,
you must specify the image from which to build the server. You can specify the image by
providing an ID or a URL to a remote image. When you provide an ID for a resource, it is assumed that the resource exists in the current endpoint.
Example 1.11. Image Reference in Create Server Request: JSON Request
{
"server" : {
"name" : "api-test-server-1",
"imageRef" : "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"flavorRef" : "2",
"config_drive": true,
"key_name":"name_of_keypair",
"OS-DCF:diskConfig" : "AUTO",
"metadata" : {
"My Server Name" : "API Test Server 1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" :
"ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYS
="
}
],
"networks": [
{
"uuid": "4ebd35cf-bfe7-4d93-b0d8-eb468ce2245a"
},
{
"uuid": "00000000-0000-0000-0000-000000000000"
},
{
"uuid": "11111111-1111-1111-1111-111111111111"
}
]
}
}
Example 1.12. Full Image Reference in Create Server Request: JSON Request
{
"server" : {
"name" : "myUbuntuServer",
"imageRef" : "https://dfw.servers.api.rackspacecloud.com/v2/010101/images/
3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"flavorRef" : "6",
"metadata" : {
"My Server Name" : "Ubuntu 11.10 server"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" :
"ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYS
="
}
],
"networks": [
{
"uuid": "4ebd35cf-bfe7-4d93-b0d8-eb468ce2245a"
},
{
"uuid": "00000000-0000-0000-0000-000000000000"
},
15
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
{
"uuid": "11111111-1111-1111-1111-111111111111"
}
]
}
}
Example 1.13. Image Reference in Create Server Request: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
imageRef="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001"
flavorRef="6"
diskConfig="AUTO"
name="new-server-test"
>
<metadata>
<meta key="My Server Name">Server test</meta>
</metadata>
<personality>
<file path="/etc/banner.txt">
ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
</file>
</personality>
</server>
Example 1.14. Full Image Reference in Create Server Request: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
imageRef="https://dfw.servers.api.rackspacecloud.com/v2/010101/images/3afe97b2-26dc-49c5a2cc-a2fc8d80c001"
flavorRef="6"
OS-DCF:diskConfig="AUTO"
name="new-server-test">
<metadata>
<meta key="My Server Name">Server test</meta>
</metadata>
<personality>
<file path="/etc/banner.txt">
ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
b25zLiINCg0KLVJpY2hhcmQgQmFjaA== </file>
</personality>
</server>
For convenience, resources contain links to themselves. This allows a client to easily obtain
resource URIs rather than to construct them. The following kinds of link relations are associated with resources:
• self. Contains a versioned link to the resource. Use these links when the link will be followed immediately.
• bookmark. Provides a permanent link to a resource that is appropriate for long-term
storage.
16
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
• alternate. Contains an alternate representation of the resource. For example, a Cloud
Servers image might have an alternate representation in the Cloud Servers image service.
In the following examples, the rel attribute shows the type of representation to expect
when following the link.
Example 1.15. Server with Self Links: JSON
{
"server" : {
"id" : "52415800-8b69-11e0-9b19-734fcece0043",
"name" : "my-server",
"links": [
{
"rel" : "self",
"href" : "http://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
52415800-8b69-11e0-9b19-734fcece0043"
},
{
"rel" : "bookmark",
"href" : "http://dfw.servers.api.rackspacecloud.com/010101/servers/
52415800-8b69-11e0-9b19-734fcece0043"
}
]
}
}
Example 1.16. Server with Alternate Link: JSON
{
"image" : {
"id" : "52415800-8b69-11e0-9b19-734f5736d2a2",
"name" : "My Server Backup",
"links": [
{
"rel" : "self",
"href" : "http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"
},
{
"rel" : "bookmark",
"href" : "http://dfw.servers.api.rackspacecloud.com/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"
},
{
"rel" : "alternate",
"type" : "application/vnd.openstack.image",
"href" : "http://glance.api.rackspacecloud.com/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"
}
]
}
}
Example 1.17. Server with Self Links: XML
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
id="52415800-8b69-11e0-9b19-734fcece0043" name="my-server">
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
52415800-8b69-11e0-9b19-734fcece0043"/>
<atom:link rel="bookmark"
href="http://dfw.servers.api.rackspacecloud.com/010101/servers/
52415800-8b69-11e0-9b19-734fcece0043"
/>
</server>
17
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 1.18. Image with Alternate Link: XML
<?xml version="1.0" encoding="UTF-8"?>
<image xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
id="52415800-8b69-11e0-9b19-734f5736d2a2" name="My Server Backup">
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"/>
<atom:link rel="bookmark"
href="http://dfw.servers.api.rackspacecloud.com/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"/>
<atom:link rel="alternate" type="application/vnd.openstack.image"
href="http://glance.api.rackspacecloud.com/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"
/>
</image>
18
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.6. Paginated Collections
To reduce load on the service, list operations return a maximum number of items at a time.
The maximum number of items returned is 1000.
To navigate the collection, you can set the limit and marker parameters in the URI request. For example:
?limit=100&marker=1234
The marker parameter is the ID of the last item in the previous list. Items are sorted by create time in descending order. When a create time is not available, the items are sorted by
ID. A marker with an ID that is not valid returns an itemNotFound (404) fault.
The limit parameter sets the page size. If the client specifies a limit value that is greater
than the supported limit, an overLimit (413) fault might be thrown.
Both parameters are optional.
Note
Paginated collections never return itemNotFound (404) faults when the collection is empty — clients should expect an empty collection.
For convenience, collections contain atom "next" links and can optionally contain "previous"
links. The last page in the collection will not contain a "next" link.
The following examples show pages in a collection of images.
To get the first page, issue a GET request to the following endpoint and set the limit parameter to the page size of a single item:
http://dfw.servers.api.rackspacecloud.com/v2/010101/images?limit=1
Subsequent links honor the initial page size. A client can follow links to traverse a paginated collection.
19
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.6.1. JSON Collection
In JSON, members in a paginated collection are stored in a JSON array named after the collection. A JSON object can also hold members in cases where using an associative array is
more practical. Properties about the collection itself, including links, are contained in an array with the name of the entity an underscore (_) and links. The combination of the objects and arrays that start with the name of the collection and an underscore represent the
collection in JSON.
This approach allows for extensibility of paginated collections by allowing them to be associated with arbitrary properties. It also allows collections to be embedded in other objects.
Example 1.19. Images Collection – First Page: JSON
{
"images": [
{
"id": "52415800-8b69-11e0-9b19-734f6f006e54",
"name": "CentOS 5.2",
"links": [
{
"rel": "self",
"href": "http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f6f006e54"
}
]
}
],
"images_links" : [
{
"rel": "next",
"href": "http://dfw.servers.api.rackspacecloud.com/v2/010101/images?limit=1&marker=
52415800-8b69-11e0-9b19-734f6f006e54"
}
]
}
Example 1.20. Images Collection – Second Page: JSON
{
"images" :
{
[
"id" : "52415800-8b69-11e0-9b19-734f5736d2a2",
"name" : "My Server Backup",
"links": [
{
"rel" : "self",
"href" : "http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"
}
]
}
],
"images_links": [
{
"rel" : "next",
"href" : "http://dfw.servers.api.rackspacecloud.com/v2/010101/images?limit=1&
marker=52415800-8b69-11e0-9b19-734f5736d2a2"
}
]
}
Example 1.21. Images Collection – Last Page: JSON
{
"images": [
20
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
{
"id": "52415800-8b69-11e0-9b19-734f6ff7c475",
"name": "Backup 2",
"links": [
{
"rel": "self",
"href": "http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f6ff7c475"
}
]
}
]
}
1.6.2. XML Collection
Example 1.22. Images Collection – First Page: XML
<?xml version="1.0" encoding="UTF-8"?>
<images xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom">
<image id="52415800-8b69-11e0-9b19-734f6f006e54" name="CentOS 5.2">
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f6f006e54"
/>
</image>
<atom:link rel="next"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/images?limit=1&amp;marker=
52415800-8b69-11e0-9b19-734f6f006e54"
/>
</images>
Example 1.23. Images Collection – Second Page: XML
<?xml version="1.0" encoding="UTF-8"?>
<images xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom">
<image id="52415800-8b69-11e0-9b19-734f5736d2a2"
name="My Server Backup">
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"
/>
</image>
<atom:link rel="next"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/images?limit=1&amp;marker=
52415800-8b69-11e0-9b19-734f5736d2a2"
/>
</images>
Example 1.24. Images Collection – Last Page: XML
<?xml version="1.0" encoding="UTF-8"?>
<images xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom">
<image id="52415800-8b69-11e0-9b19-734f6ff7c475" name="Backup 2">
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f6ff7c475"
/>
</image>
</images>
21
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.7. Efficient Polling with the Changes-Since Parameter
You can poll for the status of certain operations by issuing a GET request on various elements. Rather than re-downloading and re-parsing the full status at each polling interval,
you can use the changes-since parameter to check for changes since a previous request.
The changes-since time is specified as an ISO 8601 dateTime (2011-01-24T17:08Z).
Note
The operations that use the changes-since filter are:
• GET /servers
• GET /servers/detail
• GET /images
• GET /images/detail
The format for the timestamp is:
CCYY-MM-DDThh:mm:ss
Optionally, to return the time zone as an offset from UTC, append the following:
±hh:mm
If you omit the time zone (2011-01-24T17:08), the UTC time zone is assumed.
If data has changed, only the items changed since the specified time are returned in the response.
If date has not changed since the changes-since time, an empty list is returned.
For example, issue a GET request against the following endpoint to list all servers that have
changed since Mon, 24 Jan 2011 17:08:00 UTC:
https://dfw.servers.api.rackspacecloud.com/v2/010101/servers?changes-since=
2011-01-24T17:08:00Z
To enable you to keep track of changes, the changes-since filter also displays images
and servers that have been deleted provided that the changes-since filter specifies a
date in the last 30 days. Items deleted more than 30 days ago might be returned, but it is
not guaranteed.
22
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.8. Quotas
A quota defines the total amount of a resource that an entity can have at any point in
time. Quotas are implemented on a per tenant (customer) basis.
Table 1.3. Default Quotas
Total RAM
Total RAM
Total Cloud Server Instances
default
128 GB
100 instances
1.9. Limits
Accounts are configured with thresholds, or limits, that manage capacity and prevent abuse
of the system.
The system recognizes the following types of limits:
• rate limits. Control the frequency at which the user can issue specific API requests. See
Section 1.9.1, “Rate Limits” [23].
• absolute limits. Control the total number of specific objects that the user can possess simultaneously. See Section 1.9.2, “Absolute Limits” [25].
To query the limits programmatically, see Section 1.9.3, “Get Limits” [26].
1.9.1. Rate Limits
Rate limits control the frequency at which the user can issue specific API requests.
Rate limits are reset after a certain amount of time passes. To request a rate limit increase,
contact Rackspace.
Rate limits are specified in terms of both a human-readable wild-card URI and a machine-processable regular expression. The human-readable limit is intended for displaying in
graphical user interfaces. The machine-processable form is intended to be used directly by
client applications.
The regular expression boundary matcher ^ for the rate limit takes effect after the root URI
path. For example, the regular expression ^/servers would match the bolded portion of
the following URI:
https://dfw.servers.api.rackspacecloud.com/v2/010101/servers
The following table lists the default rate limits:
Table 1.4. Default Rate Limits
Verb
URI
GET
*
Value
GET
/servers/{id}/os-virtual-interfacesv2
Unit
1000 minute
23
25 minute
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Verb
URI
POST
*
Value
POST
/os-networksv2
POST
/servers
POST
/servers/{id}/os-virtual-interfacesv2
API v2
Unit
100 minute
100 day
1000 day
4 minute
You can also query the limits programmatically. See Section 1.9.3, “Get Limits” [26].
When a request exceeds the limits established for your account, a 413 HTTP response is
returned with a Retry-After header that indicates when you can attempt the request
again.
24
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.9.2. Absolute Limits
Absolute limits control the total number of specific objects that the user can possess simultaneously.
Specify absolute limits to limit the overall number of items or amount of capacity in the
system. Absolute limits also include the amount of resources currently consumed, which allow for programmatic visibility of usage.
Specify absolute limits as name/value pairs.
The following tables describe absolute limits.
The following max limits show the maximum amount of a resource that can be used:
Table 1.5. Absolute Max Limits
Name
Value
Description
maxImageMeta
40 The maximum number of metadata
key value pairs associated with a particular image.
maxPersonality
5 The maximum number of file path/
content pairs that can be supplied on
server build and rebuild.
maxPersonalitySize
1000 The maximum size, in bytes, for each
personality file.
maxServerMeta 40 The maximum number of metadata
key value pairs associated with a particular server.
maxTotalCores
-1 This limit is disabled. No limits exist on
the total number of cores.
maxTotalInstances
100 The maximum number of Cloud
Servers at any one time.
0 Cloud Networks is disabled.
10 Cloud Networks is enabled.
maxTotalPrivateNetworks
The maximum number of isolated networks that you can create.
maxTotalRAMSize
131072 The maximum total amount of RAM
(MB) of all Cloud Servers at any one
time.
The following total limits show current usage:
Table 1.6. Absolute Total Limits
Name
Value
totalCoresUsed
The total number of cores used.
totalInstancesUsed The total number of Cloud Servers.
totalRAMUsed
The total amount of RAM (GB) used for all Cloud Servers. 25
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.9.3. Get Limits
Verb
URI
Description
GET
/limits
Gets the current rate and absolute limits for your account.
Normal Response Codes: 200, 203
Error Response Codes: computeFault (400, 500, …), serviceUnavailable (503), unauthorized
(401), forbidden (403), badRequest (400), Method Not Allowed (405), overLimit (413)
Applications can programmatically determine current account limits by using this API operation.
This operation does not require a request body.
This operation returns a response body.
Example 1.25. Get Limits: JSON Response
{
"limits": {
"absolute": {
"maxImageMeta": 20,
"maxPersonality": 6,
"maxPersonalitySize": 10240,
"maxServerMeta": 20,
"maxTotalCores": -1,
"maxTotalFloatingIps": 5,
"maxTotalInstances": 100,
"maxTotalKeypairs": 100,
"maxTotalPrivateNetworks": 0,
"maxTotalRAMSize": 66560,
"maxTotalVolumeGigabytes": -1,
"maxTotalVolumes": 0,
"totalCoresUsed": 9,
"totalInstancesUsed": 3,
"totalKeyPairsUsed": 0,
"totalPrivateNetworksUsed": 0,
"totalRAMUsed": 16896,
"totalSecurityGroupsUsed": 0,
"totalVolumeGigabytesUsed": 0,
"totalVolumesUsed": 0
},
"rate": [
{
"limit": [
{
"next-available": "2012-09-10T20:11:45.146Z",
"remaining": 0,
"unit": "DAY",
"value": 0,
"verb": "POST"
},
{
"next-available": "2012-09-10T20:11:45.146Z",
"remaining": 0,
"unit": "MINUTE",
"value": 0,
"verb": "GET"
}
],
"regex": "/v[^/]/(\\d+)/(rax-networks)/?.*",
"uri": "/rax-networks"
},
{
"limit": [
{
"next-available": "2012-09-10T20:11:45.146Z",
"remaining": 1000,
"unit": "DAY",
26
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
"value": 1000,
"verb": "POST"
}
],
"regex": "/v[^/]/(\\d+)/(servers)/?.*",
"uri": "/servers"
},
{
"limit": [
{
"next-available": "2012-09-10T20:11:45.146Z",
"remaining": 100,
"unit": "MINUTE",
"value": 100,
"verb": "ALL"
}
],
"regex": "/v[^/]/(\\d+)/?.*",
"uri": "*"
}
]
}
}
27
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 1.26. Get Limits: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<limits xmlns:lim="http://docs.openstack.org/common/api/v1.0"
xmlns="http://docs.openstack.org/common/api/v1.0">
<rates>
<rate regex="/v[^/]/(\d+)/(rax-networks)/?.*"
uri="/rax-networks">
<limit next-available="2012-09-10T20:14:17.997Z"
unit="DAY" remaining="0" value="0" verb="POST"/>
<limit next-available="2012-09-10T20:14:17.997Z"
unit="MINUTE" remaining="0" value="0" verb="GET"/>
</rate>
<rate regex="/v[^/]/(\d+)/(servers)/?.*" uri="/servers">
<limit next-available="2012-09-10T20:14:17.997Z"
unit="DAY" remaining="1000" value="1000" verb="POST"/>
</rate>
<rate regex="/v[^/]/(\d+)/?.*" uri="*">
<limit next-available="2012-09-10T20:14:17.997Z"
unit="MINUTE" remaining="100" value="100" verb="ALL"/>
</rate>
</rates>
<absolute
xmlns:os-used-limits="http://docs.openstack.org/compute/ext/used_limits/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom">
<limit name="maxServerMeta" value="20"/>
<limit name="maxTotalInstances" value="100"/>
<limit name="maxPersonality" value="6"/>
<limit name="totalPrivateNetworksUsed" value="0"/>
<limit name="maxImageMeta" value="20"/>
<limit name="maxPersonalitySize" value="10240"/>
<limit name="totalVolumesUsed" value="0"/>
<limit name="maxTotalPrivateNetworks" value="0"/>
<limit name="maxTotalKeypairs" value="100"/>
<limit name="totalCoresUsed" value="9"/>
<limit name="maxTotalVolumes" value="0"/>
<limit name="totalRAMUsed" value="16896"/>
<limit name="totalInstancesUsed" value="3"/>
<limit name="totalVolumeGigabytesUsed" value="0"/>
<limit name="maxTotalCores" value="-1"/>
<limit name="totalSecurityGroupsUsed" value="0"/>
<limit name="maxTotalFloatingIps" value="5"/>
<limit name="totalKeyPairsUsed" value="0"/>
<limit name="maxTotalVolumeGigabytes" value="-1"/>
<limit name="maxTotalRAMSize" value="66560"/>
</absolute>
</limits>
28
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.10. Extensions
The OpenStack Compute API is extensible and Rackspace has implemented several extensions. You can list available extensions and get details for a specific extension.
1.10.1. List Extensions
Verb
URI
Description
GET
/extensions
Lists available extensions.
Normal Response Codes: 200, 203
Error Response Codes: computeFault (400, 500, …), serviceUnavailable (503), unauthorized
(401), forbidden (403), badRequest (400), Method Not Allowed (405), overLimit (413)
Applications can programmatically determine which extensions are available by issuing a
GET on the /extensions URI.
This operation does not require a request body.
This operation returns a response body. In the response body, each extension is identified
by two unique identifiers, a namespace and an alias. Additionally an extension contains
documentation links in various formats.
Example 1.27. Get Extensions: cURL with JSON Request
curl -s https://dfw.servers.api.rackspacecloud.com/v2/$account/extensions \
-H "X-Auth-Token: $token" | python -m json.tool
Example 1.28. Get Extensions: JSON Response
{
"extensions": [
{
"alias": "OS-DCF",
"description": "Disk Management Extension",
"links": [],
"name": "DiskConfig",
"namespace": "http://docs.openstack.org/compute/ext/disk_config/api/v1.1",
"updated": "2011-09-27T00:00:00+00:00"
},
{
"alias": "os-volumes",
"description": "Volumes support",
"links": [],
"name": "Volumes",
"namespace": "http://docs.openstack.org/compute/ext/volumes/api/v1.1",
"updated": "2011-03-25T00:00:00+00:00"
},
{
"alias": "os-consoles",
"description": "Interactive Console support.",
"links": [],
"name": "Consoles",
"namespace": "http://docs.openstack.org/compute/ext/os-consoles/api/v2",
"updated": "2011-12-23T00:00:00+00:00"
},
{
"alias": "rax-networks",
"description": "Admin-only Network Management Extension",
"links": [],
29
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"name": "RAXNetworks",
"namespace": "http://docs.openstack.org/ext/services/api/v1.1",
"updated": "2012-03-07T09:46:43-05:00"
},
{
"alias": "os-rescue",
"description": "Instance rescue mode",
"links": [],
"name": "Rescue",
"namespace": "http://docs.openstack.org/compute/ext/rescue/api/v1.1",
"updated": "2011-08-18T00:00:00+00:00"
},
{
"alias": "os-used-limits",
"description": "Provide data on limited resources that are being used.",
"links": [],
"name": "Used Limits",
"namespace": "http://docs.openstack.org/compute/ext/used_limits/api/v1.1",
"updated": "2012-07-13T00:00:00+00:00"
},
{
"alias": "rax-si-image-schedule",
"description": "Enables automatic scheduled images to be taken of a server.",
"links": [],
"name": "ScheduledImages",
"namespace": "http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0",
"updated": "2013-03-20T00:00:00+00:00"
}
]
}
30
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 1.29. Get Extensions: cURL with XML Request
curl -i https://dfw.servers.api.rackspacecloud.com/v2/$account/extensions.xml \
-H "X-Auth-Token: $token"
Example 1.30. Get Extensions: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<extensions xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/common/api/v1.0">
<extension alias="OS-DCF" updated="2011-09-27T00:00:00+00:00"
namespace="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
name="DiskConfig">
<description>Disk Management Extension</description>
</extension>
<extension alias="os-volumes" updated="2011-03-25T00:00:00+00:00"
namespace="http://docs.openstack.org/compute/ext/volumes/api/v1.1"
name="Volumes">
<description>Volumes support</description>
</extension>
<extension alias="os-consoles" updated="2011-12-23T00:00:00+00:00"
namespace="http://docs.openstack.org/compute/ext/os-consoles/api/v2"
name="Consoles">
<description>Interactive Console support.</description>
</extension>
<extension alias="rax-networks"
updated="2012-03-07T09:46:43-05:00"
namespace="http://docs.openstack.org/ext/services/api/v1.1"
name="RAXNetworks">
<description>Admin-only Network Management Extension</description>
</extension>
<extension alias="os-rescue" updated="2011-08-18T00:00:00+00:00"
namespace="http://docs.openstack.org/compute/ext/rescue/api/v1.1"
name="Rescue">
<description>Instance rescue mode</description>
</extension>
<extension alias="os-used-limits"
updated="2012-07-13T00:00:00+00:00"
namespace="http://docs.openstack.org/compute/ext/used_limits/api/v1.1"
name="Used Limits">
<description>Provide data on limited resources that are being used.</description>
</extension>
<extension
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/common/api/v1.0"
alias="rax-si-image-schedule"
updated="2013-03-20T00:00:00+00:00"
namespace="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0"
name="ScheduledImages">
<description>Enables automatic scheduled images to be taken of a server.</description>
</extension>
</extensions>
31
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.10.2. Get Extension Details
You can also query extensions by their unique alias to determine if an extension is available.
An unavailable extension issues an itemNotFound (404) response.
Verb
URI
Description
GET
/extensions/alias
Gets details about a specific extension.
Normal Response Codes: 200, 203
Error Response Codes: computeFault (400, 500, …), serviceUnavailable (503), unauthorized
(401), forbidden (403), badRequest (400), Method Not Allowed (405), overLimit (413),
itemNotFound (404)
This operation does not require a request body.
This operation returns a response body.
The following examples show how to query the OS-DCF extension:
Example 1.31. Get Extension: cURL with JSON Request
curl -s https://dfw.servers.api.rackspacecloud.com/v2/$account/extensions/OS-DCF \
-H "X-Auth-Token: $token" | python -m json.tool
Example 1.32. Get Extension: JSON Response
{
"extension": {
"alias": "OS-DCF",
"description": "Disk Management Extension",
"links": [],
"name": "DiskConfig",
"namespace": "http://docs.openstack.org/compute/ext/disk_config/api/v1.1",
"updated": "2011-09-27T00:00:00+00:00"
}
}
Example 1.33. Get Extension: cURL with XML Request
curl -i https://dfw.servers.api.rackspacecloud.com/v2/$account/extensions/OS-DCF.xml \
-H "X-Auth-Token: $token"
Example 1.34. Get Extension: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<extension xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/common/api/v1.0" alias="OS-DCF"
updated="2011-09-27T00:00:00+00:00"
namespace="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
name="DiskConfig">
<description>Disk Management Extension</description>
</extension>
1.10.3. Extended Responses and Actions
Use extensions to define new data types, parameters, actions, headers, states, and resources.
32
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
In XML, you can define additional elements and attributes. Define these elements in the
namespace for the extension.
In JSON, you must use the alias. The volumes element in the Examples 1.35 [33] and
1.36 [34] is defined in the RS-CBS namespace.
Actions work in exactly the same manner as illustrated in Examples 1.37 [35] and
1.38 [35]. Extended headers are always prefixed with X- followed by the alias and a
dash: (X-RS-CBS-HEADER1). You must prefix states and parameters with the extension
alias followed by a colon. For example, an image can be in the RS-PIE:PrepareShare
state.
Important
Applications should be prepared to ignore response data that contains extension elements. An extended state should always be treated as an UNKNOWN
state if the application does not support the extension. Applications should also
verify that an extension is available before submitting an extended request.
Example 1.35. Extended Server: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<servers xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom">
<server id="52415800-8b69-11e0-9b19-734f6af67565" tenant_id="010101"
user_id="5678" name="sample-server" status="BUILD"
progress="60" hostId="e4d909c290d0fb1ca068ffaddf22cbd0"
updated="2010-10-10T12:00:00Z" created="2010-08-10T12:00:00Z"
accessIPv4="67.23.10.132" accessIPv6="::babe:67.23.10.132">
<image id="52415800-8b69-11e0-9b19-734f6f006e54">
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f6f006e54"/>
<atom:link rel="bookmark"
href="http://dfw.servers.api.rackspacecloud.com/010101/images/
52415800-8b69-11e0-9b19-734f6f006e54"
/>
</image>
<flavor id="52415800-8b69-11e0-9b19-734f216543fd">
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/flavors/
52415800-8b69-11e0-9b19-734f216543fd"/>
<atom:link rel="bookmark"
href="http://dfw.servers.api.rackspacecloud.com/010101/flavors/
52415800-8b69-11e0-9b19-734f216543fd"
/>
</flavor>
<metadata>
<meta key="Server Label">Web Head 1</meta>
<meta key="Image Version">2.1</meta>
</metadata>
<addresses>
<network id="public">
<ip version="4" addr="67.23.10.132"/>
<ip version="6" addr="::babe:67.23.10.132"/>
<ip version="4" addr="67.23.10.131"/>
<ip version="6" addr="::babe:4317:0A83"/>
</network>
<network id="private">
<ip version="4" addr="10.176.42.16"/>
<ip version="6" addr="::babe:10.176.42.16"/>
</network>
</addresses>
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
52415800-8b69-11e0-9b19-734f6af67565"/>
33
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<atom:link rel="bookmark"
href="http://dfw.servers.api.rackspacecloud.com/010101/servers/
52415800-8b69-11e0-9b19-734f6af67565"/>
<volumes
xmlns="http://docs.rackspacecloud.com/servers/api/ext/cbs/v1.1">
<volume name="OS"
href="https://cbs.api.rackspacecloud.com/12934/volumes/19"/>
<volume name="Work"
href="https://cbs.api.rackspacecloud.com/12934/volumes/23"
/>
</volumes>
</server>
</servers>
Example 1.36. Extended Server: JSON Response
{
"servers": [
{
"id": "52415800-8b69-11e0-9b19-734f6af67565",
"tenant_id": "010101",
"user_id": "MyRackspaceAcct",
"name": "sample-server",
"updated": "2010-10-10T12:00:00Z",
"created": "2010-08-10T12:00:00Z",
"hostId": "e4d909c290d0fb1ca068ffaddf22cbd0",
"status": "BUILD",
"progress": 60,
"accessIPv4" : "67.23.10.132",
"accessIPv6" : "::babe:67.23.10.132",
"image" : {
"id": "52415800-8b69-11e0-9b19-734f6f006e54",
"links": [
{
"rel": "self",
"href": "http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f6f006e54"
},
{
"rel": "bookmark",
"href": "http://dfw.servers.api.rackspacecloud.com/010101/images/
52415800-8b69-11e0-9b19-734f6f006e54"
}
]
},
"flavor" : {
"id": "52415800-8b69-11e0-9b19-734f216543fd",
"links": [
{
"rel": "self",
"href": "http://dfw.servers.api.rackspacecloud.com/v2/010101/flavors/
52415800-8b69-11e0-9b19-734f216543fd"
},
{
"rel": "bookmark",
"href": "http://dfw.servers.api.rackspacecloud.com/010101/flavors/
52415800-8b69-11e0-9b19-734f216543fd"
}
]
},
"addresses": {
"public" : [
{
"version": 4,
"addr": "67.23.10.132"
},
{
"version": 6,
"addr": "::babe:67.23.10.132"
},
{
"version": 4,
"addr": "67.23.10.131"
34
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
},
{
"version": 6,
"addr": "::babe:4317:0A83"
}
],
"private" : [
{
"version": 4,
"addr": "10.176.42.16"
},
{
"version": 6,
"addr": "::babe:10.176.42.16"
}
]
},
"metadata": {
"Server Label": "Web Head 1",
"Image Version": "2.1"
},
"links": [
{
"rel": "self",
"href": "http://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
52415800-8b69-11e0-9b19-734f6af67565"
},
{
"rel": "bookmark",
"href": "http://dfw.servers.api.rackspacecloud.com/010101/servers/
52415800-8b69-11e0-9b19-734f6af67565"
}
],
"RS-CBS:volumes": [
{
"name": "OS",
"href": "https://cbs.api.rackspacecloud.com/12934/volumes/19"
},
{
"name": "Work",
"href": "https://cbs.api.rackspacecloud.com/12934/volumes/23"
}
]
}
]
}
Example 1.37. Extended Action: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<attach-volume
xmlns="http://docs.rackspacecloud.com/servers/api/ext/cbs/v1.0"
href="https://cbs.api.rackspacecloud.com/12934/volumes/19"/>
Example 1.38. Extended Action: JSON Request
{
"RS-CBS:attach-volume": {
"href" : "https://cbs.api.rackspacecloud.com/12934/volumes/19"
}
}
35
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.11. Faults
The API v2 handles the following types of faults:
• Synchronous faults occur at request time.
• Asynchronous faults occur in the background while a server or image is being built or a
server is executing an action. When an asynchronous fault occurs, the system places the
server or image in an ERROR state and embeds the fault in the offending server or image.
When a synchronous or asynchronous fault occurs, the fault contains an HTTP status code,
a human readable message, and optional details about the error. Additionally, an asynchronous fault might also contain a time stamp that indicates when the fault occurred.
1.11.1. Synchronous Faults
Synchronous faults occur at request time. When a synchronous fault occurs, the fault contains an HTTP error response code, a human readable message, and optional details about
the error.
Example 1.39. Fault: JSON Response
{
"computeFault" : {
"code" : 500,
"message" : "Fault!",
"details" : "Error Details..."
}
}
Example 1.40. Fault: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<computeFault
xmlns="http://docs.openstack.org/compute/api/v1.1"
code="500">
<message>Fault!</message>
<details>Error Details...</details>
</computeFault>
The error response code is returned in the body of the response for convenience. The message section returns a human-readable message that is appropriate for display to the end
user. The details section is optional and may contain information—for example, a stack
trace—to assist in tracking down an error. The detail section may or may not be appropriate
for display to an end user.
The root element of the fault, such as computeFault, may change depending on the type of
error. The following table lists possible elements with the associated error response codes:
36
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Table 1.7. Fault Elements and Error Response Codes
Fault Element
Associated Error Response Code
computeFault
500, 400, other codes possible
Expected in All Requests?
Client errors
badRequest
400
unauthorized
401
forbidden
403
resizeNotAllowed
403
itemNotFound
404
Method Not Allowed
405
buildInProgress
409
backupOrResizeInProgress
409
overLimit
413
badMediaType
415
Server errors
notImplemented
501
serviceUnavailable
503
serverCapacityUnavailable
503
Example 1.41. Fault, Item Not Found: JSON Response
{
"itemNotFound" : {
"code" : 404,
"message" : "Not Found",
"details" : "Error Details..."
}
}
Example 1.42. Fault, Item Not Found: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<itemNotFound
xmlns="http://docs.openstack.org/compute/api/v1.1"
code="404">
<message>Not Found</message>
<details>Error Details...</details>
</itemNotFound>
From an XML schema perspective, all API faults are extensions of the base fault type ComputeAPIFault. When working with a system that binds XML to actual classes (such as JAXB),
one should be capable of using ComputeAPIFault as a “catch-all” if there's no interest in distinguishing between individual fault types.
The OverLimit fault is generated when a rate limit threshold is exceeded. For convenience,
the fault adds a retryAt attribute that contains the content of the Retry-After header in
XML Schema 1.0 date/time format.
37
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 1.43. Fault, Over Limit: JSON Response
{
"overLimit" : {
"code" : 413,
"message" : "OverLimit Retry...",
"details" : "Error Details...",
"retryAt" : "2010-08-01T00:00:00Z"
}
}
Example 1.44. Fault, Over Limit: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<overLimit xmlns="http://docs.openstack.org/compute/api/v1.1"
code="413" retryAt="2010-08-01T00:00:00Z">
<message>OverLimit Retry...</message>
<details>Error Details...</details>
</overLimit>
1.11.2. Asynchronous Faults
Asynchronous faults occur in the background while a server or image is being built or a
server is executing an action. When an asynchronous fault occurs, the system places the
server or image in an ERROR state and embeds the fault in the offending server or image.
When an asynchronous fault occurs, the fault contains an HTTP error response code, a human readable message, and optional details about the error. An asynchronous fault might
also contain a time stamp that indicates when the fault occurred.
38
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 1.45. Server in Error State: XML
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
id="52415800-8b69-11e0-9b19-734f0000ffff"
tenant_id="1234" user_id="5678"
name="sample-server" status="ERROR"
created="2010-08-10T12:00:00Z"
progress="66" hostId="e4d909c290d0fb1ca068ffafff22cbd0">
<image id="52415800-8b69-11e0-9b19-734f6f007777" />
<flavor id="52415800-8b69-11e0-9b19-734f216543fd" />
<fault code="404" created="2010-08-10T11:59:59Z">
<message>Could not find image 52415800-8b69-11e0-9b19-734f6f007777</message>
<details>Fault details</details>
</fault>
<atom:link
rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
52415800-8b69-11e0-9b19-734f000004d2"/>
<atom:link
rel="bookmark"
href="http://dfw.servers.api.rackspacecloud.com/010101/servers/
52415800-8b69-11e0-9b19-734f000004d2"/>
</server>
39
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 1.46. Server in Error State: JSON
{
"server": {
"id": "52415800-8b69-11e0-9b19-734f0000ffff",
"tenant_id": "1234",
"user_id": "5678",
"name": "sample-server",
"created": "2010-08-10T12:00:00Z",
"hostId": "e4d909c290d0fb1ca068ffafff22cbd0",
"status": "ERROR",
"progress": 66,
"image" : {
"id": "52415800-8b69-11e0-9b19-734f6f007777"
},
"flavor" : {
"id": "52415800-8b69-11e0-9b19-734f216543fd"
},
"fault" : {
"code" : 404,
"created": "2010-08-10T11:59:59Z",
"message" : "Could not find image 52415800-8b69-11e0-9b19-734f6f007777",
"details" : "Fault details"
},
"links": [
{
"rel": "self",
"href": "http://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
52415800-8b69-11e0-9b19-734f000004d2"
},
{
"rel": "bookmark",
"href": "http://dfw.servers.api.rackspacecloud.com/010101/servers/
52415800-8b69-11e0-9b19-734f000004d2"
}
]
}
}
40
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 1.47. Image in Error State: XML
<?xml version="1.0" encoding="UTF-8"?>
<image xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
id="52415800-8b69-11e0-9b19-734f5736d2a2" name="My Server Backup"
created="2010-08-10T12:00:00Z" status="ERROR" progress="89">
<server id="52415800-8b69-11e0-9b19-734f335aa7b3"/>
<fault code="500">
<message>An internal error occurred</message>
<details>Error details</details>
</fault>
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"/>
<atom:link rel="bookmark"
href="http://dfw.servers.api.rackspacecloud.com/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"
/>
</image>
41
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 1.48. Image in Error State: JSON
{
"image" : {
"id" : "52415800-8b69-11e0-9b19-734f5736d2a2",
"name" : "My Server Backup",
"created" : "2010-08-10T12:00:00Z",
"status" : "SAVING",
"progress" : 89,
"server" : {
"id": "52415800-8b69-11e0-9b19-734f335aa7b3"
},
"fault" : {
"code" : 500,
"message" : "An internal error occured",
"details" : "Error details"
},
"links": [
{
"rel" : "self",
"href" : "http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"
},
{
"rel" : "bookmark",
"href" : "http://dfw.servers.api.rackspacecloud.com/010101/images/
52415800-8b69-11e0-9b19-734f5736d2a2"
}
]
}
}
42
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
1.12. Role Based Access Control
Role Based Access Control (RBAC) restricts access to the capabilities of Rackspace Cloud
services, including the next gen Cloud Servers API, to authorized users only. RBAC enables Rackspace Cloud customers to specify which account users of their Cloud account
have access to which next gen Cloud Servers API service capabilities, based on roles defined by Rackspace (see Table 1.8, “ next gen Cloud Servers Product Roles and Permissions” [43]). The permissions to perform certain operations in next gen Cloud Servers
API – create, read, update, delete – are assigned to specific roles. The account owner user
assigns these roles, either global (multiproduct) or product-specific (for example, next gen
Cloud Servers), to account users.
1.12.1. Assigning Roles to Account Users
The account owner (identity:user-admin) can create account users on the account and then
assign roles to those users. The roles grant the account users specific permissions for accessing the capabilities of the next gen Cloud Servers service. Each account has only one account owner, and that role is assigned by default to any Rackspace Cloud account when
the account is created.
See the Cloud Identity Client Developer Guide for information about how to perform the
following tasks:
• Create account users
• Assign roles to account users
• Delete roles from account users
Note
The account owner (identity:user-admin) role cannot hold any additional roles
because it already has full access to all capabilities.
1.12.2. Roles Available for next gen Cloud Servers
Three roles (observer, creator, and admin) can be used to access the next gen Cloud Servers
API specifically. The following table describes these roles and their permissions.
Table 1.8. next gen Cloud Servers Product Roles and Permissions
Role Name
Role Permissions
nova:admin
This role provides Create, Read, Update, and Delete permissions in next gen
Cloud Servers, where access is granted.
nova:creator
This role provides Create, Read, and Update permissions in next gen Cloud
Servers, where access is granted.
nova:observer
This role provides Read permission in next gen Cloud Servers, where access is
granted.
Additionally, two multiproduct roles apply to all products. Users with multiproduct roles inherit access to future products when those products become RBAC-enabled. The following
table describes these roles and their permissions.
43
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Table 1.9. Multiproduct (Global) Roles and Permissions
Role Name
Role Permissions
admin
This role provides Create, Read, Update, and Delete permissions in all products, where access is granted.
observer
This role provides Read permission in all products, where access is granted.
1.12.3. Resolving Conflicts Between RBAC Multiproduct vs.
Custom (Product-specific) Roles
The account owner can set roles for both multiproduct and next gen Cloud Servers scope,
and it is important to understand how any potential conflicts among these roles are resolved. When two roles appear to conflict, the role that provides the more extensive permissions takes precedence. Therefore, admin roles take precedence over observer and creator roles, because admin roles provide more permissions.
The following table shows two examples of how potential conflicts between user roles in
the Control Panel are resolved:
Permission Configuration
View of Permission
in the Control Panel
Can the User Perform Product Admin Functions in the Control Panel?
User is assigned the following roles:
multiproduct observer and next gen
Cloud Servers admin
Appears that the user has only the
multiproduct observer role
Yes, for next gen Cloud Servers only.
The user has the observer role for the
rest of the products.
User is assigned the following roles:
multiproduct admin and next gen
Cloud Servers observer
Appears that the user has only the
multiproduct admin role
Yes, for all of the products. The next
gen Cloud Servers observer role is ignored.
1.12.4. RBAC Permissions Cross-reference to next gen Cloud
Servers API Operations
API operations for next gen Cloud Servers may or may not be available to all roles. To see
which operations are permitted to invoke which calls, please review the Knowledge Center
article.
1.13. Flavors
The term flavor refers to a server's combination of RAM size, vCPUs, network throughput
(RXTX factor), and disk space. You build a Linux or Windows server by choosing its flavor. You also use flavors to choose between cloud servers, which are multi-tenant virtual
servers, and OnMetal servers, which are single-tenant physical servers.
1.13.1. Virtual Cloud Server Flavors
Virtual Cloud Server Flavors are divided into the following classes:
Standard
These flavors, which are being phased out and should not be
used for new servers, have the following characteristics:
• Sizes range from 512 MB to 30 GB.
44
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
• These flavors are recommended for general-purpose workloads.
• They use a single disk for system and data information storage.
• All storage is located on RAID 10-protected SATA hard disk
drives.
General Purpose v1
These flavors, formerly Performance 1, have the following characteristics:
• Sizes range from 1 GB to 8 GB.
• Linux servers can be any size. Windows servers must be 2 GB
or larger.
• These flavors are useful for many use cases, from general-purpose workloads to high performance websites.
• They use a single disk for system and data information storage.
• vCPUs are oversubscribed and “burstable”, which means that
there are more vCPUs allocated to the Cloud Servers on a
physical host than there are physical CPU threads. This oversubscription model assumes that under normal conditions not
all vCPUs will be needed by all Cloud Servers at the same time,
and allows your Cloud Server to take advantage of those additional resources during such times of under-utilization.
• All storage is located on RAID 10-protected SSD hard disk
drives.
I/O v1
These flavors, formerly Performance 2, have the following characteristics:
• Sizes range from 15 GB to 120 GB.
• These flavors are ideal for high performance applications and
databases that benefit from fast disk I/O, such as Cassandra
and MongoDB.
• They have separate system and data disks.
• vCPUs are “reserved”, which means that there are never more
vCPUs allocated to the Cloud Servers on a physical host than
there are physical CPU threads on that host. This model ensures that your Cloud Server will always have full access to all
its vCPUs.
• All storage is located on RAID 10-protected SSD hard disk
drives.
45
Next Generation Cloud Servers™
Dev Guide
Compute v1
February 10, 2015
API v2
These flavors have the following characteristics:
• Sizes range from 3.75 GB to 60 GB.
• These flavors are optimized for web servers, application
servers, and other CPU-intensive workloads.
• They have separate system and data disks.
• vCPUs are “reserved”, which means that there are never more
vCPUs allocated to the Cloud Servers on a physical host than
there are physical CPU threads on that host. This model ensures that your Cloud Server will always have full access to all
its vCPUs.
• All storage is located on RAID 10-protected SSD hard disk
drives.
Memory v1
These flavors have the following characteristics:
• Sizes range from 15 GB to 240 GB.
• These flavors are recommended for memory-intensive workloads.
• They have separate system and data disks.
• vCPUs are “reserved”, which means that there are never more
vCPUs allocated to the Cloud Servers on a physical host than
there are physical CPU threads on that host. This model ensures that your Cloud Server will always have full access to all
its vCPUs.
• All storage is located on RAID 10-protected SSD hard disk
drives.
If you require additional storage beyond what is provided by the local disks on a specific flavor, you can extend all the preceding server flavors with Cloud Block Storage.
1.13.2. OnMetal Cloud Server Flavors
OnMetal Cloud Server flavors differ significantly from Virtual Cloud Server flavors. Virtual Cloud Server flavors are used to create virtual servers with a hypervisor to manage multi-tenancy, which means one or more virtual instances are located on the same physical
server. OnMetal Cloud Server flavors are used to rapidly build a server instance on a physical server with no hypervisor and no multi-tenancy.
There are three configurations within the OnMetal flavor class.
• OnMetal Compute - recommended for high CPU activity like network requests, application logic, web servers, load balancers, and so on.
• OnMetal Memory - recommended for high RAM activity like in-memory SQL configurations, caching, searching indexes, and so on.
46
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
• OnMetal I/O - recommended for high I/O activity like NoSQL and SQL databases.
OnMetal server disk space may not be extended with Cloud Block Storage.
1.13.3. Supported Flavors for Cloud Servers
The Rackspace Cloud Servers service currently supports the following flavors for next generation Cloud Servers:
Table 1.10. Supported Flavors for Next Generation Cloud Servers
ID
Flavor name
Memory (MB)
Disk space
Ephemeral
VCPUs
RXTX factor
2
512 MB Standard Instance
512
20
0
1
80.0
3
1 GB Standard
Instance
1024
40
0
1
120.0
4
2 GB Standard
Instance
2048
80
0
2
240.0
5
4 GB Standard
Instance
4096
160
0
2
400.0
6
8 GB Standard
Instance
8192
320
0
4
600.0
7 15 GB Standard
Instance
15360
620
0
6
800.0
8 30 GB Standard
Instance
30720
1200
0
8
1200.0
general1-1
1 GB General
Purpose v1
1024
20
0
1
200.0
general1-2
2 GB General
Purpose v1
2048
40
0
2
400.0
general1-4
4 GB General
Purpose v1
4096
80
0
4
800.0
general1-8
8 GB General
Purpose v1
8192
160
0
8
1600.0
compute1-4
3.75 GB Compute v1
3840
0
0
2
625.0
compute1-8
7.5 GB Compute v1
7680
0
0
4
1250.0
compute1-15 15 GB Compute
v1
15360
0
0
8
2500.0
compute1-30 30 GB Compute
v1
30720
0
0
16
5000.0
compute1-60 60 GB Compute
v1
61440
0
0
32
10000.0
4
1250.0
io1-15
15 GB I/O v1
15360
40
150
io1-30
30 GB I/O v1
30720
40
300
8
2500.0
io1-60
60 GB I/O v1
61440
40
600
16
5000.0
io1-90
90 GB I/O v1
92160
40
900
24
7500.0
io1-120
120 GB I/O v1
122880
40
1200
32
10000.0
memory1-15 15 GB Memory
v1
15360
0
0
2
625.0
memory1-30 30 GB Memory
v1
30720
0
0
4
1250.0
47
Next Generation Cloud Servers™
Dev Guide
ID
February 10, 2015
API v2
Flavor name
Memory (MB)
Disk space
Ephemeral
VCPUs
RXTX factor
memory1-60 60 GB Memory
v1
61440
0
0
8
2500.0
memory1-120
120 GB Memory v1
122880
0
0
16
5000.0
memory1-240
240 GB Memory v1
245760
0
0
32
10000.0
onmetal-compute1
OnMetal Compute v1
32768
32
0
20
10000.0
onmetal-io1 OnMetal I/O v1
131072
32
3200
40
10000.0
onmetal-mem- OnMetal Memory1
ory v1
524288
32
0
24
10000.0
1.14. Service Access Endpoints
The Rackspace Cloud Servers service is a regionalized service. The user of the service is
therefore responsible for selecting the appropriate regional endpoint to ensure access to
servers, networks, or other Cloud services.
Tip
To help you decide which regionalized endpoint to use, read about special
considerations for choosing a data center at http://www.rackspace.com/
knowledge_center/article/about-regions.
If you are working with cloud servers that are in one of the Rackspace data centers, using
the ServiceNet endpoint in the same data center has no network costs and provides a faster
connection. ServiceNet is the data center internet network. In your authentication response
service catalog, it is listed as InternalURL. If you are working with servers that are not in one
of the Rackspace data centers, you must use a public endpoint to connect. In your authentication response, public endpoints are listed as publicURL. If you are working with servers
in multiple data centers or have a mixed environment where you have servers in your data
centers and in Rackspace data centers, use a public endpoint because it is accessible from all
the servers in the different environments.
Note
You should copy the base URLs directly from the catalog rather than trying to
construct them manually.
Rackspace Cloud Identity returns a service catalog, which includes regional endpoints with your account ID. Your account ID, also known as project ID or tenant ID, refers to your Rackspace account number.
Tip
If you do not know your account ID or which data center you are working in, you can find that information in your Cloud Control Panel at
mycloud.rackspace.com.
48
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2. API Operations
2.1. Servers
A server is a virtual machine (VM) instance in the Cloud Servers environment. To create a
server, you must specify a name, flavor reference, and image reference.
Verb
URI
Description
GET
/servers?image=imageId&
flavor=flavorId&
name=serverName&
status=serverStatus&
marker=markerID& limit=int&
changes-since=dateTime& RAXSI:image_schedule=boolean
Lists IDs, names, and links for all
servers.
GET
/servers/detail?image=imageId&
flavor=flavorId&
name=serverName&
status=serverStatus&
marker=markerID& limit=int&
changes-since=dateTime& RAXSI:image_schedule=boolean
Lists all details for all servers.
POST
/servers
Creates a server.
GET
/servers/id
Lists details for a specified server.
PUT
/servers/id
Updates one or more editable attributes for a specified server.
DELETE
/servers/id
Deletes a specified server.
49
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.1.1. List Servers
Verb
URI
Description
GET
/servers?image=imageId&
flavor=flavorId& name=serverName&
status=serverStatus&
marker=markerID& limit=int&
changes-since=dateTime& RAXSI:image_schedule=boolean
Lists IDs, names, and links for all servers.
GET
/servers/detail?image=imageId&
flavor=flavorId& name=serverName&
status=serverStatus&
marker=markerID& limit=int&
changes-since=dateTime& RAXSI:image_schedule=boolean
Lists all details for all servers.
Normal Response Codes: 200, 203, and 300
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), Method Not Allowed (405), overLimit (413), and serviceUnavailable (503)
The difference between the "List Server" and "List Server Details" operations lies in the command itself (whether or not it includes /details) and in the amount of information that is returned.
When you list servers with details, the addresses for any attached networks are displayed.
The network addresses include any isolated networks that you have created and Rackspace
public and private networks. For more information about networks, see Cloud Networks
Developer Guide.
50
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
This operation does not require a request body.
This operation returns a response body that lists the servers associated with your account.
This operation does not show servers with a status of DELETED. To list deleted servers, use
the changes-since parameter. See Section 1.7, “Efficient Polling with the ChangesSince Parameter” [22].
The following examples show a JSON and XML response for the List Server Details operation. For the equivalent List Server operation, use /servers instead of /servers/detail in the
command.
To issue a List Servers Details request that returns a JSON response, you can embed the request in a cURL command, as follows:
Example 2.1. List Servers Details: JSON Request in a cURL Command
In the following example, you must first export your authentication token and account
number to environment variables:
$ export token={authentication_token}
$ export account={account}
$ curl -s https://dfw.servers.api.rackspacecloud.com/v2/$account/servers/
detail \
-H "X-Auth-Token: $token" | python -m json.tool
Where account is your tenant ID and token is your authentication token.
Example 2.2. List Servers Details: JSON Response
{
"servers": [
{
"OS-DCF:diskConfig": "AUTO",
"OS-EXT-STS:power_state": 1,
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"accessIPv4": "50.56.172.247",
"accessIPv6": "2001:4800:780e:0510:d87b:9cbc:ff03:bbbd",
"addresses": {
"private": [
{
"addr": "10.180.1.226",
"version": 4
}
],
"public": [
{
"addr": "50.56.172.247",
"version": 4
},
{
"addr": "2001:4800:780e:0510:d87b:9cbc:ff03:bbbd",
"version": 6
}
]
},
"created": "2012-07-28T15:32:25Z",
"flavor": {
"id": "6",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/flavors/6",
"rel": "bookmark"
}
]
},
"hostId": "fb19e2fe4405c9f819c6f574e4954ec4f1a7e58e94782d171dddeb9a",
"id": "ff671041-b677-4da4-b901-535e689a796d",
"image": {
51
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"id": "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/images/
3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ff671041b677-4da4-b901-535e689a796d",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/servers/ff671041b677-4da4-b901-535e689a796d",
"rel": "bookmark"
}
],
"metadata": {},
"name": "myUbuntuServer",
"progress": 100,
"status": "ACTIVE",
"tenant_id": "010101",
"updated": "2012-07-28T15:37:09Z",
"user_id": "170454"
},
{
"OS-DCF:diskConfig": "AUTO",
"OS-EXT-STS:power_state": 1,
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"accessIPv4": "",
"accessIPv6": "",
"addresses": {
"private": [
{
"addr": "10.180.13.75",
"version": 4
}
],
"public": [
{
"addr": "2001:4800:780e:0510:d87b:9cbc:ff04:3e81",
"version": 6
},
{
"addr": "50.56.186.185",
"version": 4
}
]
},
"created": "2012-05-15T15:47:37Z",
"flavor": {
"id": "6",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/flavors/6",
"rel": "bookmark"
}
]
},
"hostId": "1d65b563fc573c2eb544319e0af598f2b2c5f84f75de252db3757cd3",
"id": "a09e7493-7429-41e1-8d3f-384d7ece09c0",
"image": {
"id": "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/images/
3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"rel": "bookmark"
}
]
},
"links": [
{
52
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"href": "https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
a09e7493-7429-41e1-8d3f-384d7ece09c0",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/servers/
a09e7493-7429-41e1-8d3f-384d7ece09c0",
"rel": "bookmark"
}
],
"metadata": {},
"name": "UbuntuDevStack",
"progress": 100,
"status": "ACTIVE",
"tenant_id": "010101",
"updated": "2012-05-15T15:55:00Z",
"user_id": "170454"
}
]
}
Example 2.3. List Servers Details Where Servers Have Scheduled Images
Enabled: JSON Response
{
"servers": [
{
"OS-DCF:diskConfig": "AUTO",
"OS-EXT-STS:power_state": 1,
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"RAX-SI:image_schedule": {
"retention": 3
},
"accessIPv4": "5.79.23.47",
"accessIPv6": "2a00:1a48:7805:112:dc21:7ec0:ff08:4bb4",
"addresses": {
"private": [
{
"addr": "10.179.3.116",
"version": 4
}
],
"public": [
{
"addr": "5.79.23.47",
"version": 4
},
{
"addr": "2a00:1a48:7805:0112:dc21:7ec0:ff08:4bb4",
"version": 6
}
]
},
"created": "2013-04-04T20:10:30Z",
"flavor": {
"id": "2",
"links": [
{
"href": "https://lon.servers.api.rackspacecloud.com/10099999/flavors/2",
"rel": "bookmark"
}
]
},
"hostId": "8db66bfe16771e6505e87ced4d8f5a23916faf3105c7837eae12daba",
"id": "4aad5702-b54a-4190-9953-966805a61a4a",
"image": {
"id": "c195ef3b-9195-4474-b6f7-16e5bd86acd0",
"links": [
{
"href": "https://lon.servers.api.rackspacecloud.com/10099999/images/
c195ef3b-9195-4474-b6f7-16e5bd86acd0",
"rel": "bookmark"
}
]
},
"links": [
53
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
{
"href": "https://lon.servers.api.rackspacecloud.com/v2/10099999/servers/4aad5702b54a-4190-9953-966805a61a4a",
"rel": "self"
},
{
"href": "https://lon.servers.api.rackspacecloud.com/10099999/servers/4aad5702b54a-4190-9953-966805a61a4a",
"rel": "bookmark"
}
],
"metadata": {},
"name": "linux-server",
"progress": 100,
"status": "ACTIVE",
"tenant_id": "10099999",
"updated": "2013-06-03T17:29:46Z",
"user_id": "12345"
}
]
}
To issue a List Servers Detail request that returns an XML response, you can embed the request in a cURL command, as follows:
Example 2.4. List Servers Detail: XML Request in a cURL Command
$ export token={authentication_token}
$ export account={account}
$ curl -i https://dfw.servers.api.rackspacecloud.com/v2/$account/servers/
detail.xml \
-H "Content-Type: application/xml" \
-H "Accept: application/xml" \
-H "X-Auth-Token: $token"
Where account is your tenant ID and token is your authentication token.
Example 2.5. List Servers Detail: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<servers
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1">
<server status="ACTIVE" updated="2012-07-28T15:37:09Z"
hostId="fb19e2fe4405c9f819c6f574e4954ec4f1a7e58e94782d171dddeb9a"
name="myUbuntuServer" created="2012-07-28T15:32:25Z"
userId="170454" tenantId="010101" accessIPv4="50.56.172.247"
accessIPv6="2001:4800:780e:0510:d87b:9cbc:ff03:bbbd"
progress="100" id="ff671041-b677-4da4-b901-535e689a796d"
OS-EXT-STS:vm_state="active" OS-EXT-STS:task_state="None"
OS-EXT-STS:power_state="1" OS-DCF:diskConfig="AUTO">
<image id="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001">
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/images/3afe97b2-26dc-49c5a2cc-a2fc8d80c001"
rel="bookmark"/>
</image>
<flavor id="6">
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/flavors/6"
rel="bookmark"/>
</flavor>
<metadata/>
<addresses>
<network id="public">
<ip version="4" addr="50.56.172.247"/>
<ip version="6"
addr="2001:4800:780e:0510:d87b:9cbc:ff03:bbbd"/>
</network>
54
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<network id="private">
<ip version="4" addr="10.180.1.226"/>
</network>
</addresses>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ff671041-b677-4da4b901-535e689a796d"
rel="self"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/servers/ff671041-b677-4da4b901-535e689a796d"
rel="bookmark"/>
</server>
<server status="ACTIVE" updated="2012-05-15T15:55:00Z"
hostId="1d65b563fc573c2eb544319e0af598f2b2c5f84f75de252db3757cd3"
name="UbuntuDevStack" created="2012-05-15T15:47:37Z"
userId="170454" tenantId="010101" accessIPv4="" accessIPv6=""
progress="100" id="a09e7493-7429-41e1-8d3f-384d7ece09c0"
OS-EXT-STS:vm_state="active" OS-EXT-STS:task_state="None"
OS-EXT-STS:power_state="1" OS-DCF:diskConfig="AUTO">
<image id="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001">
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/images/3afe97b2-26dc-49c5a2cc-a2fc8d80c001"
rel="bookmark"/>
</image>
<flavor id="6">
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/flavors/6"
rel="bookmark"/>
</flavor>
<metadata/>
<addresses>
<network id="public">
<ip version="6"
addr="2001:4800:780e:0510:d87b:9cbc:ff04:3e81"/>
<ip version="4" addr="50.56.186.185"/>
</network>
<network id="private">
<ip version="4" addr="10.180.13.75"/>
</network>
</addresses>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
a09e7493-7429-41e1-8d3f-384d7ece09c0"
rel="self"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/servers/
a09e7493-7429-41e1-8d3f-384d7ece09c0"
rel="bookmark"/>
</server>
</servers>
Example 2.6. List Servers Detail Where Servers Have Scheduled Images
Enabled: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<servers xmlns:RAX-SI="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0"
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1">
<server status="ACTIVE"
updated="2013-06-03T17:29:46Z"
hostId="8db66bfe16771e6505e87ced4d8f5a23916faf3105c7837eae12daba"
name="linux-server"
created="2013-04-04T20:10:30Z"
userId="12345"
tenantId="10099999"
accessIPv4="5.79.23.47"
accessIPv6="2a00:1a48:7805:112:dc21:7ec0:ff08:4bb4"
progress="100"
id="4aad5702-b54a-4190-9953-966805a61a4a"
OS-EXT-STS:vm_state="active"
OS-EXT-STS:task_state="None"
OS-EXT-STS:power_state="1"
OS-DCF:diskConfig="AUTO">
55
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<image id="c195ef3b-9195-4474-b6f7-16e5bd86acd0">
<atom:link href="https://lon.servers.api.rackspacecloud.com/10099999/images/
c195ef3b-9195-4474-b6f7-16e5bd86acd0" rel="bookmark"/>
</image>
<flavor id="2">
<atom:link href="https://lon.servers.api.rackspacecloud.com/10099999/flavors/2" rel=
"bookmark"/>
</flavor>
<metadata/>
<addresses>
<network id="public">
<ip version="4" addr="5.79.23.47"/>
<ip version="6" addr="2a00:1a48:7805:0112:dc21:7ec0:ff08:4bb4"/>
</network>
<network id="private">
<ip version="4" addr="10.179.3.116"/>
</network>
</addresses>
<atom:link href="https://lon.servers.api.rackspacecloud.com/v2/10099999/servers/4aad5702b54a-4190-9953-966805a61a4a" rel="self"/>
<atom:link href="https://lon.servers.api.rackspacecloud.com/10099999/servers/4aad5702b54a-4190-9953-966805a61a4a" rel="bookmark"/>
<RAX-SI:image_schedule>
<retention>3</retention>
</RAX-SI:image_schedule>
</server>
</servers>
2.1.1.1. Filter Parameters
To filter the list of servers returned in the response body, specify one or more of the following optional URI parameters:
List Servers URI Parameters
image=imageId
The image ID. For a list of images, see Section 2.7.1,
“List Images” [124].
flavor=flavorId
The flavor ID. For a list of flavors, see Section 2.6.1, “List
Flavors” [111].
name=serverName
The server name.
status=serverStatus
The server status. Servers contain a status attribute that
indicates the current server state. You can filter on the
server status when you complete a list servers request,
and the server status is returned in the response body.
See Server Status Values [57].
marker=markerID
The ID of the last item in the previous list. See Section 1.6, “Paginated Collections” [19].
limit=int
The page size. See Section 1.6, “Paginated Collections” [19].
changes-since=dateTime
The changes-since time. The list contains servers that
have been deleted since the changes-since time. See Section 1.7, “Efficient Polling with the Changes-Since Parameter” [22].
RAXSI:image_schedule=boolean
Is scheduled images enabled or not. If the value is the
boolean keyword TRUE, the list contains all servers that
56
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
have an image schedule resource set on them. If the value is the boolean keyword FALSE, the list contains all
servers that do not have an image schedule. (This URI
parameter is added by the Rackspace Scheduled Images
API Extension. See Section 3.5, “Scheduled Images Extension” [166]).
2.1.1.2. Server Status Values
Possible server status values include the following:
Server Status Values
• ACTIVE. The server is active and ready to use.
• BUILD. The server is being built.
• DELETED. The server was deleted. The list servers API operation does not show servers
with a status of DELETED. To list deleted servers, use the changes-since parameter. See
Section 1.7, “Efficient Polling with the Changes-Since Parameter” [22].
• ERROR. The requested operation failed and the server is in an error state.
• HARD_REBOOT. The server is going through a hard reboot. A hard reboot power cycles
your server, which performs an immediate shutdown and restart. See Section 2.4.2, “Reboot Server” [91].
• MIGRATING. The server is being moved from one physical node to another physical
node.
Server migration is a Rackspace extension.
• PASSWORD. The password for the server is being changed. See Section 2.4.1, “Change Administrator Password” [90].
• REBOOT. The server is going through a soft reboot. During a soft reboot, the operating
system is signaled to restart, which allows for a graceful shutdown and restart of all processes. See Section 2.4.2, “Reboot Server” [91].
• REBUILD. The server is being rebuilt from an image. See Section 2.4.3, “Rebuild Server” [92].
• RESCUE. The server is in rescue mode.
Rescue mode is a Rackspace extension. See Section 3.3, “Rescue Mode Extension” [163].
• RESIZE. The server is being resized and is inactive until the resize operation completes.
See Section 2.4.4, “Resize Server” [97].
• REVERT_RESIZE. A resized or migrated server is being reverted to its previous size. The
destination server is being cleaned up and the original source server is restarting. For a
server that was resized, see Section 2.4.4, “Resize Server” [97].
57
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Server migration is a Rackspace extension.
• SUSPENDED. The server is inactive, either by request or necessity. Review support tickets
or contact Rackspace support to determine why the server is in this state.
• UNKNOWN. The server is in an unknown state. Contact Rackspace support.
• VERIFY_RESIZE. The server is waiting for the resize operation to be confirmed so that
the original server can be removed.
2.1.1.3. List Server Response Fields for GET /servers
The following table describes the fields that are returned in the response body:
Table 2.1. List Server Response Fields
Name
Description
id
The server ID.
links
The server links.
name
The server name.
2.1.1.4. List Server Response Fields for GET /servers/detail
The following table describes the fields that are returned in the response body:
Table 2.2. List Server Response Fields
Name
Description
accessIPv4
The public IP version 4 access address.
accessIPv6
The public IP version 6 access address.
addresses
Address for any attached isolated networks and Rackspace public and
private networks. The version field indicates whether the IP address
is version 4 or 6. For more information about networks, see the Cloud
Networks Developer Guide.
created
The time stamp for the creation date.
flavor
The flavor reference, including the flavor ID and flavor links. For a list
of flavors, see Section 2.6.1, “List Flavors” [111].
hostId
The host ID. The compute provisioning algorithm has an anti-affinity
property that attempts to spread customer VMs across hosts. Under
certain situations, VMs from the same customer might be placed on
the same host. hostId represents the host your server runs on and can
be used to determine this scenario if it is relevant to your application.
HostId is unique per account and is not globally unique.
id
The server ID.
image
The image reference, including the image ID and image links. For a list
of images, see Section 2.7.1, “List Images” [124].
links
The server links.
metadata
Metadata key and value pairs.
name
The server name.
progress
The build completion progress, as a percentage. Value is from 0 to
100.
status
The server status. See Server Status Values [57].
58
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Name
Description
tenant_id
The tenant ID.
updated
The time stamp for the last update.
user_id
The user ID.
Extended elements
RAXExtended element. The image schedule reference is included only
SI:image_scheduleif scheduled images has been enabled for this server. For information about this element, see Section 3.5, “Scheduled Images Extension” [166].
The namespace for this extended element is:
xmlns:RAX-SI="http://docs.openstack.org/servers/api/ext/
scheduled_images/v1.0"
Extended attributes
OSDCF:diskConfig
Extended attribute. The disk configuration value. Valid values are:
• AUTO: The server is built with a single partition the size of the target
flavor disk. The file system is automatically adjusted to fit the entire
partition. This keeps things simple and automated. AUTO is valid only for images and servers with a single partition that use the EXT3
file system. This is the default setting for applicable Rackspace base
images.
• MANUAL: The server is built using whatever partition scheme and file
system is in the source image. If the target flavor disk is larger, the
remaining disk space is left unpartitioned. This enables images to
have non-EXT3 file systems, multiple partitions, and so on, and enables you to manage the disk configuration.
The namespace for this extended attribute is:
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/
disk_config/api/v1.1"
See Section 3.1, “Disk Configuration Extension” [156].
OS-EXT-STS
Extended attributes. Shows the following extended statuses for
servers:
• OS-EXT-STS:vm_state. The VM state.
• OS-EXT-STS:task_state. The task state.
• OS-EXT-STS:power_state. The power state.
The namespace for this extended attribute is:
xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/
extended_status/api/v1.1"
See Section 3.2, “Extended Status Extension” [160].
59
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.1.2. Create Server
Verb
URI
Description
POST
/servers
Creates a server.
Normal Response Code: 202
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), badMediaType (415), serviceUnavailable (503), serverCapacityUnavailable (503)
Status Transition:
BUILD
ACTIVE
BUILD
ERROR (on error)
This operation asynchronously provisions a new server. The progress of this operation depends on the location of the requested image, network i/o, host load, and the selected flavor. You can check the progress of the request by issuing a GET request on /servers/id.
This operation returns a progress value from 0 to 100, indicating the completion percentage, and a status of ACTIVE when the server is turned on.
Tip
For OnMetal server builds, even after the status is ACTIVE, wait a few additional moments for the network configuration to complete. Once the new OnMetal
server pings successfully, you may begin to use it.
The full URL to the newly created server is returned through the Location header and is
available as a self and bookmark link in the server representation. See Links and References.
When you create a server, only the server ID, its links, and the administrator password are
guaranteed to be returned in the request.
Important
OnMetal servers must be created using an ssh key pair. Thus you should ignore
the administrator password returned by a Create Server operation because
it does not allow access to the OnMetal server. See Section 2.2, “Server Key
Pairs” [82] for more information about key pairs.
You can get additional attributes by issuing a GET requests on the server. See Section 2.1.4,
“Get Server Details” [68].
See Section 3.8, “Config Drive Extension” [173] for details about using config_drive when
creating servers.
This operation requires a request body.
The following table describes the attributes that you can specify in the request body:
60
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Table 2.3. Create Server Request Attributes
Name
Description
Required
flavorRef
The flavor ID. For a list of flavors, see Section 2.6.1, “List Flavors” [111].
Yes
name
The server name.
Yes
The name that you specify in a create request becomes the
initial host name of the server. After the server is built, if you
change the server name in the API or change the host name directly, the names are not kept in sync.
Also, server names are not guaranteed to be unique.
imageRef
The image ID. For a list of images, see Section 2.7.1, “List Images” [124].
Yes
OS-DCF:diskConfig
The disk configuration value.
No
Valid values are:
• AUTO: The server is built with a single partition the size of the
target flavor disk. The file system is automatically adjusted
to fit the entire partition. This keeps things simple and automated. AUTO is valid only for images and servers with a single partition that use the EXT3 file system. This is the default
setting for applicable Rackspace base images.
• MANUAL: The server is built using whatever partition scheme
and file system is in the source image. If the target flavor disk
is larger, the remaining disk space is left unpartitioned. This
enables images to have non-EXT3 file systems, multiple partitions, and so on, and enables you to manage the disk configuration.
See Section 3.1, “Disk Configuration Extension” [156].
metadata
Metadata key and value pairs. See Section 2.1.2.2, “Server
Metadata” [66].
No
uuid attribute on
the networks element
The networks to which you want to attach the server.
No
This attribute enables you to attach to an isolated network for
your tenant ID, the public Internet network, and the private
ServiceNet network.
If you do not specify any networks, your server is attached to
the public Internet and private ServiceNet networks.
If you specify one or more networks, your server is attached to
only the networks that you specify.
If you want to attach to the private ServiceNet or
public Internet networks, you must specify them
explicitly. The UUID for the private ServiceNet is
11111111-1111-1111-1111-111111111111.
The UUID for the public Internet is
00000000-0000-0000-0000-000000000000.
Important
You cannot attach a private network to an OnMetal server. Future generations of OnMetal
servers will have this capability. Until then, use
ServiceNet for internal traffic, and remember to
secure your OnMetal server because ServiceNet
is open to other Rackspace customers.
61
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Name
Description
Required
keypair
This grants a user the ability to authenticate via key based authentication instead of password based authentication. See
Section 2.2, “Server Key Pairs” [82].
No
config_drive
If set to true, the system will use data in one or both of the
following parameters to configure the server: user_data
or personality. See Section 3.8, “Config Drive Extension” [173].
No
personality
File path and contents. See Section 2.1.2.3, “Server Personality” [66].
No
user-data
Data used with config_drive for configuring a server. See Section 3.8, “Config Drive Extension” [173].
No
This operation returns a response body.
62
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.7. Create Server: JSON Request
{
"server" : {
"name" : "api-test-server-1",
"imageRef" : "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"flavorRef" : "2",
"config_drive": true,
"key_name":"name_of_keypair",
"OS-DCF:diskConfig" : "AUTO",
"metadata" : {
"My Server Name" : "API Test Server 1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" :
"ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4
="
}
],
"networks": [
{
"uuid": "4ebd35cf-bfe7-4d93-b0d8-eb468ce2245a"
},
{
"uuid": "00000000-0000-0000-0000-000000000000"
},
{
"uuid": "11111111-1111-1111-1111-111111111111"
}
]
}
}
Example 2.8. Create Server: JSON Response
{
"server":{
"OS-DCF:diskConfig":"AUTO",
"id":"2f881cd9-44c5-4178-a176-1bc07eb1cfb9",
"links":[
{
"href":"https://dfw.servers.api.rackspacecloud.com/010101/servers/ed5c7754-29b6-45fa-96cbab64958c8c0a",
"rel":"self"
},
{
"href":"https://dfw.servers.api.rackspacecloud.com/010101/servers/ed5c7754-29b6-45fa-96cbab64958c8c0a",
"rel":"bookmark"
}
],
"adminPass":"PkJ68cNqoQP2"
}
}
63
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.9. Create Server: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" imageRef="3afe97b2-26dc-49c5-a2cca2fc8d80c001" flavorRef="2"
name="api-test-server-xml2">
<metadata>
<meta key="My Server Name">API Test Server XML</meta>
</metadata>
<personality>
<file path="/etc/banner.txt"> ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA==</file>
</personality>
<networks>
<network uuid="0ef47ac7-6797-4e01-8a47-ed26ec3aaa56"/>
<network uuid="00000000-0000-0000-0000-000000000000"/>
<network uuid="11111111-1111-1111-1111-111111111111"/>
</networks>
<keypair>
<key_name>name_of_keypair-96bbe50e-05e1-4d59-9115-4779a3ebcc2e</key_name>
</keypair>
</server>
Example 2.10. Create Server: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<server
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1"
id="ed5c7754-29b6-45fa-96cb-ab64958c8c0a" adminPass="Dd5pNZtpVVQ3"
OS-DCF:diskConfig="AUTO">
<metadata/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ed5c7754-29b6-45fa-96cbab64958c8c0a"
rel="self"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/servers/ed5c7754-29b6-45fa-96cbab64958c8c0a"
rel="bookmark"/>
</server>
64
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.1.2.1. Server Passwords
When you create a virtual cloud server, you can specify a password through the optional
adminPass attribute.
Note
OnMetal servers must be created using ssh key pairs. You should neither use
nor modify the administrator password generated by the server build operation.
Though Rackspace does not enforce complexity requirements for the password, the operating system might. If the password is not complex enough, the server might enter an ERROR
state. In this case, a client can issue a change password action to reset the server password.
See Section 2.4.1, “Change Administrator Password” [90].
If you do not specify a password, a randomly generated password is assigned and returned
in the response body. For security reasons, the password is not returned in subsequent GET
calls.
The following example shows how to set an administrator password in a JSON request to
create a server:
Example 2.11. Set Administrator Password in Create Server Request: JSON
Request
{
"server" : {
"name" : "new-server-test",
"imageRef" : "5f68715f-201f-4600-b5a1-0b97e2b1cb31",
"flavorRef" : "2",
"adminPass": "GFf1j9aP",
"OS-DCF:diskConfig" : "AUTO",
"metadata" : {
"My Server Name" : "Ubuntu 10.04 LTS"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}
To change the administrator password for an existing server, see Section 2.4.1, “Change
Administrator Password” [90].
65
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.1.2.2. Server Metadata
You can supply custom server metadata at launch time. See Section 2.8, “Metadata” [147] for details on working with metadata. The maximum size of the metadata key
and value is 255 bytes each. You can query the maximum number of key-value pairs that
can be specified per server through the maxServerMeta absolute limit. See Section 1.9.3,
“Get Limits” [26].
2.1.2.3. Server Personality
You can inject data into the file system of the cloud server instance. For example, you might
want to insert ssh keys, set configuration files, or store data that you want to retrieve from
inside the instance. This feature provides a minimal amount of launch-time personalization.
If you require significant customization, create a custom image.
See Section 3.8, “Config Drive Extension” [173] for information on using personality with
config_drive.
Follow these guidelines when you inject files:
• The maximum size of the file path data is 255 bytes.
• Encode the file contents as a Base64 string.
• You can query the maximum file size value through the maxPersonalitySize absolute limit. See Section 1.9.3, “Get Limits” [26].
The absolute limit for the file size refers to the number of bytes in the decoded data and
not the number of characters in the encoded data.
• You can inject text files only. You cannot inject binary or zip files into a new build.
• You can specify a maximum number of file path/content pairs. You can query this value
through the maxPersonality absolute limit. See Section 1.9.3, “Get Limits” [26].
The file injection might not occur until after the server is built and booted.
During file injection, any existing files that match specified files are renamed to include the
bak extension appended with a time stamp. For example, if the file /etc/passwd exists, it is
backed up as /etc/passwd.bak.1246036261.5785.
Injected files have root owner and root group membership.
66
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.1.3. Server Access Addresses
In certain scenarios, such as a hybrid environment leveraging RackConnect, the IPv4 and/
or IPv6 addresses used for primary access to your server might differ from those assigned directly to your Cloud Server. The access IP attributes expose the IPs that can be used to reliably access the instance from an external network.
You can specify such addresses by providing additional attributes on the request to create a server. In addition, you can modify the access IPs over the life of the server. See Section 2.1.5, “Update Server” [75].
If you do not specify IPv4 or IPv6 addresses, these are filled in automatically.
Example 2.12. Create Server with Access IP: JSON Request
{
"server" : {
"name" : "new-server-test",
"imageRef" : "52415800-8b69-11e0-9b19-734f6f006e54",
"flavorRef" : "52415800-8b69-11e0-9b19-734f1195ff37",
"accessIPv4" : "67.23.10.132"
}
}
Example 2.13. Create Server with Access IP: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
name="test"
accessIPv4="67.23.10.132"
imageRef="52415800-8b69-11e0-9b19-734f6f006e54"
flavorRef="52415800-8b69-11e0-9b19-734f1195ff37"/>
You can use both IPv4 and IPv6 addresses as access addresses and you can assign both addresses simultaneously as illustrated below. You can update access addresses after you create a server. See Section 2.1.5, “Update Server” [75] for more details.
67
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.14. Create Server with Multiple Access IPs: JSON Request
{
"server" : {
"name" : "new-server-test",
"imageRef" : "52415800-8b69-11e0-9b19-734f6f006e54",
"flavorRef" : "52415800-8b69-11e0-9b19-734f1195ff37",
"accessIPv4" : "67.23.10.132",
"accessIPv6" : "::babe:67.23.10.132"
}
}
Example 2.15. Create Server with Multiple Access IPs: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
name="test"
accessIPv4="67.23.10.132"
accessIPv6="::babe:67.23.10.132"
imageRef="52415800-8b69-11e0-9b19-734f6f006e54"
flavorRef="52415800-8b69-11e0-9b19-734f1195ff37" />
2.1.4. Get Server Details
Verb
URI
Description
GET
/servers/id
Lists details for a specified server.
Normal Response Codes: 200, 203
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
This operation returns the details of a specified server.
Specify the server ID as id in the URI.
This operation does not require a request body.
This operation returns a response body, which contains details for the specified server.
68
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
The following table describes the fields that are returned in the response body:
Table 2.4. Get Server Details Response Fields
Name
Description
accessIPv4
The public IP version 4 access address.
Note
The accessIPv4 and accessIPv6 are fields that populate once the server is ready
to use. Before that, use the
information beneath the
addresses list to get the IP
address.
accessIPv6
The public IP version 6 access address.
Note
The accessIPv4 and accessIPv6 are fields that populate once the server is ready
to use. Before that, use the
information beneath the
addresses list to get the IP
address.
addresses
Public and private IP addresses, The version field indicates whether the IP address
is version 4 or 6.
created
The time stamp for the creation date.
flavor
The flavor ID. For a list of flavors, see Section 2.6.1, “List Flavors” [111].
hostId
The host ID. The compute provisioning algorithm has an anti-affinity property that
attempts to spread customer VMs across
hosts. Under certain situations, VMs from
the same customer might be placed on the
same host. hostId represents the host your
server runs on and can be used to determine this scenario if it is relevant to your
application.
HostId is unique per account and is not
globally unique.
id
The server ID.
image
The image ID. For a list of images, see Section 2.7.1, “List Images” [124].
links
Server links.
metadata
Metadata key and value pairs.
name
The server name.
progress
The build completion progress, as a percentage. Value is from 0 to 100.
status
The server status. See Server Status Values [57].
tenant_id
The tenant ID.
updated
The time stamp for the last update.
user_id
The user ID.
69
API v2
Next Generation Cloud Servers™
Dev Guide
Name
February 10, 2015
Description
Extended elements
RAX-SI:image_schedule
Extended element. The image schedule reference is included only if scheduled images
has been enabled for this server. For information about this element, see Section 3.5,
“Scheduled Images Extension” [166].
The namespace for this extended element
is:
xmlns:RAX-SI="http://docs.openstack.
org/servers/api/ext/scheduled_images/
v1.0"
Extended attributes
OS-DCF:diskConfig
Extended attribute. The disk configuration
value.
Valid values are:
• AUTO. The server is built with a single
partition the size of the target flavor
disk. The file system is automatically adjusted to fit the entire partition. This
keeps things simple and automated. AUTO is valid only for images and servers
with a single partition that use the EXT3
file system. This is the default setting for
applicable Rackspace base images.
• MANUAL. The server is built using whatever partition scheme and file system is
in the source image. If the target flavor
disk is larger, the remaining disk space is
left unpartitioned. This enables images
to have non-EXT3 file systems, multiple
partitions, and so on, and enables you to
manage the disk configuration.
The namespace for this extended attribute
is:
xmlns:OS-DCF="http://docs.openstack.
org/compute/ext/disk_config/api/v1.1"
See Section 3.1, “Disk Configuration Extension” [156].
OS-EXT-STS
Extended attributes. Shows the following
extended statuses for servers:
• OS-EXT-STS:vm_state. The VM state.
• OS-EXT-STS:task_state. The task
state.
• OS-EXT-STS:power_state. The power state.
The namespace for this extended attribute
is:
xmlns:OS-EXT-STS="http://docs.
openstack.org/compute/ext/
extended_status/api/v1.1"
See Section 3.2, “Extended Status Extension” [160]
70
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 2.16. Get Server Details: JSON Response
{
"server": {
"OS-DCF:diskConfig": "AUTO",
"OS-EXT-STS:power_state": 1,
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"accessIPv4": "198.101.241.238",
"accessIPv6": "2001:4800:780e:0510:d87b:9cbc:ff04:513a",
"addresses": {
"private": [
{
"addr": "10.180.3.171",
"version": 4
}
],
"public": [
{
"addr": "198.101.241.238",
"version": 4
},
{
"addr": "2001:4800:780e:0510:d87b:9cbc:ff04:513a",
"version": 6
}
]
},
"created": "2012-08-16T18:41:43Z",
"flavor": {
"id": "2",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/flavors/2",
"rel": "bookmark"
}
]
},
"hostId": "33ccb6c82f3625748b6f2338f54d8e9df07cc583251e001355569056",
"id": "ef08aa7a-b5e4-4bb8-86df-5ac56230f841",
"image": {
"id": "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/images/
3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ef08aa7ab5e4-4bb8-86df-5ac56230f841",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/servers/ef08aa7ab5e4-4bb8-86df-5ac56230f841",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "API Test Server 2"
},
"name": "api-test-server 2",
"progress": 100,
"status": "ACTIVE",
"tenant_id": "010101",
"updated": "2012-08-16T18:50:38Z",
"user_id": "170454"
}
}
71
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.17. Get Server Details for a Server with Scheduled Images Enabled:
JSON Response
{
"server": {
"OS-DCF:diskConfig": "AUTO",
"OS-EXT-STS:power_state": 1,
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"RAX-SI:image_schedule": {
"retention": 3
},
"accessIPv4": "5.79.23.47",
"accessIPv6": "2a00:1a48:7805:112:dc21:7ec0:ff08:4bb4",
"addresses": {
"private": [
{
"addr": "10.179.3.116",
"version": 4
}
],
"public": [
{
"addr": "5.79.23.47",
"version": 4
},
{
"addr": "2a00:1a48:7805:0112:dc21:7ec0:ff08:4bb4",
"version": 6
}
]
},
"created": "2013-04-04T20:10:30Z",
"flavor": {
"id": "2",
"links": [
{
"href": "https://lon.servers.api.rackspacecloud.com/10099999/flavors/2",
"rel": "bookmark"
}
]
},
"hostId": "8db66bfe16771e6505e87ced4d8f5a23916faf3105c7837eae12daba",
"id": "4aad5702-b54a-4190-9953-966805a61a4a",
"image": {
"id": "c195ef3b-9195-4474-b6f7-16e5bd86acd0",
"links": [
{
"href": "https://lon.servers.api.rackspacecloud.com/10099999/images/
c195ef3b-9195-4474-b6f7-16e5bd86acd0",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "https://lon.servers.api.rackspacecloud.com/v2/10099999/servers/4aad5702b54a-4190-9953-966805a61a4a",
"rel": "self"
},
{
"href": "https://lon.servers.api.rackspacecloud.com/10099999/servers/4aad5702b54a-4190-9953-966805a61a4a",
"rel": "bookmark"
}
],
"metadata": {},
"name": "linux-server",
"progress": 100,
"status": "ACTIVE",
"tenant_id": "10099999",
"updated": "2013-06-03T17:29:46Z",
"user_id": "12345"
}
}
72
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.18. Get Server Details: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<server
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/
api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1" status="BUILD"
updated="2012-08-16T18:48:41Z"
hostId="0b88822e7a5db46eb95b69c0608733904b2cd4f18b0c1e418eb06e1c"
name="api-test-server-xml" created="2012-08-16T18:48:23Z"
userId="170454" tenantId="010101" accessIPv4="" accessIPv6=""
progress="25" id="0f828bfb-609c-4042-be41-6dcc1b76228f"
OS-EXT-STS:vm_state="building" OS-EXT-STS:task_state="spawning"
OS-EXT-STS:power_state="0" OS-DCF:diskConfig="AUTO">
<image id="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001">
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/images/
3afe97b2-26dc-49c5-a2cc-a2fc8d80c001"
rel="bookmark"/>
</image>
<flavor id="2">
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/flavors/2"
rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">API Test Server XML</meta>
</metadata>
<addresses>
<network id="public">
<ip version="6"
addr="2001:4800:780e:0510:d87b:9cbc:ff04:5146"/>
<ip version="4" addr="198.101.242.212"/>
</network>
<network id="private">
<ip version="4" addr="10.180.15.103"/>
</network>
</addresses>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
0f828bfb-609c-4042-be41-6dcc1b76228f"
rel="self"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/servers/
0f828bfb-609c-4042-be41-6dcc1b76228f"
rel="bookmark"/>
</server>
73
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.19. Get Server Details for a Server with Scheduled Images Enabled:
XML Response
<?xml version="1.0" encoding="UTF-8"?>
<server
xmlns:RAX-SI="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0"
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1"
status="ACTIVE"
updated="2013-06-03T17:29:46Z"
hostId="8db66bfe16771e6505e87ced4d8f5a23916faf3105c7837eae12daba"
name="linux-server"
created="2013-04-04T20:10:30Z"
userId="12345"
tenantId="10099999"
accessIPv4="5.79.23.47"
accessIPv6="2a00:1a48:7805:112:dc21:7ec0:ff08:4bb4"
progress="100"
id="4aad5702-b54a-4190-9953-966805a61a4a"
OS-EXT-STS:vm_state="active"
OS-EXT-STS:task_state="None"
OS-EXT-STS:power_state="1"
OS-DCF:diskConfig="AUTO">
<image id="c195ef3b-9195-4474-b6f7-16e5bd86acd0">
<atom:link href="https://lon.servers.api.rackspacecloud.com/1009999/images/c195ef3b-9195-4474b6f7-16e5bd86acd0" rel="bookmark"/>
</image>
<flavor id="2">
<atom:link href="https://lon.servers.api.rackspacecloud.com/10099999/flavors/2" rel="bookmark"/>
</flavor>
<metadata/>
<addresses>
<network id="public">
<ip version="4" addr="5.79.23.47"/>
<ip version="6" addr="2a00:1a48:7805:0112:dc21:7ec0:ff08:4bb4"/>
</network>
<network id="private">
<ip version="4" addr="10.179.3.116"/>
</network>
</addresses>
<atom:link href="https://lon.servers.api.rackspacecloud.com/v2/10099999/servers/4aad5702b54a-4190-9953-966805a61a4a" rel="self"/>
<atom:link href="https://lon.servers.api.rackspacecloud.com/10099999/servers/4aad5702b54a-4190-9953-966805a61a4a" rel="bookmark"/>
<RAX-SI:image_schedule>
<retention>3</retention>
</RAX-SI:image_schedule>
</server>
74
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.1.5. Update Server
Verb
URI
Description
PUT
/servers/id
Updates one or more editable attributes for a specified
server.
Normal Response Code: 200
Note
If you try to update a server by using the server bookmark link,
the response code is 300, unless you use the Accept: application/json;version=1.1 header with the request.
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), buildInProgress (409),
overLimit (413), badMediaType (415), serviceUnavailable (503)
Status Transition:
ACTIVE
ACTIVE
This operation updates one or more editable attributes for a specified server.
Specify the server ID as id in the URI.
This operation requires a request body.
The following table describes the attributes that you can set in the request body:
Table 2.5. Update Server Request Attributes
Attribute
Description
name
The name of the server. If you edit the server name, the server host
name does not change. Also, server names are not guaranteed to be
unique.
accessIPv4
The IP version 4 address.
accessIPv6
The IP version 6 address.
This operation returns a response body.
2.1.5.1. Update Server Name - Example
Example 2.20. Update Server Name: JSON Request
{
"server" :
{
"name" : "new-server-test"
}
}
Example 2.21. Update Server Name: JSON Response
{
"server": {
"OS-DCF:diskConfig": "AUTO",
"accessIPv4": "198.101.241.238",
"accessIPv6": "2001:4800:780e:0510:d87b:9cbc:ff04:513a",
75
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
"addresses": {
"private": [
{
"addr": "10.180.3.171",
"version": 4
}
],
"public": [
{
"addr": "198.101.241.238",
"version": 4
},
{
"addr": "2001:4800:780e:0510:d87b:9cbc:ff04:513a",
"version": 6
}
]
},
"created": "2012-08-16T18:41:43Z",
"flavor": {
"id": "2",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/flavors/2",
"rel": "bookmark"
}
]
},
"hostId": "33ccb6c82f3625748b6f2338f54d8e9df07cc583251e001355569056",
"id": "ef08aa7a-b5e4-4bb8-86df-5ac56230f841",
"image": {
"id": "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/images/
3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ef08aa7ab5e4-4bb8-86df-5ac56230f841",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/servers/ef08aa7ab5e4-4bb8-86df-5ac56230f841",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "API Test Server 2"
},
"name": "new-server-test",
"progress": 100,
"status": "ACTIVE",
"tenant_id": "010101",
"updated": "2012-08-16T18:50:38Z",
"user_id": "170454"
}
}
76
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 2.22. Update Server Name: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
name="new-server-test"/>
Example 2.23. Update Server Name: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<server
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE"
updated="2012-07-30T14:39:41Z"
hostId="c0bf446f5e07234f8d3c76af8d25a65f36f77dc3d22360d804cd5293"
name="new-server-test" created="2012-07-30T14:38:13Z"
userId="170454" tenantId="010101" accessIPv4="50.56.175.20"
accessIPv6="2001:4800:780e:0510:d87b:9cbc:ff04:4b96"
progress="100" id="f56affe0-aecd-4030-81b2-8e8385c897ca"
OS-DCF:diskConfig="AUTO">
<image id="5f68715f-201f-4600-b5a1-0b97e2b1cb31">
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/images/5f68715f-201f-4600b5a1-0b97e2b1cb31"
rel="bookmark"/>
</image>
<flavor id="2">
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/flavors/2"
rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">API Test Server XML</meta>
</metadata>
<addresses>
<network id="public">
<ip version="6"
addr="2001:4800:780e:0510:d87b:9cbc:ff04:4b96"/>
<ip version="4" addr="50.56.175.20"/>
</network>
<network id="private">
<ip version="4" addr="10.180.5.181"/>
</network>
</addresses>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/f56affe0aecd-4030-81b2-8e8385c897ca"
rel="self"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/servers/f56affe0aecd-4030-81b2-8e8385c897ca"
rel="bookmark"/>
</server>
2.1.5.2. Update Server Access Addresses - Example
You can update the IPv4 access address, IPv6 access address, or both.
The following example shows how to update both the IPv4 and IPv6 addresses:
Example 2.24. Update Server Access Address: JSON Request
{
"server" :
{
"accessIPv4" : "67.23.10.132",
"accessIPv6" : "::babe:67.23.10.132"
}
}
Example 2.25. Update Server Access Address: JSON Response
{
"server": {
77
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
"id": "52415800-8b69-11e0-9b19-734f565bc83b",
"tenant_id": "1234",
"user_id": "5678",
"name": "new-server-test",
"created": "2010-11-11T12:00:00Z",
"updated": "2010-11-12T12:55:55Z",
"hostId": "e4d909c290d0fb1ca068ffaddf22cbd0",
"accessIPv4" : "67.23.10.132",
"accessIPv6" : "::babe:67.23.10.132",
"progress": 0,
"status": "ACTIVE",
"image" : {
"id": "52415800-8b69-11e0-9b19-734f6f006e54",
"name": "CentOS 5.2",
"links": [
{
"rel": "self",
"href": "http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f6f006e54"
},
{
"rel": "bookmark",
"href": "http://dfw.servers.api.rackspacecloud.com/010101/images/
52415800-8b69-11e0-9b19-734f6f006e54"
}
]
},
"flavor" : {
"id": "52415800-8b69-11e0-9b19-734f1195ff37",
"name": "256 MB Server",
"links": [
{
"rel": "self",
"href": "http://dfw.servers.api.rackspacecloud.com/v2/010101/flavors/
52415800-8b69-11e0-9b19-734f1195ff37"
},
{
"rel": "bookmark",
"href": "http://dfw.servers.api.rackspacecloud.com/010101/flavors/
52415800-8b69-11e0-9b19-734f1195ff37"
}
]
},
"metadata": {
"My Server Name": "Apache1"
},
"addresses": {
"public" : [
{
"version": 4,
"addr": "67.23.10.138"
},
{
"version": 6,
"addr": "::babe:67.23.10.138"
}
],
"private" : [
{
"version": 4,
"addr": "10.176.42.19"
},
{
"version": 6,
"addr": "::babe:10.176.42.19"
}
]
},
"links": [
{
"rel": "self",
"href": "http://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
52415800-8b69-11e0-9b19-734fcece0043"
},
{
"rel": "bookmark",
"href": "http://dfw.servers.api.rackspacecloud.com/010101/servers/
52415800-8b69-11e0-9b19-734fcece0043"
}
78
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
]
}
}
79
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 2.26. Update Server Access Address: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<server
xmlns="http://docs.openstack.org/compute/api/v1.1"
accessIPv4="67.23.10.132"
accessIPv6="::babe:67.23.10.132"
/>
Example 2.27. Update Server Access Address: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
id="52415800-8b69-11e0-9b19-734f565bc83b" tenant_id="010101"
user_id="5678" name="new-server-test"
hostId="e4d909c290d0fb1ca068ffaddf22cbd0" progress="0"
status="ACTIVE" created="2010-11-11T12:00:00Z"
updated="2010-11-12T12:55:55Z" accessIPv4="67.23.10.132"
accessIPv6="::babe:67.23.10.132">
<image id="52415800-8b69-11e0-9b19-734f6f006e54" name="CentOS 5.2">
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/images/
52415800-8b69-11e0-9b19-734f6f006e54"/>
<atom:link rel="bookmark"
href="http://dfw.servers.api.rackspacecloud.com/010101/images/
52415800-8b69-11e0-9b19-734f6f006e54"
/>
</image>
<flavor id="52415800-8b69-11e0-9b19-734f1195ff37"
name="256 MB Server">
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/flavors/
52415800-8b69-11e0-9b19-734f1195ff37"/>
<atom:link rel="bookmark"
href="http://dfw.servers.api.rackspacecloud.com/010101/flavors/
52415800-8b69-11e0-9b19-734f1195ff37"
/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="public">
<ip version="4" addr="67.23.10.138"/>
<ip version="6" addr="::babe:67.23.10.138"/>
</network>
<network id="private">
<ip version="4" addr="10.176.42.19"/>
<ip version="6" addr="::babe:10.176.42.19"/>
</network>
</addresses>
<atom:link rel="self"
href="http://dfw.servers.api.rackspacecloud.com/v2/010101/servers/
52415800-8b69-11e0-9b19-734fcece0043"/>
<atom:link rel="bookmark"
href="http://dfw.servers.api.rackspacecloud.com/010101/servers/
52415800-8b69-11e0-9b19-734fcece0043"
/>
</server>
80
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.1.6. Delete Server
Verb
URI
Description
DELETE
/servers/id
Deletes a specified server.
Normal Response Code: 204
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), buildInProgress (409),
overLimit (413), serviceUnavailable (503)
Status Transition:
ACTIVE
ERROR
DELETED
DELETED
This operation deletes a specified server instance from the system.
Specify the ID for the server as id in the URI.
This operation does not require a request body.
This operation does not return a response body.
Note
You can delete a server in any state.
Successful deletion returns a 204 response code.
81
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.2. Server Key Pairs
Users create a key pair or use an existing key pair and associate that key pair when building
a server. This grants a user the ability to authenticate via key based authentication instead
of password based authentication.
2.2.1. Create or Upload Server Key Pairs
Verb
URI
Description
POST
/os-keypairs
Creates a key of the specified name.
POST
/os-keypairs
Uploads a key of the specified name.
2.2.1.1. Create Server Key Pair
Verb
URI
Description
POST
/os-keypairs
Creates a key of the specified name to
associate with new instances.
Normal Response Codes: 200
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
This operation returns a newly created key pair with the specified name.
Key Pair Naming Rules
The key name must be unique and may not exceed 255 characters. It can contain the following characters:
• alphanumeric
• spaces
• dashes
• underscores
Example Nova request- Create and associate new key named "mykey":
$ nova keypair-add mykey > mykey.pem
Example 2.28. Create Key Pair: JSON Request
{
"keypair":{
"name":"name_of_keypair"
}
}
82
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.29. Create Key Pair: JSON Response
{
"keypair": {
"fingerprint": "35:9d:d0:c3:4a:80:d3:d8:86:f1:ca:f7:df:c4:f9:d8",
"name": "name_of_keypair",
"private_key": "-----BEGIN RSA PRIVATE KEY-----\
nMIICXAIBAAKBgQC9mC3WZN9UGLxgPBpP7H5jZMc6pKwOoSgre8yun6REFktn/Kz7\nDUt9jaR1UJyRzHxITfCfAIgSxPdGqB/
oF1suMyWgu5i0625vavLB5z5kC8Hq3qZJ\n9zJO1poE1kyD+htiTtPWJ88e12xuH2XB/
CZN9OpEiF98hAagiOE0EnOS5QIDAQAB\nAoGAE5XO1mDhORy9COvsg+kYPUhB1GsCYxh+v88wG7HeFDKBY6KUc/
Kxo6yoGn5T\nTjRjekyi2KoDZHz4VlIzyZPwFS4I1bf3oCunVoAKzgLdmnTtvRNMC5jFOGc2vUgP\
n9bSyRj3S1R4ClVk2g0IDeagko/jc8zzLEYuIK+fbkds79YECQQDt3vcevgegnkga\ntF4NsDmmBPRkcSHCqrANP/
7vFcBQN3czxeYYWX3DK07alu6GhH1Y4sHbdm616uU0\nll7xbDzxAkEAzAtN2IyftNygV2EGiaGgqLyo/tD9+Vui2qCQplqe4jvWh/
5Sparl\nOjmKo+uAW+hLrLVMnHzRWxbWU8hirH5FNQJATO+ZxCK4etXXAnQmG41NCAqANWB2\nB+2HJbH2NcQ2QHvAHUm741JGn/
KI/aBlo7KEjFRDWUVUB5ji64BbUwCsMQJBAIku\nLGcjnBf/oLk+XSPZC2eGd2Ph5G5qYmH0Q2vkTx+wtTn3DV
+eNsDfgMtWAJVJ5t61\ngU1QSXyhLPVlKpnnxuUCQC+xvvWjWtsLaFtAsZywJiqLxQzHts8XLGZptYJ5tLWV\
nrtmYtBcJCN48RrgQHry/xWYeA4K/AFQpXfNPgprQ96Q=\n-----END RSA PRIVATE KEY-----\n",
"public_key": "ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9mC3WZN9UGLxgPBpP7H5jZMc6pKwOoSgre8yun6REFktn/
Kz7DUt9jaR1UJyRzHxITfCfAIgSxPdGqB/oF1suMyWgu5i0625vavLB5z5kC8Hq3qZJ9zJO1poE1kyD+htiTtPWJ88e12xuH2XB/
CZN9OpEiF98hAagiOE0EnOS5Q== Generated by Nova\n",
"user_id": "fake"
}
}
Example 2.30. Create Key Pair: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<keypair>
<name>name_of_keypair</name>
</keypair>
Example 2.31. Create Key Pair: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<keypair>
<public_key>
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDNa8e/Gfe4572GwEDXlLsCqxsMcuUiF8Fr9RSeW30EuWg8Me5HM/
rzqaShmzdHZbN5dvGH15H1yMXTUg8cxcLaOU04IQi/g+BHkGzbxV3gCdODWqjF
+5928Ljg6x87e5lxxB6WAoyoGuzghaJXikOihRZSzdityb3DlYuYRfaRMw== Generated by Nova
</public_key>
<private_key>-----BEGIN RSA PRIVATE KEY----MIICXgIBAAKBgQDNa8e/Gfe4572GwEDXlLsCqxsMcuUiF8Fr9RSeW30EuWg8Me5H
M/rzqaShmzdHZbN5dvGH15H1yMXTUg8cxcLaOU04IQi/g+BHkGzbxV3gCdODWqjF
+5928Ljg6x87e5lxxB6WAoyoGuzghaJXikOihRZSzdityb3DlYuYRfaRMwIDAQAB
AoGBAL67q4zqHJRIQDcE/W/t/jI9E3FcoRoluod12P4sbolbacgyiE7+ma1yv5T6
HLqjWKCYay05YKI5GE3dbIDHsuHnnhd1S5tE2SNY85as8zC0QT6N8eFexh5/0Px4
dVl3tXKj+Oaovb0tCKoiPVUHIZTsihNPwYqFS2kMuHnUwthxAkEA99Bw2FIWbgq9
gj37qNGP5Vm2pmK9xU0aSyG2NJKH77CrERgmqrBT41a97BdsJbzuIaAwi4RJaDqm
AsTFBw312wJBANQ02vVin5NYD4BAfMyCsoNI7pQBCkq6UeK3VAC9ozCBE5BIDqat
VTx2ijbdlfwGqQVM6g773xuuNebgZJrbrYkCQQDV4YXzfe2z7fsf1MVGMBBkn2h/
9ErbZa9i1ua+OxWt7qnGaDS/Ls5IMQ5cHN8PNx/Dz9D2KSd+GNg9HXz7mLXvAkEA
0GvZYomrEZy8HMs5x+PWUPug19ztrtew9Wv6JYAcd9dOz7b2LN6xiOEkfx7D4PTp
rTsN6AmZ6CYC6vAZ379DgQJAPMZjO9Z9KZ2t2VFu0YgK9LbQ4upbhew7YUmWA5dV
djCVjJ/0AZgQofvvUDe9FZHtSLt6IN5+jsLAi35Q3iQp9g==
-----END RSA PRIVATE KEY----</private_key>
<user_id>fake</user_id>
<name>name_of_keypair</name>
<fingerprint>7f:97:1c:83:27:a3:6b:c5:a6:a2:37:90:4c:be:73:86</fingerprint>
</keypair>
2.2.1.2. Upload Server Key Pair
Verb
URI
Description
POST
/os-keypairs
Uploads an existing key of the specified name to associate with new instances
Normal Response Codes: 200
83
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
This operation allows you to upload an existing key with the specified name.
Example Nova request- Upload an existing key and associate it with key named "mykey":
$ nova keypair-add --pub-key path/to/mykey.pub mykey
Example 2.32. Upload Existing Key: JSON Request
{
"keypair":{
"name":"name_of_keypair",
"public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr
+o/6lHBQdW5aYd44bd8JttDCE/F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ02RhIPyyxYpv9FhY
+2YiUkpwFOcLImyrxEsYXpD/0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw"
}
}
Example 2.33. Upload Existing Key: JSON Response
{
"keypair":{
"fingerprint":"1e:2c:9b:56:79:4b:45:77:f9:ca:7a:98:2c:b0:d5:3c",
"name":"name_of_keypair-dab428fe-6186-4a14-b3de-92131f76cd39",
"public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr
+o/6lHBQdW5aYd44bd8JttDCE/F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ02RhIPyyxYpv9FhY
+2YiUkpwFOcLImyrxEsYXpD/0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw== Generated by Nova",
"user_id":"fake"
}
}
Example 2.34. Upload Existing Key: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<keypair>
<name>name_of_keypair-96bbe50e-05e1-4d59-9115-4779a3ebcc2e</name>
<public_key>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr+o/
6lHBQdW5aYd44bd8JttDCE/F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ02RhIPyyxYpv9FhY
+2YiUkpwFOcLImyrxEsYXpD/0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw== Generated by Nova</public_key>
</keypair>
Example 2.35. Upload Existing Key: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<keypair>
<public_key>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr+o/
6lHBQdW5aYd44bd8JttDCE/F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ02RhIPyyxYpv9FhY
+2YiUkpwFOcLImyrxEsYXpD/0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw== Generated by Nova</public_key>
<user_id>fake</user_id>
<name>name_of_keypair-96bbe50e-05e1-4d59-9115-4779a3ebcc2e</name>
<fingerprint>1e:2c:9b:56:79:4b:45:77:f9:ca:7a:98:2c:b0:d5:3c</fingerprint>
</keypair>
2.2.2. List Server Key Pairs
Verb
URI
Description
GET
/os-keypairs
List all keys associated with account.
Normal Response Codes: 200
84
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
This operation returns a list of all key pairs associated with an account. The operation does
not require a request body.
Example Nova request- List current keys stored in Nova:
$ nova keypair-list
Example 2.36. List Key Pairs: JSON Response
{
"keypairs":[
{
"keypair":{
"fingerprint":"15:b0:f8:b3:f9:48:63:71:cf:7b:5b:38:6d:44:2d:4a",
"name":"name_of_keypair-601a2305-4f25-41ed-89c6-2a966fc8027a",
"public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC+Eo/
RZRngaGTkFs7I62ZjsIlO79KklKbMXi8F+KITD4bVQHHn+kV
+4gRgkgCRbdoDqoGfpaDFs877DYX9n4z6FrAIZ4PES8TNKhatifpn9NdQYWA+IkU8CuvlEKGuFpKRi/k7JLos/
gHi2hy7QUwgtRvcefvD/vgQZOVw/mGR9Q== Generated by Nova\n"
}
}
]
}
Example 2.37. List Key Pairs: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<keypairs>
<keypair>
<public_key>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCWdUoGD7qz9kjbLoY2L0S5CdhUS8RvQ1g62OTgvmWE/
bEKDLwaTIFEEpN/0huGk/nxvVZ6VOhv1eSKC3o9dZ2NDk0C4sBsrvJ41uWd1hbq72sDGzVEkJ
+925CraioSAbMpRK5Ea7UPWbR8laqrY1TsKtcuxiGJ936bOPIXW12h6Q== Generated by Nova
</public_key>
<name>name_of_keypair-a4c7d228-218b-4c4c-9d99-62e7878ebb1b</name>
<fingerprint>62:32:23:67:56:ee:6f:51:4c:03:ce:b8:00:f9:41:ff</fingerprint>
</keypair>
</keypairs>
2.2.3. Delete Server Key Pair
Verb
URI
Description
DELETE
/os-keypairs/{keypairname}
Deletes specified key pair.
Normal Response Codes: 202
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
This operation deletes the specified key pair. A return code of 202 indicates success. The operation has neither request body nor response body.
Example Nova request- Delete key:
nova keypair-delete mykey
85
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.3. Server Addresses
Verb
URI
Description
GET
/servers/id/ips
Lists all networks and server addresses associated with a
specified server.
GET
/servers/id/ips/networkLabel
Lists addresses associated with a specified server and network.
86
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.3.1. List Addresses
Verb
URI
Description
GET
/servers/id/ips
Lists all networks and server addresses associated with a
specified server.
Normal Response Codes: 200 and 203
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), buildInProgress (409),
overLimit (413), serviceUnavailable (503)
This operation lists all networks and addresses associated with a specified server.
Specify the server ID as id in the URI.
This operation does not require a request body.
This operation returns a response body.
Example 2.38. List Addresses: JSON Response
{
"addresses": {
"private": [
{
"addr": "10.180.13.75",
"version": 4
}
],
"public": [
{
"addr": "2001:4800:780e:0510:d87b:9cbc:ff04:3e81",
"version": 6
},
{
"addr": "50.56.186.185",
"version": 4
}
]
}
}
Example 2.39. List Addresses: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<addresses xmlns="http://docs.openstack.org/compute/api/v1.1">
<network id="public">
<ip version="6" addr="2001:4800:780e:0510:d87b:9cbc:ff04:4b96"/>
<ip version="4" addr="50.56.175.20"/>
</network>
<network id="private">
<ip version="4" addr="10.180.5.181"/>
</network>
</addresses>
87
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.3.2. List Addresses by Network
Verb
URI
Description
GET
/servers/id/ips/networkLabel
Lists addresses associated with a specified server and network.
Normal Response Codes: 200 and 203
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), buildInProgress (409),
overLimit (413), serviceUnavailable (503)
This operation lists all addresses associated with a specified server and network.
Specify the server ID as id and the network label as networkLabel in the URI.
This operation does not require a request body.
This operation returns a response body.
Example 2.40. List Addresses by Network: JSON Response
{
"public": [
{
"addr": "2001:4800:7810:0512:b8bd:1f9c:ff05:339e",
"version": 6
},
{
"addr": "166.78.9.96",
"version": 4
}
]
}
Example 2.41. List Addresses by Network: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://docs.openstack.org/compute/api/v1.1" id="public">
<ip version="6" addr="2001:4800:7810:0512:b8bd:1f9c:ff05:339e"/>
<ip version="4" addr="166.78.9.96"/>
</network>
88
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.4. Server Actions
Verb
URI
Action specified in request body
Description
POST
/servers/id/action
changePassword
Changes the administrator password for a
specified server.
POST
/servers/id/action
reboot
Performs a soft or hard reboot of the specified
server.
POST
/servers/id/action
rebuild
Rebuilds the specified server.
POST
/servers/id/action
resize
Resizes the specified server.
POST
/servers/id/action
confirmResize
Confirms a pending resize action.
POST
/servers/id/action
revertResize
Cancels and reverts a pending resize action.
POST
/servers/id/action
rescue
Places a server in rescue mode.
POST
/servers/id/action
unrescue
Takes a server out of rescue mode.
POST
/servers/id/action
createImage
Creates a new image for a specified server.
Note
You can shut down a server instance from inside the instance.
On Linux, issue the following command:
$ shutdown -h now
On Windows, click Start → Shut down.
When you shut down an instance, you are still charged for it.
To power the instance back on, issue a reboot through the Cloud Control Panel
or the API.
89
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.4.1. Change Administrator Password
Verb
URI
Action specified in request body
Description
POST
/servers/id/action
changePassword
Changes the administrator password for a
specified server.
Normal Response Code: 202
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), buildInProgress (409),
overLimit (413), badMediaType (415), serviceUnavailable (503)
Status Transition:
ACTIVE
PASSWORD
ACTIVE
ACTIVE
PASSWORD
ERROR (on error)
This operation changes the administrator password for a specified server. The administrator
password is the root password for the server. Specify the server ID as id in the URI.
Note
OnMetal servers must be created using ssh key pairs. You should neither use
nor modify the administrator password generated by the server build operation.
In the request body, specify the changePassword action followed by the adminPass attribute, as shown in the following table:
Table 2.6. Change Administrator Password Request Attributes
Attribute
Description
Required
adminPass
The administrator password.
Yes
Though Rackspace does not enforce complexity requirements for the password, the operating system
might. If the password is not complex enough, the
server might enter an ERROR state.
This operation does not return a response body.
Example 2.42. Change Administrator Password: JSON Request
{
"changePassword":
{
"adminPass": "Test1234"
}
}
Example 2.43. Change Administrator Password: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<changePassword
xmlns="http://docs.openstack.org/compute/api/v1.1"
adminPass="ss1293837$%^"/>
90
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.4.2. Reboot Server
Verb
URI
Action specified in request body
Description
POST
/servers/id/action
reboot
Performs a soft or hard reboot of the specified
server.
Normal Response Code: 202
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), buildInProgress (409),
overLimit (413), badMediaType (415), serviceUnavailable (503)
Status Transition:
ACTIVE (soft reboot)
ACTIVE
REBOOT
ACTIVE
HARD_REBOOT
ACTIVE (hard reboot)
This operation performs a soft or hard reboot of a specified server. A soft reboot is a graceful shutdown and restart of your server's operating system. A hard reboot power cycles
your server, which performs an immediate shutdown and restart.
Specify the server ID as id in the URI.
In the request body, specify the reboot action followed by the type attribute, as shown
in the following table:
Table 2.7. Reboot Server Request Attributes
Attribute
Description
Required
type
The type of reboot:
No. Default is
SOFT.
• SOFT. The operating system is signaled to restart,
which allows for a graceful shutdown and restart
of all processes.
• HARD. Power cycles your server, which performs
an immediate shutdown and restart.
This operation does not return a response body.
Example 2.44. Reboot Server: JSON Request
{
"reboot" : {
"type" : "HARD"
}
}
Example 2.45. Reboot Server: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<reboot
xmlns="http://docs.openstack.org/compute/api/v1.1"
type="HARD"/>
91
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.4.3. Rebuild Server
Verb
URI
Action specified in request body
Description
POST
/servers/id/action
rebuild
Rebuilds the specified server.
Normal Response Code: 202
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), buildInProgress (409),
overLimit (413), badMediaType (415), serverCapacityUnavailable (503), serviceUnavailable
(503)
Status Transition:
ACTIVE
REBUILD
ACTIVE
ACTIVE
REBUILD
ERROR (on error)
The rebuild operation removes all data on the server and replaces it with the specified image. The serverRef and all IP addresses remain the same. If you specify name, metadata, accessIPv4, or accessIPv6 in the rebuild request, new values replace existing values. Otherwise,
these values do not change.
Note
This operation is not available for OnMetal servers.
You can inject data into the file system during the rebuild.
Specify the server ID as id in the URI.
In the request body, specify the rebuild action followed by attributes. The following table describes the attributes that you can specify in the request body:
Table 2.8. Rebuild Server Request Attributes
Attribute
Description
Required
name
The new name for the server.
No
imageRef
The image ID. For a list of images, see Section 2.7.1,
“List Images” [124]
Yes
flavorRef
The flavor ID. For a list of flavors, see Section 2.6.1,
“List Flavors” [111].
Yes
accessIPv4
The IP version 4 address.
No
accessIPv6
The IP version 6 address.
No
adminPass
The administrator password for the new server being created.
No
metadata
A metadata key and value pair.
No
personality
The file path and file contents.
No
OSDCF:diskConfig
The disk configuration value.
No
Valid values are:
• AUTO. The server is built with a single partition
the size of the target flavor disk. The file system is
automatically adjusted to fit the entire partition.
This keeps things simple and automated. AUTO
is valid only for images and servers with a single
92
Next Generation Cloud Servers™
Dev Guide
Attribute
February 10, 2015
Description
API v2
Required
partition that use the EXT3 file system. This is the
default setting for applicable Rackspace base images.
• MANUAL. The server is built using whatever partition scheme and file system is in the source image.
If the target flavor disk is larger, the remaining
disk space is left unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions, and so on, and enables you to manage the
disk configuration.
See Section 3.1, “Disk Configuration Extension” [156].
This operation returns a response body. The full URL to the rebuilt server is returned in the
Location header.
93
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.46. Rebuild Server: JSON Request
{
"rebuild" : {
"name" : "new-server-test",
"imageRef" : "d42f821e-c2d1-4796-9f07-af5ed7912d0e",
"flavorRef" : "2",
"OS-DCF:diskConfig" : "AUTO",
"adminPass" : "diane123",
"metadata" : {
"My Server Name" : "Apache1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}
Example 2.47. Rebuild Server: JSON Response
{
"server": {
"OS-DCF:diskConfig": "AUTO",
"accessIPv4": "50.56.175.199",
"accessIPv6": "2001:4800:780e:0510:d87b:9cbc:ff04:35f7",
"addresses": {
"private": [
{
"addr": "10.180.12.68",
"version": 4
}
],
"public": [
{
"addr": "2001:4800:780e:0510:d87b:9cbc:ff04:35f7",
"version": 6
},
{
"addr": "50.56.175.199",
"version": 4
}
]
},
"adminPass": "diane123",
"config_drive": "",
"created": "2012-07-23T20:20:04Z",
"flavor": {
"id": "6",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/123456/flavors/6",
"rel": "bookmark"
}
]
},
"hostId": "791b847459d001f02f65f23ea82ae32c4b320ad34a3f892b7593c01f",
"id": "32406068-8539-40ab-bdd3-8140d30823ad",
"image": {
"id": "d42f821e-c2d1-4796-9f07-af5ed7912d0e",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/123456/images/d42f821ec2d1-4796-9f07-af5ed7912d0e",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/123456/servers/
32406068-8539-40ab-bdd3-8140d30823ad",
94
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/123456/servers/32406068-8539-40abbdd3-8140d30823ad",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"progress": 0,
"status": "REBUILD",
"tenant_id": "123456",
"updated": "2012-07-26T16:09:16Z",
"user_id": "170454"
}
}
95
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.48. Rebuild Server: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<rebuild xmlns="http://docs.openstack.org/compute/api/v1.1"
name="rebuilt-server"
imageRef="d6dd6c70-a122-4391-91a8-decb1a356549"
OS-DCF:diskConfig="AUTO"
adminPass="diane123">
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<personality>
<file path="/etc/banner.txt">
ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
b25zLiINCg0KLVJpY2hhcmQgQmFjaA== </file>
</personality>
</rebuild>
Example 2.49. Rebuild Server: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<server
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1"
status="REBUILD" updated="2012-07-26T16:15:58Z"
hostId="791b847459d001f02f65f23ea82ae32c4b320ad34a3f892b7593c01f"
name="rebuilt-server" created="2012-07-23T20:20:04Z"
userId="170454" tenantId="123456" accessIPv4="50.56.175.199"
accessIPv6="2001:4800:780e:0510:d87b:9cbc:ff04:35f7" progress="0"
id="32406068-8539-40ab-bdd3-8140d30823ad" adminPass="vSunWX8WkPB5"
OS-DCF:diskConfig="AUTO">
<image id="d6dd6c70-a122-4391-91a8-decb1a356549">
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/123456/images/d6dd6c70-a122-4391-91a8decb1a356549"
rel="bookmark"/>
</image>
<flavor id="6">
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/123456/flavors/6"
rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="public">
<ip version="6"
addr="2001:4800:780e:0510:d87b:9cbc:ff04:35f7"/>
<ip version="4" addr="50.56.175.199"/>
</network>
<network id="private">
<ip version="4" addr="10.180.12.68"/>
</network>
</addresses>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/123456/servers/32406068-8539-40abbdd3-8140d30823ad"
rel="self"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/123456/servers/32406068-8539-40abbdd3-8140d30823ad"
rel="bookmark"/>
</server>
96
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.4.4. Resize Server
Verb
URI
Action specified in request body
Description
POST
/servers/id/action
resize
Resizes the specified server.
Normal Response Code: 202
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
resizeNotAllowed (403), forbidden (403), itemNotFound (404), Method Not Allowed (405),
buildInProgress (409), overLimit (413), badMediaType (415), serverCapacityUnavailable
(503), serviceUnavailable (503)
Status Transition:
ACTIVE
RESIZE
VERIFY_RESIZE
ACTIVE
RESIZE
ACTIVE (on error)
This operation converts an existing Standard server to a different flavor, which scales the
server up or down. The original server is saved for a period of time to allow roll back if a
problem occurs. You should test and explicitly confirm all resizes. When you do so, the original server is removed. All resizes are automatically confirmed after 24 hours if you do not
explicitly confirm or revert the resize.
Note
This operation is not available for OnMetal servers.
Warning
Resize is only available for Standard flavors. If you have a Compute, Memory, or
IO flavor server, and you need to change the size of your data disk(s), you will
need to:
1. Image your system disk.
2. Back-up your data disk(s), using Cloud Backup or Cloud Block Storage.
3. Create a new server with the desired size and flavor class, using your image.
4. Add your backed-up data to the new data disk(s).
5. Delete the old server, once you are satisfied with the new server.
For General Purpose servers, use steps 1, 3, and 5 from the preceding list.
Specify the server ID as id in the URI.
In the request body, specify the resize action followed by attributes. The following table
describes the attributes that you can specify in the request body:
Table 2.9. Resize Server Request Attributes
Attribute
Description
Required
name
The name for the resized server.
Yes
97
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Attribute
Description
Required
flavorRef
The flavor ID. For a list of flavors, see Section 2.6.1,
“List Flavors” [111].
Yes
OSDCF:diskConfig
The disk configuration value.
No
Valid values are:
• AUTO: The server is built with a single partition the
size of the target flavor disk. The file system is automatically adjusted to fit the entire partition. This
keeps things simple and automated. AUTO is valid
only for images and servers with a single partition
that use the EXT3 file system. This is the default
setting for applicable Rackspace base images.
• MANUAL: The server is built using whatever partition scheme and file system is in the source image.
If the target flavor disk is larger, the remaining
disk space is left unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions, and so on, and enables you to manage the
disk configuration.
See Section 3.1, “Disk Configuration Extension” [156].
This operation does not return a response body.
Example 2.50. Resize Server: JSON Request
{
"resize" : {
"flavorRef" : "3"
}
}
Example 2.51. Resize Server: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<resize xmlns="http://docs.openstack.org/compute/api/v1.1"
flavorRef="3"/>
98
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.4.5. Confirm Resized Server
Verb
URI
Action specified in request body
Description
POST
/servers/id/action
confirmResize
Confirms a pending resize action.
Normal Response Code: 204
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
resizeNotAllowed (403), forbidden (403), itemNotFound (404), Method Not Allowed (405),
buildInProgress (409), overLimit (413), badMediaType (415), serverCapacityUnavailable
(503), serviceUnavailable (503)
Status Transition:
VERIFY_RESIZE
ACTIVE
VERIFY_RESIZE
ERROR (on error)
During a resize operation, the original server is saved for a period of time to allow roll back
if a problem occurs. After you verify that the newly resized server works properly, use this
operation to confirm the resize. After you confirm the resize, the original server is removed
and you cannot roll back to that server. All resizes are automatically confirmed after 24
hours if you do not explicitly confirm or revert the resize.
Note
This operation is not available for OnMetal servers.
Specify the server ID as id in the URI.
In the request body, specify the confirmResize action.
This operation does not return a response body.
Example 2.52. Confirm Resize: JSON Request
{
"confirmResize" : null
}
Example 2.53. Confirm Resize: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<confirmResize
xmlns="http://docs.openstack.org/compute/api/v1.1"/>
99
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.4.6. Revert Resized Server
Verb
URI
Action specified in request body
Description
POST
/servers/id/action
revertResize
Cancels and reverts a pending resize action.
Normal Response Code: 202
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
resizeNotAllowed (403), forbidden (403), itemNotFound (404), Method Not Allowed (405),
buildInProgress (409), overLimit (413), badMediaType (415), serverCapacityUnavailable
(503), serviceUnavailable (503)
Status Transition:
VERIFY_RESIZE
REVERT_RESIZE
ACTIVE
VERIFY_RESIZE
REVERT_RESIZE
ERROR (on error)
During a resize operation, the original server is saved for a period of time to allow for roll
back if a problem occurs. If you determine that a problem exists with a newly resized server, use this operation to revert the resize and roll back to the original server. All resizes are
automatically confirmed after 24 hours if you do not explicitly confirm or revert the resize.
Note
This operation is not available for OnMetal servers.
Specify the server ID as id in the URI.
In the request body, specify the revertResize action.
This operation does not return a response body.
Example 2.54. Revert Resize: JSON Request
{
"revertResize" : null
}
Example 2.55. Revert Resize: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<revertResize
xmlns="http://docs.openstack.org/compute/api/v1.1"/>
100
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.4.7. Rescue Server
Verb
URI
Action specified in request body
Description
POST
/servers/id/action
rescue
Places a server in rescue mode.
Normal Response Code: 200
Error Response Codes: cloudServersFault (400, 500), badRequest (400), unauthorized (401),
itemNotFound (404), rescueOrUnrescueProcessingInProgress (409), operationNotAllowed
(409), overLimit (413), badMediaType (415), serverCapacityUnavailable (503), serviceUnavailable (503)
Status Transition:
ACTIVE
PREP_RESCUE
RESCUE
Enter rescue mode to reboot a virtual machine (VM) in rescue mode so that you can access
the VM with a new root password and fix any file system and configuration errors.
Note
This operation is not available for OnMetal servers.
Enter rescue mode to debug system issues that prevent you from booting a server to a usable state.
When you place a server in rescue mode, the following events occur:
1. The VM is shut down.
2. A new VM is created with the following images attached:
• Primary image. Cleanly running VM based on the image from which the original server
was created, with a random password. This password is returned to you in a response
to issuing the rescue mode API call. Use this clean image to boot the server and fix any
problems.
• Secondary disk. Image of the VM that needs to be rescued.
When you put a server into rescue mode, you cannot use it until its status goes from ACTIVE to RESCUE. This does not happen immediately.
For a list of server status codes, see Server Status Values [57].
Note
The SSH server key will be different on the rescue image than your server.
A temporary root password is assigned for use during rescue mode. This password is returned in the response body for this call.
Rescue mode is limited to 90 minutes, after which the rescue image is destroyed and the
server attempts to reboot. You can exit rescue mode at any time.
This operation requires a request body.
101
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
This operation returns a response body.
Example 2.56. Rescue Server Request: JSON
{
"rescue" : "none"
}
Example 2.57. Rescue Server Response: JSON
{"adminPass": "m7UKdGiKFpqM"}
Example 2.58. Rescue Server Request: XML
<?xml version="1.0" encoding="UTF-8"?>
<rescue
xmlns="http://docs.openstack.org/compute/ext/rescue/api/v1.1"/>
Example 2.59. Rescue Server Response: XML
<adminPass>eBHcCgGBVj6Z</adminPass>
102
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.4.8. Unrescue Server
Verb
URI
Action specified in request body
Description
POST
/servers/id/action
unrescue
Takes a server out of rescue mode.
Normal Response Code: 202
Error Response Codes: cloudServersFault (400, 500), badRequest (400), unauthorized (401),
itemNotFound (404), rescueOrUnrescueProcessingInProgress (409), operationNotAllowed
(409), overLimit (413), badMediaType (415), serverCapacityUnavailable (503), serviceUnavailable (503)
Status Transition:
RESCUE
PREP_UNRESCUE
ACTIVE
After you resolve any problems and reboot a rescued server, you can unrescue the server.
Specify the unrescue action in the request body. When you unrescue the server, the repaired image is restored to its running state with your original password.
Note
This operation is not available for OnMetal servers.
You can exit rescue mode at any time.
This operation requires a request body.
This operation does not return a response body.
Example 2.60. Unrescue Server Request: JSON
{
"unrescue" : null
}
Example 2.61. Unrescue Server Request: XML
<?xml version="1.0" encoding="UTF-8"?>
<unrescue
xmlns="http://docs.rackspacecloud.com/servers/api/v1.1"/>
103
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.4.9. Create Image
Verb
URI
Action specified in request body
Description
POST
/servers/id/action
createImage
Creates a new image for a specified server.
Normal Response Code: 202
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
resizeNotAllowed (403), forbidden (403), itemNotFound (404), Method Not Allowed (405),
overLimit (413), backupOrResizeInProgress (409), buildInProgress (409), badMediaType
(415), serverCapacityUnavailable (503), serviceUnavailable (503)
Image Status Transition:
SAVING
ACTIVE
SAVING
ERROR (on error)
This operation creates a new image for a specified server. Once complete, a new image is
available that you can use to rebuild or create servers. The full URL to the newly created image is returned through the Location header. You can retrieve additional attributes for
the image including its creation status by issuing a subsequent GET on that URL. See Section 2.7.2, “Get Image Details” [142] for details.
Note
This operation is not available for OnMetal servers.
When you create an image, you can also specify custom image metadata. For details about
working with metadata, see Section 2.8, “Metadata” [147]. The maximum size of the
metadata key and value is 255 bytes each. You can query the maximum number of key-value pairs that you can specify per image through the maxImageMeta absolute limit. See
Section 1.9.3, “Get Limits” [26].
Warning
If you create an image of a Compute, Memory, or IO server, only the system
disk is captured. The data disks are not included in the image. To back up the
data disks, use Cloud Backup or Cloud Block Storage.
Specify the server ID as id in the URI.
In the request body, specify the createImage action followed by attributes. The following
table describes the attributes that you can specify in the request body:
Important
In addition to creating images manually, you may also schedule images of your
server automatically. See Section 3.5, “Scheduled Images Extension” [166] for
more information on this extension, including enabling and disabling scheduled
images and showing scheduled images.
Table 2.10. Create Image Request Attributes
Attribute
Description
Required
name
The name for the new image.
Yes
104
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Attribute
Description
Required
metadata
Key and value pairs for metadata.
No
This operation does not return a response body.
Note
Currently, image creation is an asynchronous operation, so coordinating the
creation with data quiescence, and so on, is currently not possible.
Example 2.62. Create Image: JSON Request
{
"createImage" : {
"name" : "new-image",
"metadata": {
"ImageType": "Gold",
"ImageVersion": "2.0"
}
}
}
Example 2.63. Create Image: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<createImage
xmlns="http://docs.openstack.org/compute/api/v1.1"
name="new-image">
<metadata>
<meta key="ImageType">Gold</meta>
<meta key="ImageVersion">2.0</meta>
</metadata>
</createImage>
105
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.5. Volume Attachment Actions
Use the following API extensions to attach volumes to servers and manage volume attachments:
Verb
URI
Description
POST
/servers/id/os-volume_attachments
Attaches a volume to the specified
server.
GET
/servers/id/os-volume_attachments
Lists the volume attachments for the
specified server.
GET
/servers/id/osvolume_attachments/
attachment_id
Lists volume details for the specified
volume attachment ID.
DELETE
/servers/id/osvolume_attachments/
attachment_id
Deletes the specified volume attachment from the specified server.
For information about creating and managing volumes, see Rackspace Cloud Block Storage
Developer Guide.
2.5.1. Attach Volume to Server
Verb
URI
Description
POST
/servers/id/osvolume_attachments
Attaches a volume to the specified
server.
Normal Response Code: 202
Error Response Codes: computeFault (400, 500, …), resizeNotAllowed (403), unauthorized
(401), forbidden (403), itemNotFound (404), badRequest (400), badMethod (405), backupOrResizeInProgress (409), buildInProgre (409), overLimit (413), badMediaType (415),
serverCapacityUnavailable (503), serviceUnavailable (503)
This operation attaches one or more volumes to the specified server.
For information about creating volumes, see Rackspace Cloud Block Storage Developer
Guide.
Specify the server ID as id in the URI.
This operation requires a request body.
The following table describes the attributes that you specify in the request body:
Table 2.11. Attach Volume Request Attributes
Attribute
Description
volumeId
The ID of the volume that you want to attach to the Yes
server instance.
Required
device
The name of the device, such as /dev/xvdb. Specify Yes
null for auto-assignment.
This operation returns a response body.
106
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 2.64. Attach Volume Request: JSON
{
"volumeAttachment":{
"device":null,
"volumeId":"4ab50df6-7480-45df-8604-b1ee39fe857c"
}
}
Example 2.65. Attach Volume Response: JSON
{
"volumeAttachment":{
"device":"/dev/xvdb",
"serverId":"76ddf257-2771-4097-aab8-b07b52110376",
"id":"4ab50df6-7480-45df-8604-b1ee39fe857c",
"volumeId":"4ab50df6-7480-45df-8604-b1ee39fe857c"
}
}
Example 2.66. Attach Volume Request: XML
<?xml version="1.0" encoding="UTF-8"?>
<volumeAttachment
xmlns="http://docs.openstack.org/compute/api/v1.1"
volumeId="4ab50df6-7480-45df-8604-b1ee39fe857c"
device="null"/>
Example 2.67. Attach Volume Response: XML
<?xml version='1.0' encoding='UTF-8'?>
<volumeAttachment device="/dev/xvdb"
serverId="76ddf257-2771-4097-aab8-b07b52110376"
id="4ab50df6-7480-45df-8604-b1ee39fe857c"
volumeId="4ab50df6-7480-45df-8604-b1ee39fe857c"/>
107
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.5.2. List Volume Attachments
Verb
URI
Description
GET
/servers/id/os-volume_attachments
Lists the volume attachments for the specified server.
Normal Response Codes: 200, 203, and 300
Error Response Codes: computeFault (400, 500, …), serviceUnavailable (503), unauthorized
(401), forbidden (403), badRequest (400), badMethod (405), overLimit (413)
This operation does not require a request body.
This operation returns a response body that lists the volume attachments for the specified
server.
For information about creating volumes, see Rackspace Cloud Block Storage Developer
Guide.
Specify the server ID as id in the URI.
The response body returns the attachment IDs for the attached volumes.
108
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
The following examples show JSON and XML response for this operation:
Example 2.68. List Volume Attachments Response: JSON
{
"volumeAttachments":[
{
"device":"/dev/xvdb",
"serverId":"76ddf257-2771-4097-aab8-b07b52110376",
"id":"4ab50df6-7480-45df-8604-b1ee39fe857c",
"volumeId":"4ab50df6-7480-45df-8604-b1ee39fe857c"
}
]
}
Example 2.69. List Volume Attachments Response: XML
<?xml version='1.0' encoding='UTF-8'?>
<volumeAttachments>
<volumeAttachment device="/dev/xvdb"
serverId="76ddf257-2771-4097-aab8-b07b52110376"
id="4ab50df6-7480-45df-8604-b1ee39fe857c"
volumeId="4ab50df6-7480-45df-8604-b1ee39fe857c"/>
</volumeAttachments>
2.5.3. Get Volume Attachment Details
Verb
URI
Description
GET
/servers/id/osvolume_attachments/
attachment_id
Lists volume details for the specified volume attachment ID.
Normal Response Codes: 200, 203, and 300
Error Response Codes: computeFault (400, 500, …), serviceUnavailable (503), unauthorized
(401), forbidden (403), badRequest (400), badMethod (405), overLimit (413), itemNotFound (404)
This operation returns the volume details of a specified volume attachment ID for a specified server.
For information about creating volumes, see Rackspace Cloud Block Storage Developer
Guide.
Specify the server ID as id and the volume attachment ID as attachment_ID in the URI.
This operation does not require a request body.
This operation returns a response body.
109
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.70. Get Volume Attachment Details Response: JSON
{
"volumeAttachment":{
"device":"/dev/xvdb",
"serverId":"76ddf257-2771-4097-aab8-b07b52110376",
"id":"4ab50df6-7480-45df-8604-b1ee39fe857c",
"volumeId":"4ab50df6-7480-45df-8604-b1ee39fe857c"
}
}
Example 2.71. Get Volume Attachment Details Response: XML
<?xml version='1.0' encoding='UTF-8'?>
<volumeAttachment device="/dev/xvdb"
serverId="76ddf257-2771-4097-aab8-b07b52110376"
id="4ab50df6-7480-45df-8604-b1ee39fe857c"
volumeId="4ab50df6-7480-45df-8604-b1ee39fe857c"/>
2.5.4. Delete Volume Attachment
Verb
URI
Description
DELETE
/servers/id/osvolume_attachments/
attachment_id
Deletes the specified volume attachment from
the specified server.
Normal Response Code: 202
Error Response Codes: computeFault (400, 500, …), serviceUnavailable (503), unauthorized
(401), forbidden (403), badRequest (400), badMethod (405), overLimit (413), itemNotFound (404), buildInProgress (409)
Status Transition:
ACTIVE
ERROR
DELETED
DELETED
This operation deletes a specified volume attachment from a specified server instance.
For information about creating and managing volumes, see Rackspace Cloud Block Storage
Developer Guide.
Specify the ID for the server as id in the URI.
Specify the volume attachment ID as attachment_id in the URI.
This operation does not require a request body.
This operation does not return a response body. A normal response code is 202.
110
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.6. Flavors
A flavor is a resource configuration for a server. Each flavor is a unique combination of disk,
memory, vCPUs, and network bandwidth.
Verb
URI
Description
GET
/flavors?minDisk=minDiskInGB&
minRam=minRamInMB&
marker=markerID& limit=int
Lists IDs, names, and links for all available flavors.
GET
/flavors/detail?minDisk=minDiskInGB&
minRam=minRamInMB&
marker=markerID& limit=int
Lists all details for all available flavors.
GET
/flavors/id
Lists details of the specified flavor.
2.6.1. List Flavors
Verb
URI
Description
GET
/flavors?minDisk=minDiskInGB&
minRam=minRamInMB&
marker=markerID& limit=int
Lists IDs, names, and links for all available flavors.
GET
/flavors/detail?minDisk=minDiskInGB&
minRam=minRamInMB&
marker=markerID& limit=int
Lists all details for all available flavors.
Normal Response Codes: 200 (successful) and 203 (successful - response cached)
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
This operation lists information for all available flavors.
To filter the list of flavors returned in the response body, you can specify the following optional URI parameters:
minDisk=minDiskInGB
Filters the list of flavors to those with the specified minimum
number of gigabytes of disk storage.
minRam=minRamInMB
Filters the list of flavors to those with the specified minimum
amount of RAM in megabytes.
marker=markerID
The ID of the last item in the previous list. See Section 1.6,
“Paginated Collections” [19].
limit=int
Sets the page size. See Section 1.6, “Paginated Collections” [19].
This operation does not require a request body.
This operation returns a response body.
111
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 2.72. List Flavors: JSON Response (detail)
{
"flavors": [
{
"id": "2",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/2",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/2",
"rel": "bookmark"
}
],
"name": "512MB Standard Instance"
},
{
"id": "3",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/3",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/3",
"rel": "bookmark"
}
],
"name": "1GB Standard Instance"
},
{
"id": "4",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/4",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/4",
"rel": "bookmark"
}
],
"name": "2GB Standard Instance"
},
{
"id": "5",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/5",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/5",
"rel": "bookmark"
}
],
"name": "4GB Standard Instance"
},
{
"id": "6",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/6",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/6",
"rel": "bookmark"
}
],
"name": "8GB Standard Instance"
},
{
"id": "7",
"links": [
{
112
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/7",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/7",
"rel": "bookmark"
}
],
"name": "15GB Standard Instance"
},
{
"id": "8",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/8",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/8",
"rel": "bookmark"
}
],
"name": "30GB Standard Instance"
},
{
"id": "compute1-15",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
compute1-15",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/compute1-15",
"rel": "bookmark"
}
],
"name": "15 GB Compute v1"
},
{
"id": "compute1-30",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
compute1-30",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/compute1-30",
"rel": "bookmark"
}
],
"name": "30 GB Compute v1"
},
{
"id": "compute1-4",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/compute1-4",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/compute1-4",
"rel": "bookmark"
}
],
"name": "4 GB Compute v1"
},
{
"id": "compute1-60",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
compute1-60",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/compute1-60",
"rel": "bookmark"
113
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
}
],
"name": "60 GB Compute v1"
},
{
"id": "compute1-8",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/compute1-8",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/compute1-8",
"rel": "bookmark"
}
],
"name": "8 GB Compute v1"
},
{
"id": "general1-1",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/general1-1",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/general1-1",
"rel": "bookmark"
}
],
"name": "1 GB General Purpose v1"
},
{
"id": "general1-2",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/general1-2",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/general1-2",
"rel": "bookmark"
}
],
"name": "2 GB General Purpose v1"
},
{
"id": "general1-4",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/general1-4",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/general1-4",
"rel": "bookmark"
}
],
"name": "4 GB General Purpose v1"
},
{
"id": "general1-8",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/general1-8",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/general1-8",
"rel": "bookmark"
}
],
"name": "8 GB General Purpose v1"
},
{
"id": "io1-120",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/io1-120",
114
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/io1-120",
"rel": "bookmark"
}
],
"name": "120 GB I/O v1"
},
{
"id": "io1-15",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/io1-15",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/io1-15",
"rel": "bookmark"
}
],
"name": "15 GB I/O v1"
},
{
"id": "io1-30",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/io1-30",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/io1-30",
"rel": "bookmark"
}
],
"name": "30 GB I/O v1"
},
{
"id": "io1-60",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/io1-60",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/io1-60",
"rel": "bookmark"
}
],
"name": "60 GB I/O v1"
},
{
"id": "io1-90",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/io1-90",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/io1-90",
"rel": "bookmark"
}
],
"name": "90 GB I/O v1"
},
{
"id": "memory1-120",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
memory1-120",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/memory1-120",
"rel": "bookmark"
}
],
"name": "120 GB Memory v1"
115
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
},
{
"id": "memory1-15",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/memory1-15",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/memory1-15",
"rel": "bookmark"
}
],
"name": "15 GB Memory v1"
},
{
"id": "memory1-240",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
memory1-240",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/memory1-240",
"rel": "bookmark"
}
],
"name": "240 GB Memory v1"
},
{
"id": "memory1-30",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/memory1-30",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/memory1-30",
"rel": "bookmark"
}
],
"name": "30 GB Memory v1"
},
{
"id": "memory1-60",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/memory1-60",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/memory1-60",
"rel": "bookmark"
}
],
"name": "60 GB Memory v1"
},
{
"id": "performance1-1",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
performance1-1",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/
performance1-1",
"rel": "bookmark"
}
],
"name": "1 GB Performance"
},
{
"id": "performance1-2",
"links": [
{
116
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
performance1-2",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/
performance1-2",
"rel": "bookmark"
}
],
"name": "2 GB Performance"
},
{
"id": "performance1-4",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
performance1-4",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/
performance1-4",
"rel": "bookmark"
}
],
"name": "4 GB Performance"
},
{
"id": "performance1-8",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
performance1-8",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/
performance1-8",
"rel": "bookmark"
}
],
"name": "8 GB Performance"
},
{
"id": "performance2-120",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
performance2-120",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/
performance2-120",
"rel": "bookmark"
}
],
"name": "120 GB Performance"
},
{
"id": "performance2-15",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
performance2-15",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/
performance2-15",
"rel": "bookmark"
}
],
"name": "15 GB Performance"
},
{
"id": "performance2-30",
"links": [
117
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
performance2-30",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/
performance2-30",
"rel": "bookmark"
}
],
"name": "30 GB Performance"
},
{
"id": "performance2-60",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
performance2-60",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/
performance2-60",
"rel": "bookmark"
}
],
"name": "60 GB Performance"
},
{
"id": "performance2-90",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/453265/flavors/
performance2-90",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/453265/flavors/
performance2-90",
"rel": "bookmark"
}
],
"name": "90 GB Performance"
}
]
}
Example 2.73. List Flavors: XML Response (detail)
<?xml version='1.0' encoding='UTF-8'?>
<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<flavor name="512MB Standard Instance" id="2">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/2" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/2" rel="bookmark"/>
</flavor>
<flavor name="1GB Standard Instance" id="3">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/3" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/3" rel="bookmark"/>
</flavor>
<flavor name="2GB Standard Instance" id="4">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/4" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/4" rel="bookmark"/>
</flavor>
<flavor name="4GB Standard Instance" id="5">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/5" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/5" rel="bookmark"/>
</flavor>
<flavor name="8GB Standard Instance" id="6">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/6" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/6" rel="bookmark"/>
</flavor>
<flavor name="15GB Standard Instance" id="7">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/7" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/7" rel="bookmark"/>
</flavor>
<flavor name="30GB Standard Instance" id="8">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/8" rel="self"/>
118
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/8" rel="bookmark"/>
</flavor>
<flavor name="15 GB Compute v1" id="compute1-15">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/compute1-15" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/compute1-15" rel=
"bookmark"/>
</flavor>
<flavor name="30 GB Compute v1" id="compute1-30">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/compute1-30" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/compute1-30" rel=
"bookmark"/>
</flavor>
<flavor name="4 GB Compute v1" id="compute1-4">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/compute1-4" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/compute1-4" rel=
"bookmark"/>
</flavor>
<flavor name="60 GB Compute v1" id="compute1-60">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/compute1-60" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/compute1-60" rel=
"bookmark"/>
</flavor>
<flavor name="8 GB Compute v1" id="compute1-8">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/compute1-8" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/compute1-8" rel=
"bookmark"/>
</flavor>
<flavor name="1 GB General Purpose v1" id="general1-1">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/general1-1" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/general1-1" rel=
"bookmark"/>
</flavor>
<flavor name="2 GB General Purpose v1" id="general1-2">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/general1-2" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/general1-2" rel=
"bookmark"/>
</flavor>
<flavor name="4 GB General Purpose v1" id="general1-4">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/general1-4" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/general1-4" rel=
"bookmark"/>
</flavor>
<flavor name="8 GB General Purpose v1" id="general1-8">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/general1-8" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/general1-8" rel=
"bookmark"/>
</flavor>
<flavor name="120 GB I/O v1" id="io1-120">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/io1-120" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/io1-120" rel="bookmark"/>
</flavor>
<flavor name="15 GB I/O v1" id="io1-15">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/io1-15" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/io1-15" rel="bookmark"/>
</flavor>
<flavor name="30 GB I/O v1" id="io1-30">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/io1-30" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/io1-30" rel="bookmark"/>
</flavor>
<flavor name="60 GB I/O v1" id="io1-60">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/io1-60" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/io1-60" rel="bookmark"/>
</flavor>
<flavor name="90 GB I/O v1" id="io1-90">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/io1-90" rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/io1-90" rel="bookmark"/>
</flavor>
<flavor name="120 GB Memory v1" id="memory1-120">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/memory1-120" rel=
"self"/>
119
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/memory1-120" rel=
"bookmark"/>
</flavor>
<flavor name="15 GB Memory v1" id="memory1-15">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/memory1-15" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/memory1-15" rel=
"bookmark"/>
</flavor>
<flavor name="240 GB Memory v1" id="memory1-240">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/memory1-240" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/memory1-240" rel=
"bookmark"/>
</flavor>
<flavor name="30 GB Memory v1" id="memory1-30">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/memory1-30" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/memory1-30" rel=
"bookmark"/>
</flavor>
<flavor name="60 GB Memory v1" id="memory1-60">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/memory1-60" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/memory1-60" rel=
"bookmark"/>
</flavor>
<flavor name="1 GB Performance" id="performance1-1">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/performance1-1" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/performance1-1" rel=
"bookmark"/>
</flavor>
<flavor name="2 GB Performance" id="performance1-2">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/performance1-2" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/performance1-2" rel=
"bookmark"/>
</flavor>
<flavor name="4 GB Performance" id="performance1-4">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/performance1-4" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/performance1-4" rel=
"bookmark"/>
</flavor>
<flavor name="8 GB Performance" id="performance1-8">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/performance1-8" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/performance1-8" rel=
"bookmark"/>
</flavor>
<flavor name="120 GB Performance" id="performance2-120">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/performance2-120" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/performance2-120" rel=
"bookmark"/>
</flavor>
<flavor name="15 GB Performance" id="performance2-15">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/performance2-15" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/performance2-15" rel=
"bookmark"/>
</flavor>
<flavor name="30 GB Performance" id="performance2-30">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/performance2-30" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/performance2-30" rel=
"bookmark"/>
</flavor>
<flavor name="60 GB Performance" id="performance2-60">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/performance2-60" rel=
"self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/performance2-60" rel=
"bookmark"/>
</flavor>
<flavor name="90 GB Performance" id="performance2-90">
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/820712/flavors/performance2-90" rel=
"self"/>
120
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<atom:link href="https://dfw.servers.api.rackspacecloud.com/820712/flavors/performance2-90" rel=
"bookmark"/>
</flavor>
</flavors>
121
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.6.2. Get Flavor Details
Verb
URI
Description
GET
/flavors/id
Lists details of the specified flavor.
Normal Response Codes: 200 and 203
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
Specify the flavor ID as id in the URI.
This operation does not require a request body.
This operation returns details of the specified flavor in the response body.
Example 2.74. Get Flavor Details - Compute: JSON Response
{
"flavor":
{
"name": "512MB Standard",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/010101/flavors/2",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/010101/flavors/2",
"rel": "bookmark"
}
],
"ram": 512,
"vcpus": 1,
"swap": 512,
"rxtx_factor": 80,
"OS-FLV-EXT-DATA:ephemeral": 0,
"disk": 20,
"id": "2"
}
}
122
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.75. Get Flavor Details - Compute: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<flavor disk="20" vcpus="1" ram="512" name="512MB Standard" id="2"
swap="512" rxtx_factor="80.0" OS-FLV-EXT-DATA:ephemeral="0">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/010101/flavors/2"
rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/010101/flavors/2"
rel="bookmark"/>
</flavor>
Example 2.76. Get Flavor Details - OnMetal: JSON Response
{
"flavor": {
"OS-FLV-EXT-DATA:ephemeral": 3200,
"OS-FLV-WITH-EXT-SPECS:extra_specs": {
"class": "onmetal",
"policy_class": "onmetal_flavor",
"quota_resources": "instances=onmetal-io-v1-instances,ram=onmetal-io-v1-ram"
},
"disk": 32,
"id": "onmetal-io1",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/flavors/onmetal-io1",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/flavors/onmetal-io1",
"rel": "bookmark"
}
],
"name": "OnMetal I/O v1",
"ram": 131072,
"rxtx_factor": 20000.0,
"swap": "",
"vcpus": 40
}
}
Example 2.77. Get Flavor Details - OnMetal: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<flavor xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1"
xmlns:OS-FLV-WITH-EXT-SPECS="http://docs.openstack.org/compute/ext/flavor_with_extra_specs/api/v2.0"
xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="32"
vcpus="40" ram="131072" name="OnMetal I/O v1" id="onmetal-io1" swap="" rxtx_factor="20000.0" OS-FLVEXT-DATA:ephemeral="3200">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/flavors/onmetal-io1" rel=
"self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/flavors/onmetal-io1" rel=
"bookmark"/>
<OS-FLV-WITH-EXT-SPECS:extra_specs>
<quota_resources>instances=onmetal-io-v1-instances,ram=onmetal-io-v1-ram</quota_resources>
<class>onmetal</class>
<policy_class>onmetal_flavor</policy_class>
</OS-FLV-WITH-EXT-SPECS:extra_specs>
</flavor>
123
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.7. Images
An image is a collection of files for a specific operating system (OS) that you use to create
or rebuild a server. Rackspace provides prebuilt images.
You can also create custom images from servers that you have launched, by using server action Section 2.4.9, “Create Image” [104]. You can use custom images for data backups or as
"gold" images for provisioning additional servers.
Important
In addition to creating images manually, you can also schedule images of your
server automatically. See Section 3.5, “Scheduled Images Extension” [166] for
more information about this extension, including enabling and disabling scheduled images and showing scheduled images.
With standard servers, the entire disk (O/S and data) is captured in the image. With Compute, Memory, and IO servers, only the system disk is captured in the image. The data disks
should be backed up using Cloud Backup or Cloud Block Storage to ensure availability in
case you need to rebuild or restore a server.
Verb
URI
Description
GET
/images?server=serverRef&
name=imageName&
status=imageStatus&
changes-since=dateTime&
marker=markerID& limit=int&
type=(BASE|SNAPSHOT)
Lists IDs, names, and links for all available images.
GET
/images/detail?server=serverRef&
name=imageName&
status=imageStatus&
changes-since=dateTime&
marker=markerID& limit=int&
type=(BASE|SNAPSHOT)
List all details for all available images.
GET
/images/id
Lists details of the specified image.
DELETE
/images/id
Deletes the specified image.
2.7.1. List Images
Verb
URI
Description
GET
/images?server=serverRef&
name=imageName&
status=imageStatus&
changes-since=dateTime&
marker=markerID& limit=int&
type=(BASE|SNAPSHOT)
Lists IDs, names, and links for all available images.
GET
/images/detail?server=serverRef&
name=imageName&
status=imageStatus&
changes-since=dateTime&
marker=markerID& limit=int&
type=(BASE|SNAPSHOT)
List all details for all available images.
Normal Response Codes: 200 and 203
124
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
This operation lists all images visible by the account.
To filter the list of images returned in the response body, you can specify the following optional URI parameters:
server=serverRef&
Filters the list of images by server. Specify the server reference by ID or by full URL.
name=imageName&
Filters the list of images by image name.
status=imageStatus&
Filters the list of images by status. In-flight images have a
status of SAVING and the conditional progress element
contains a value from 0 to 100, which indicates the percentage completion. Other possible values for the status
attribute include ACTIVE, DELETED, ERROR, SAVING,
and UNKNOWN. Images with an ACTIVE status are available for use.
changes-since=dateTime&
Filters the list of images to those that have changed since
the changes-since time. See Section 1.7, “Efficient Polling
with the Changes-Since Parameter” [22].
marker=markerID&
The ID of the last item in the previous list. See Section 1.6,
“Paginated Collections” [19].
limit=int
Sets the page size. See Section 1.6, “Paginated Collections” [19].
type={BASE|SNAPSHOT}
Filters base Rackspace images or any custom server images that you have created.
This operation does not require a request body.
The optional minDisk and minRam attributes set the minimum disk and RAM required to
create a server with the image.
This operation returns a response body. The image_type field in the response indicates
whether the image is built-in (base) or custom (snapshot).
Example 2.78. List Images: JSON Response (detail)
Note
The response returns an array of images. For brevity, the following sample response shows only one image in the array.
{
"images":
[
{
"status": "ACTIVE",
"updated": "2014-03-26T14:05:59Z",
"links":
[
125
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/661145/images/6110edfe-8589-4bb1aa27-385f12242627",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/661145/images/6110edfe-8589-4bb1aa27-385f12242627",
"rel": "bookmark"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/661145/images/6110edfe-8589-4bb1aa27-385f12242627",
"type": "application/vnd.openstack.image",
"rel": "alternate"
}
],
"OS-DCF:diskConfig": "MANUAL",
"id": "6110edfe-8589-4bb1-aa27-385f12242627",
"OS-EXT-IMG-SIZE:size": 689810519,
"name": "Ubuntu 13.10 (Saucy Salamander) (PVHVM)",
"created": "2014-03-25T17:00:15Z",
"minDisk": 20,
"progress": 100,
"minRam": 512,
"metadata":
{
"vm_mode": "hvm",
"os_distro": "ubuntu",
"com.rackspace__1__visible_core": "1",
"com.rackspace__1__release_id": "1006",
"com.rackspace__1__options": "0",
"image_type": "base",
"cache_in_nova": "True",
"com.rackspace__1__source": "kickstart",
"org.openstack__1__os_distro": "com.ubuntu",
"com.rackspace__1__release_build_date": "2014-03-25_11-38-40",
"os_type": "linux",
"auto_disk_config": "disabled",
"com.rackspace__1__release_version": "3",
"com.rackspace__1__platform_target": "PublicCloud",
"com.rackspace__1__visible_rackconnect": "1",
"com.rackspace__1__build_rackconnect": "1",
"com.rackspace__1__visible_managed": "1",
"com.rackspace__1__build_core": "1",
"org.openstack__1__os_version": "13.10",
"org.openstack__1__architecture": "x64",
"com.rackspace__1__build_managed": "1"
}
}
]
}
126
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.79. List Images: XML Response (detail)
Note
The response returns an array of images. For brevity, the following sample response shows only one image in the array.
<?xml version='1.0' encoding='UTF-8'?>
<images xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:OS-EXT-IMG-SIZE="http://docs.openstack.org/compute/ext/image_size/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<image status="ACTIVE" updated="2014-03-26T14:05:59Z" name="Ubuntu 13.10 (Saucy Salamander) (PVHVM)"
created="2014-03-25T17:00:15Z" minDisk="20" progress="100" minRam="512" id="6110edfe-8589-4bb1aa27-385f12242627"
OS-EXT-IMG-SIZE:size="689810519" OS-DCF:diskConfig="MANUAL">
<metadata>
<meta key="vm_mode">hvm</meta>
<meta key="os_distro">ubuntu</meta>
<meta key="com.rackspace__1__visible_core">1</meta>
<meta key="com.rackspace__1__release_id">1006</meta>
<meta key="com.rackspace__1__options">0</meta>
<meta key="image_type">base</meta>
<meta key="cache_in_nova">True</meta>
<meta key="com.rackspace__1__source">kickstart</meta>
<meta key="org.openstack__1__os_distro">com.ubuntu</meta>
<meta key="com.rackspace__1__release_build_date">2014-03-25_11-38-40</meta>
<meta key="os_type">linux</meta>
<meta key="auto_disk_config">disabled</meta>
<meta key="com.rackspace__1__release_version">3</meta>
<meta key="com.rackspace__1__platform_target">PublicCloud</meta>
<meta key="com.rackspace__1__visible_rackconnect">1</meta>
<meta key="com.rackspace__1__build_rackconnect">1</meta>
<meta key="com.rackspace__1__visible_managed">1</meta>
<meta key="com.rackspace__1__build_core">1</meta>
<meta key="org.openstack__1__os_version">13.10</meta>
<meta key="org.openstack__1__architecture">x64</meta>
<meta key="com.rackspace__1__build_managed">1</meta>
</metadata>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/v2/661145/images/6110edfe-8589-4bb1aa27-385f12242627"
rel="self"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/661145/images/6110edfe-8589-4bb1-aa27-385f12242627"
rel="bookmark"/>
<atom:link href="https://dfw.servers.api.rackspacecloud.com/661145/images/6110edfe-8589-4bb1-aa27-385f12242627"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
</images>
Example 2.80. List Images: JSON Response
{
"images": [
{
"id": "f0d3b38b-61e3-47c4-83c7-98c4e7038809",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
f0d3b38b-61e3-47c4-83c7-98c4e7038809",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
f0d3b38b-61e3-47c4-83c7-98c4e7038809",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
f0d3b38b-61e3-47c4-83c7-98c4e7038809",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "CentOS 7 (PVHVM)"
},
{
"id": "2b3df7d6-916b-4df1-b537-bdde7d2ee3a5",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/2b3df7d6-916b-4df1-b537bdde7d2ee3a5",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/2b3df7d6-916b-4df1-b537bdde7d2ee3a5",
"rel": "bookmark"
},
127
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/2b3df7d6-916b-4df1-b537bdde7d2ee3a5",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Gentoo 14.3 (PVHVM)"
},
{
"id": "7649490f-217c-42ae-87ef-04cb311632dd",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
7649490f-217c-42ae-87ef-04cb311632dd",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
7649490f-217c-42ae-87ef-04cb311632dd",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
7649490f-217c-42ae-87ef-04cb311632dd",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Arch 2014.7 (PVHVM)"
},
{
"id": "d22ea57e-e12e-4a0a-ad6b-680dd676fd7c",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/d22ea57e-e12e-4a0aad6b-680dd676fd7c",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/d22ea57e-e12e-4a0aad6b-680dd676fd7c",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/d22ea57e-e12e-4a0aad6b-680dd676fd7c",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "OnMetal - Debian 7 (Wheezy)"
},
{
"id": "d774f891-45d5-4880-823d-126d3cdbe090",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
d774f891-45d5-4880-823d-126d3cdbe090",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
d774f891-45d5-4880-823d-126d3cdbe090",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
d774f891-45d5-4880-823d-126d3cdbe090",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "OnMetal - CoreOS (Alpha)"
},
{
"id": "0719ab33-5de0-496a-9f37-a56c7192d319",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/0719ab33-5de0-496a-9f37a56c7192d319",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/0719ab33-5de0-496a-9f37a56c7192d319",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/0719ab33-5de0-496a-9f37a56c7192d319",
"rel": "alternate",
"type": "application/vnd.openstack.image"
128
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
}
],
"name": "OnMetal - Debian Unstable (Sid)"
},
{
"id": "bc5afff1-1d0c-4cc5-ba7b-01c0a74c2fbd",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/bc5afff1-1d0c-4cc5ba7b-01c0a74c2fbd",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/bc5afff1-1d0c-4cc5ba7b-01c0a74c2fbd",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/bc5afff1-1d0c-4cc5ba7b-01c0a74c2fbd",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "OnMetal - Debian Testing (Jessie)"
},
{
"id": "547a46bd-d913-4bf7-ac35-2f24f25f1b7a",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/547a46bd-d913-4bf7ac35-2f24f25f1b7a",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/547a46bd-d913-4bf7ac35-2f24f25f1b7a",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/547a46bd-d913-4bf7ac35-2f24f25f1b7a",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "CoreOS (Beta)"
},
{
"id": "afb5ee19-4e6e-42c3-841c-9663e99b83ba",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
afb5ee19-4e6e-42c3-841c-9663e99b83ba",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
afb5ee19-4e6e-42c3-841c-9663e99b83ba",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
afb5ee19-4e6e-42c3-841c-9663e99b83ba",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "CoreOS (Alpha)"
},
{
"id": "32104f95-a005-4165-b147-6ed9a3702642",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/32104f95-a005-4165b147-6ed9a3702642",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/32104f95-a005-4165b147-6ed9a3702642",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/32104f95-a005-4165b147-6ed9a3702642",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2008 R2 SP1 + SQL Server 2012 SP1 Web"
},
{
129
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"id": "64f5a683-1666-404b-9b17-6dd31fa6e0ba",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
64f5a683-1666-404b-9b17-6dd31fa6e0ba",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
64f5a683-1666-404b-9b17-6dd31fa6e0ba",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
64f5a683-1666-404b-9b17-6dd31fa6e0ba",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2008 R2 SP1 + SQL Server 2008 R2 SP2 Standard"
},
{
"id": "55a24191-d3f5-46a3-af5f-50c700868092",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/55a24191-d3f5-46a3af5f-50c700868092",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/55a24191-d3f5-46a3af5f-50c700868092",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/55a24191-d3f5-46a3af5f-50c700868092",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2012 + SQL Server 2012 SP1 Web"
},
{
"id": "dee79074-3b3e-4f9a-bc16-d09d26fd0cb4",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/dee79074-3b3e-4f9a-bc16d09d26fd0cb4",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/dee79074-3b3e-4f9a-bc16d09d26fd0cb4",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/dee79074-3b3e-4f9a-bc16d09d26fd0cb4",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2008 R2 SP1 + SQL Server 2012 SP1 Standard"
},
{
"id": "d6b2c1f6-5160-4cad-a7e1-aa698528f393",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/d6b2c1f6-5160-4cad-a7e1aa698528f393",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/d6b2c1f6-5160-4cad-a7e1aa698528f393",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/d6b2c1f6-5160-4cad-a7e1aa698528f393",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2012 + SQL Server 2012 SP1 Standard"
},
{
"id": "99524d0a-23ba-41d0-8155-1eae777d4b91",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
99524d0a-23ba-41d0-8155-1eae777d4b91",
130
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
99524d0a-23ba-41d0-8155-1eae777d4b91",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
99524d0a-23ba-41d0-8155-1eae777d4b91",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2012"
},
{
"id": "c6ea75ea-afba-4d74-ae57-313aa641ceb1",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/c6ea75ea-afba-4d74ae57-313aa641ceb1",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/c6ea75ea-afba-4d74ae57-313aa641ceb1",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/c6ea75ea-afba-4d74ae57-313aa641ceb1",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2008 R2 SP1 + SharePoint 2010 Foundation with SQL Server 2008 R2 SP1 Standard"
},
{
"id": "446ee423-3ad4-415c-bf96-ede80d9f21d1",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/446ee423-3ad4-415c-bf96ede80d9f21d1",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/446ee423-3ad4-415c-bf96ede80d9f21d1",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/446ee423-3ad4-415c-bf96ede80d9f21d1",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2008 R2 SP1 + SharePoint 2010 Foundation with SQL Server 2008 R2 Express"
},
{
"id": "5596255c-e9ae-48da-866c-9bbdd345ed39",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/5596255ce9ae-48da-866c-9bbdd345ed39",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/5596255ce9ae-48da-866c-9bbdd345ed39",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/5596255ce9ae-48da-866c-9bbdd345ed39",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Fedora 20 (Heisenbug) (PVHVM)"
},
{
"id": "4530bc02-1976-4685-8b75-19dce4e7a48e",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
4530bc02-1976-4685-8b75-19dce4e7a48e",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
4530bc02-1976-4685-8b75-19dce4e7a48e",
131
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
4530bc02-1976-4685-8b75-19dce4e7a48e",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2012 + SharePoint 2013 with SQL Server 2012 SP1 Standard"
},
{
"id": "9c7dbd5e-d40b-453e-8950-3990e6ca71ee",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/9c7dbd5ed40b-453e-8950-3990e6ca71ee",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/9c7dbd5ed40b-453e-8950-3990e6ca71ee",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/9c7dbd5ed40b-453e-8950-3990e6ca71ee",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "OpenSUSE 13.1 (PVHVM)"
},
{
"id": "e1584627-07d5-4fe1-a34d-83718ae1c0e6",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/e1584627-07d5-4fe1a34d-83718ae1c0e6",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/e1584627-07d5-4fe1a34d-83718ae1c0e6",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/e1584627-07d5-4fe1a34d-83718ae1c0e6",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2008 R2 SP1 + SQL Server 2008 R2 SP2 Web"
},
{
"id": "85d61cda-6923-478e-9f78-1e63bb34183f",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
85d61cda-6923-478e-9f78-1e63bb34183f",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
85d61cda-6923-478e-9f78-1e63bb34183f",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
85d61cda-6923-478e-9f78-1e63bb34183f",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2008 R2 SP1"
},
{
"id": "e5d7ca78-a487-4d7e-9dd1-73165df3f9fd",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/e5d7ca78a487-4d7e-9dd1-73165df3f9fd",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/e5d7ca78a487-4d7e-9dd1-73165df3f9fd",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/e5d7ca78a487-4d7e-9dd1-73165df3f9fd",
132
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "FreeBSD 10.0"
},
{
"id": "5cc098a5-7286-4b96-b3a2-49f4c4f82537",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/5cc098a5-7286-4b96b3a2-49f4c4f82537",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/5cc098a5-7286-4b96b3a2-49f4c4f82537",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/5cc098a5-7286-4b96b3a2-49f4c4f82537",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Ubuntu 14.04 LTS (Trusty Tahr)"
},
{
"id": "bb02b1a3-bc77-4d17-ab5b-421d89850fca",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/bb02b1a3-bc77-4d17ab5b-421d89850fca",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/bb02b1a3-bc77-4d17ab5b-421d89850fca",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/bb02b1a3-bc77-4d17ab5b-421d89850fca",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)"
},
{
"id": "dbb59b04-bd50-4eef-b05e-6a6451ef9bf2",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/dbb59b04-bd50-4eefb05e-6a6451ef9bf2",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/dbb59b04-bd50-4eefb05e-6a6451ef9bf2",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/dbb59b04-bd50-4eefb05e-6a6451ef9bf2",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Scientific Linux 6.5 (PVHVM)"
},
{
"id": "ffa476b1-9b14-46bd-99a8-862d1d94eb7a",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
ffa476b1-9b14-46bd-99a8-862d1d94eb7a",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
ffa476b1-9b14-46bd-99a8-862d1d94eb7a",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
ffa476b1-9b14-46bd-99a8-862d1d94eb7a",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Ubuntu 12.04 LTS (Precise Pangolin)"
133
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
},
{
"id": "042395fc-728c-4763-86f9-9b0cacb00701",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
042395fc-728c-4763-86f9-9b0cacb00701",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
042395fc-728c-4763-86f9-9b0cacb00701",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
042395fc-728c-4763-86f9-9b0cacb00701",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "CentOS 6.5"
},
{
"id": "4b81c45a-90d6-4654-972c-73972b1d0aea",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/
4b81c45a-90d6-4654-972c-73972b1d0aea",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
4b81c45a-90d6-4654-972c-73972b1d0aea",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/
4b81c45a-90d6-4654-972c-73972b1d0aea",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Fedora 19 (Schrodinger's Cat) (PVHVM)"
},
{
"id": "271e1090-77ad-4400-a1f7-73a922aca8e2",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/271e1090-77ad-4400a1f7-73a922aca8e2",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/271e1090-77ad-4400a1f7-73a922aca8e2",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/271e1090-77ad-4400a1f7-73a922aca8e2",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Red Hat Enterprise Linux 6.5 (PVHVM)"
},
{
"id": "d1b6eba3-aece-407c-8ef3-4488b452336b",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/d1b6eba3aece-407c-8ef3-4488b452336b",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/d1b6eba3aece-407c-8ef3-4488b452336b",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/d1b6eba3aece-407c-8ef3-4488b452336b",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Red Hat Enterprise Linux 6.5"
},
{
"id": "592c879e-f37d-43e6-8b54-8c2d97cf04d4",
"links": [
{
134
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/592c879ef37d-43e6-8b54-8c2d97cf04d4",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/592c879ef37d-43e6-8b54-8c2d97cf04d4",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/592c879ef37d-43e6-8b54-8c2d97cf04d4",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "CentOS 6.5 (PVHVM)"
},
{
"id": "77e32de8-3304-44f3-b230-436d95fceb19",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/77e32de8-3304-44f3b230-436d95fceb19",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/77e32de8-3304-44f3b230-436d95fceb19",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/77e32de8-3304-44f3b230-436d95fceb19",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Debian 7 (Wheezy) (PVHVM)"
},
{
"id": "a4286a42-137c-46ce-a796-dbd2b12a078c",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/a4286a42-137c-46ce-a796dbd2b12a078c",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/a4286a42-137c-46ce-a796dbd2b12a078c",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/a4286a42-137c-46ce-a796dbd2b12a078c",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Ubuntu 12.04 LTS (Precise Pangolin) (PVHVM)"
},
{
"id": "75aa3ade-6b87-44bb-b465-55063cfb71f6",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/75aa3ade-6b87-44bbb465-55063cfb71f6",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/75aa3ade-6b87-44bbb465-55063cfb71f6",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/75aa3ade-6b87-44bbb465-55063cfb71f6",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Debian Unstable (Sid) (PVHVM)"
},
{
"id": "1cc4795a-d86e-460f-8c69-ba737ea80b17",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/1cc4795a-d86e-460f-8c69ba737ea80b17",
"rel": "self"
},
{
135
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/1cc4795a-d86e-460f-8c69ba737ea80b17",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/1cc4795a-d86e-460f-8c69ba737ea80b17",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Debian Testing (Jessie) (PVHVM)"
},
{
"id": "c30b4407-da75-4291-a1fb-edd8e6e037de",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/c30b4407-da75-4291-a1fbedd8e6e037de",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/c30b4407-da75-4291-a1fbedd8e6e037de",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/c30b4407-da75-4291-a1fbedd8e6e037de",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2012 (base install without updates)"
},
{
"id": "2d4ee06e-d567-47f8-b745-8d281fe5729a",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/2d4ee06e-d567-47f8b745-8d281fe5729a",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/2d4ee06e-d567-47f8b745-8d281fe5729a",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/2d4ee06e-d567-47f8b745-8d281fe5729a",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Windows Server 2008 R2 SP1 (base install without updates)"
},
{
"id": "9522c27d-51d9-44ee-8eb3-fb7b14fd4042",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/9522c27d-51d9-44ee-8eb3fb7b14fd4042",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/9522c27d-51d9-44ee-8eb3fb7b14fd4042",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/9522c27d-51d9-44ee-8eb3fb7b14fd4042",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "CentOS 5.10"
},
{
"id": "56ad2db2-d9cd-462e-a2a4-7f3a4fc91ee8",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/56ad2db2-d9cd-462ea2a4-7f3a4fc91ee8",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/56ad2db2-d9cd-462ea2a4-7f3a4fc91ee8",
"rel": "bookmark"
},
{
136
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/56ad2db2-d9cd-462ea2a4-7f3a4fc91ee8",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Red Hat Enterprise Linux 5.10"
},
{
"id": "695ca76e-fc0d-4e36-82e0-8ed66480a999",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/695ca76efc0d-4e36-82e0-8ed66480a999",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/695ca76efc0d-4e36-82e0-8ed66480a999",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/695ca76efc0d-4e36-82e0-8ed66480a999",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Debian 6.06 (Squeeze)"
},
{
"id": "aab63bcf-89aa-440f-b0c7-c7a1c611914b",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/aab63bcf-89aa-440f-b0c7c7a1c611914b",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/aab63bcf-89aa-440f-b0c7c7a1c611914b",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/aab63bcf-89aa-440f-b0c7c7a1c611914b",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "Ubuntu 10.04 LTS (Lucid Lynx)"
},
{
"id": "9aa0d346-c06f-4652-bbb1-4342a7d2d017",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/9aa0d346-c06f-4652bbb1-4342a7d2d017",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/9aa0d346-c06f-4652bbb1-4342a7d2d017",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/9aa0d346-c06f-4652bbb1-4342a7d2d017",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"name": "iPXE Boot (boot.rackspace.com)"
},
{
"id": "59b394f6-b2e0-4f11-b7d1-7fea4abc60a0",
"links": [
{
"href": "https://iad.servers.api.rackspacecloud.com/v2/453265/images/59b394f6-b2e0-4f11b7d1-7fea4abc60a0",
"rel": "self"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/59b394f6-b2e0-4f11b7d1-7fea4abc60a0",
"rel": "bookmark"
},
{
"href": "https://iad.servers.api.rackspacecloud.com/453265/images/59b394f6-b2e0-4f11b7d1-7fea4abc60a0",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
137
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
],
"name": "Vyatta Network OS 6.5R2"
}
]
}
138
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.81. List Images: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<images xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<image name="CentOS 7 (PVHVM)" id="f0d3b38b-61e3-47c4-83c7-98c4e7038809">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
f0d3b38b-61e3-47c4-83c7-98c4e7038809" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/f0d3b38b-61e3-47c4-83c7-98c4e7038809"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/f0d3b38b-61e3-47c4-83c7-98c4e7038809"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Gentoo 14.3 (PVHVM)" id="2b3df7d6-916b-4df1-b537-bdde7d2ee3a5">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/2b3df7d6-916b-4df1-b537bdde7d2ee3a5" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/2b3df7d6-916b-4df1-b537-bdde7d2ee3a5"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/2b3df7d6-916b-4df1-b537-bdde7d2ee3a5"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Arch 2014.7 (PVHVM)" id="7649490f-217c-42ae-87ef-04cb311632dd">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
7649490f-217c-42ae-87ef-04cb311632dd" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/7649490f-217c-42ae-87ef-04cb311632dd"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/7649490f-217c-42ae-87ef-04cb311632dd"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="OnMetal - Debian 7 (Wheezy)" id="d22ea57e-e12e-4a0a-ad6b-680dd676fd7c">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/d22ea57e-e12e-4a0aad6b-680dd676fd7c" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/d22ea57e-e12e-4a0a-ad6b-680dd676fd7c"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/d22ea57e-e12e-4a0a-ad6b-680dd676fd7c"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="OnMetal - CoreOS (Alpha)" id="d774f891-45d5-4880-823d-126d3cdbe090">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
d774f891-45d5-4880-823d-126d3cdbe090" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/d774f891-45d5-4880-823d-126d3cdbe090"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/d774f891-45d5-4880-823d-126d3cdbe090"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="OnMetal - Debian Unstable (Sid)" id="0719ab33-5de0-496a-9f37-a56c7192d319">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/0719ab33-5de0-496a-9f37a56c7192d319" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/0719ab33-5de0-496a-9f37-a56c7192d319"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/0719ab33-5de0-496a-9f37-a56c7192d319"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="OnMetal - Debian Testing (Jessie)" id="bc5afff1-1d0c-4cc5-ba7b-01c0a74c2fbd">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/bc5afff1-1d0c-4cc5ba7b-01c0a74c2fbd" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/bc5afff1-1d0c-4cc5-ba7b-01c0a74c2fbd"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/bc5afff1-1d0c-4cc5-ba7b-01c0a74c2fbd"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="CoreOS (Beta)" id="547a46bd-d913-4bf7-ac35-2f24f25f1b7a">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/547a46bd-d913-4bf7ac35-2f24f25f1b7a" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/547a46bd-d913-4bf7-ac35-2f24f25f1b7a"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/547a46bd-d913-4bf7-ac35-2f24f25f1b7a"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="CoreOS (Alpha)" id="afb5ee19-4e6e-42c3-841c-9663e99b83ba">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
afb5ee19-4e6e-42c3-841c-9663e99b83ba" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/afb5ee19-4e6e-42c3-841c-9663e99b83ba"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/afb5ee19-4e6e-42c3-841c-9663e99b83ba"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2008 R2 SP1 + SQL Server 2012 SP1 Web" id="32104f95-a005-4165-b147-6ed9a3702642">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/32104f95-a005-4165b147-6ed9a3702642" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/32104f95-a005-4165-b147-6ed9a3702642"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/32104f95-a005-4165-b147-6ed9a3702642"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2008 R2 SP1 + SQL Server 2008 R2 SP2 Standard" id="64f5a683-1666-404b-9b17-6dd31fa6e0ba">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
64f5a683-1666-404b-9b17-6dd31fa6e0ba" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/64f5a683-1666-404b-9b17-6dd31fa6e0ba"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/64f5a683-1666-404b-9b17-6dd31fa6e0ba"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
139
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<image name="Windows Server 2012 + SQL Server 2012 SP1 Web" id="55a24191-d3f5-46a3-af5f-50c700868092">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/55a24191-d3f5-46a3af5f-50c700868092" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/55a24191-d3f5-46a3-af5f-50c700868092"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/55a24191-d3f5-46a3-af5f-50c700868092"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2008 R2 SP1 + SQL Server 2012 SP1 Standard" id="dee79074-3b3e-4f9a-bc16-d09d26fd0cb4">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/dee79074-3b3e-4f9a-bc16d09d26fd0cb4" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/dee79074-3b3e-4f9a-bc16-d09d26fd0cb4"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/dee79074-3b3e-4f9a-bc16-d09d26fd0cb4"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2012 + SQL Server 2012 SP1 Standard" id="d6b2c1f6-5160-4cad-a7e1-aa698528f393">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/d6b2c1f6-5160-4cad-a7e1aa698528f393" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/d6b2c1f6-5160-4cad-a7e1-aa698528f393"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/d6b2c1f6-5160-4cad-a7e1-aa698528f393"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2012" id="99524d0a-23ba-41d0-8155-1eae777d4b91">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
99524d0a-23ba-41d0-8155-1eae777d4b91" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/99524d0a-23ba-41d0-8155-1eae777d4b91"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/99524d0a-23ba-41d0-8155-1eae777d4b91"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2008 R2 SP1 + SharePoint 2010 Foundation with SQL Server 2008 R2 SP1 Standard" id=
"c6ea75ea-afba-4d74-ae57-313aa641ceb1">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/c6ea75ea-afba-4d74ae57-313aa641ceb1" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/c6ea75ea-afba-4d74-ae57-313aa641ceb1"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/c6ea75ea-afba-4d74-ae57-313aa641ceb1"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2008 R2 SP1 + SharePoint 2010 Foundation with SQL Server 2008 R2 Express" id=
"446ee423-3ad4-415c-bf96-ede80d9f21d1">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/446ee423-3ad4-415c-bf96ede80d9f21d1" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/446ee423-3ad4-415c-bf96-ede80d9f21d1"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/446ee423-3ad4-415c-bf96-ede80d9f21d1"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Fedora 20 (Heisenbug) (PVHVM)" id="5596255c-e9ae-48da-866c-9bbdd345ed39">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/5596255ce9ae-48da-866c-9bbdd345ed39" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/5596255c-e9ae-48da-866c-9bbdd345ed39"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/5596255c-e9ae-48da-866c-9bbdd345ed39"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2012 + SharePoint 2013 with SQL Server 2012 SP1 Standard" id=
"4530bc02-1976-4685-8b75-19dce4e7a48e">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
4530bc02-1976-4685-8b75-19dce4e7a48e" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/4530bc02-1976-4685-8b75-19dce4e7a48e"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/4530bc02-1976-4685-8b75-19dce4e7a48e"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="OpenSUSE 13.1 (PVHVM)" id="9c7dbd5e-d40b-453e-8950-3990e6ca71ee">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/9c7dbd5ed40b-453e-8950-3990e6ca71ee" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/9c7dbd5e-d40b-453e-8950-3990e6ca71ee"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/9c7dbd5e-d40b-453e-8950-3990e6ca71ee"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2008 R2 SP1 + SQL Server 2008 R2 SP2 Web" id="e1584627-07d5-4fe1-a34d-83718ae1c0e6">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/e1584627-07d5-4fe1a34d-83718ae1c0e6" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/e1584627-07d5-4fe1-a34d-83718ae1c0e6"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/e1584627-07d5-4fe1-a34d-83718ae1c0e6"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2008 R2 SP1" id="85d61cda-6923-478e-9f78-1e63bb34183f">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
85d61cda-6923-478e-9f78-1e63bb34183f" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/85d61cda-6923-478e-9f78-1e63bb34183f"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/85d61cda-6923-478e-9f78-1e63bb34183f"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="FreeBSD 10.0" id="e5d7ca78-a487-4d7e-9dd1-73165df3f9fd">
140
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/e5d7ca78a487-4d7e-9dd1-73165df3f9fd" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/e5d7ca78-a487-4d7e-9dd1-73165df3f9fd"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/e5d7ca78-a487-4d7e-9dd1-73165df3f9fd"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Ubuntu 14.04 LTS (Trusty Tahr)" id="5cc098a5-7286-4b96-b3a2-49f4c4f82537">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/5cc098a5-7286-4b96b3a2-49f4c4f82537" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/5cc098a5-7286-4b96-b3a2-49f4c4f82537"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/5cc098a5-7286-4b96-b3a2-49f4c4f82537"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)" id="bb02b1a3-bc77-4d17-ab5b-421d89850fca">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/bb02b1a3-bc77-4d17ab5b-421d89850fca" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/bb02b1a3-bc77-4d17-ab5b-421d89850fca"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/bb02b1a3-bc77-4d17-ab5b-421d89850fca"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Scientific Linux 6.5 (PVHVM)" id="dbb59b04-bd50-4eef-b05e-6a6451ef9bf2">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/dbb59b04-bd50-4eefb05e-6a6451ef9bf2" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/dbb59b04-bd50-4eef-b05e-6a6451ef9bf2"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/dbb59b04-bd50-4eef-b05e-6a6451ef9bf2"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Ubuntu 12.04 LTS (Precise Pangolin)" id="ffa476b1-9b14-46bd-99a8-862d1d94eb7a">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
ffa476b1-9b14-46bd-99a8-862d1d94eb7a" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/ffa476b1-9b14-46bd-99a8-862d1d94eb7a"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/ffa476b1-9b14-46bd-99a8-862d1d94eb7a"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="CentOS 6.5" id="042395fc-728c-4763-86f9-9b0cacb00701">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
042395fc-728c-4763-86f9-9b0cacb00701" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/042395fc-728c-4763-86f9-9b0cacb00701"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/042395fc-728c-4763-86f9-9b0cacb00701"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Fedora 19 (Schrodinger's Cat) (PVHVM)" id="4b81c45a-90d6-4654-972c-73972b1d0aea">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/
4b81c45a-90d6-4654-972c-73972b1d0aea" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/4b81c45a-90d6-4654-972c-73972b1d0aea"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/4b81c45a-90d6-4654-972c-73972b1d0aea"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Red Hat Enterprise Linux 6.5 (PVHVM)" id="271e1090-77ad-4400-a1f7-73a922aca8e2">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/271e1090-77ad-4400a1f7-73a922aca8e2" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/271e1090-77ad-4400-a1f7-73a922aca8e2"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/271e1090-77ad-4400-a1f7-73a922aca8e2"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Red Hat Enterprise Linux 6.5" id="d1b6eba3-aece-407c-8ef3-4488b452336b">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/d1b6eba3aece-407c-8ef3-4488b452336b" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/d1b6eba3-aece-407c-8ef3-4488b452336b"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/d1b6eba3-aece-407c-8ef3-4488b452336b"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="CentOS 6.5 (PVHVM)" id="592c879e-f37d-43e6-8b54-8c2d97cf04d4">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/592c879ef37d-43e6-8b54-8c2d97cf04d4" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/592c879e-f37d-43e6-8b54-8c2d97cf04d4"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/592c879e-f37d-43e6-8b54-8c2d97cf04d4"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Debian 7 (Wheezy) (PVHVM)" id="77e32de8-3304-44f3-b230-436d95fceb19">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/77e32de8-3304-44f3b230-436d95fceb19" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/77e32de8-3304-44f3-b230-436d95fceb19"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/77e32de8-3304-44f3-b230-436d95fceb19"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Ubuntu 12.04 LTS (Precise Pangolin) (PVHVM)" id="a4286a42-137c-46ce-a796-dbd2b12a078c">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/a4286a42-137c-46ce-a796dbd2b12a078c" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/a4286a42-137c-46ce-a796-dbd2b12a078c"
rel="bookmark"/>
141
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/a4286a42-137c-46ce-a796-dbd2b12a078c"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Debian Unstable (Sid) (PVHVM)" id="75aa3ade-6b87-44bb-b465-55063cfb71f6">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/75aa3ade-6b87-44bbb465-55063cfb71f6" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/75aa3ade-6b87-44bb-b465-55063cfb71f6"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/75aa3ade-6b87-44bb-b465-55063cfb71f6"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Debian Testing (Jessie) (PVHVM)" id="1cc4795a-d86e-460f-8c69-ba737ea80b17">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/1cc4795a-d86e-460f-8c69ba737ea80b17" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/1cc4795a-d86e-460f-8c69-ba737ea80b17"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/1cc4795a-d86e-460f-8c69-ba737ea80b17"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2012 (base install without updates)" id="c30b4407-da75-4291-a1fb-edd8e6e037de">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/c30b4407-da75-4291-a1fbedd8e6e037de" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/c30b4407-da75-4291-a1fb-edd8e6e037de"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/c30b4407-da75-4291-a1fb-edd8e6e037de"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Windows Server 2008 R2 SP1 (base install without updates)" id="2d4ee06e-d567-47f8-b745-8d281fe5729a">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/2d4ee06e-d567-47f8b745-8d281fe5729a" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/2d4ee06e-d567-47f8-b745-8d281fe5729a"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/2d4ee06e-d567-47f8-b745-8d281fe5729a"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="CentOS 5.10" id="9522c27d-51d9-44ee-8eb3-fb7b14fd4042">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/9522c27d-51d9-44ee-8eb3fb7b14fd4042" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/9522c27d-51d9-44ee-8eb3-fb7b14fd4042"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/9522c27d-51d9-44ee-8eb3-fb7b14fd4042"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Red Hat Enterprise Linux 5.10" id="56ad2db2-d9cd-462e-a2a4-7f3a4fc91ee8">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/56ad2db2-d9cd-462ea2a4-7f3a4fc91ee8" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/56ad2db2-d9cd-462e-a2a4-7f3a4fc91ee8"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/56ad2db2-d9cd-462e-a2a4-7f3a4fc91ee8"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Debian 6.06 (Squeeze)" id="695ca76e-fc0d-4e36-82e0-8ed66480a999">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/695ca76efc0d-4e36-82e0-8ed66480a999" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/695ca76e-fc0d-4e36-82e0-8ed66480a999"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/695ca76e-fc0d-4e36-82e0-8ed66480a999"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Ubuntu 10.04 LTS (Lucid Lynx)" id="aab63bcf-89aa-440f-b0c7-c7a1c611914b">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/aab63bcf-89aa-440f-b0c7c7a1c611914b" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/aab63bcf-89aa-440f-b0c7-c7a1c611914b"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/aab63bcf-89aa-440f-b0c7-c7a1c611914b"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="iPXE Boot (boot.rackspace.com)" id="9aa0d346-c06f-4652-bbb1-4342a7d2d017">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/9aa0d346-c06f-4652bbb1-4342a7d2d017" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/9aa0d346-c06f-4652-bbb1-4342a7d2d017"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/9aa0d346-c06f-4652-bbb1-4342a7d2d017"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
<image name="Vyatta Network OS 6.5R2" id="59b394f6-b2e0-4f11-b7d1-7fea4abc60a0">
<atom:link href="https://iad.servers.api.rackspacecloud.com/v2/453265/images/59b394f6-b2e0-4f11b7d1-7fea4abc60a0" rel="self"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/59b394f6-b2e0-4f11-b7d1-7fea4abc60a0"
rel="bookmark"/>
<atom:link href="https://iad.servers.api.rackspacecloud.com/453265/images/59b394f6-b2e0-4f11-b7d1-7fea4abc60a0"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
</images>
2.7.2. Get Image Details
Verb
URI
Description
GET
/images/id
Lists details of the specified image.
142
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Normal Response Codes: 200 and 203
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
Specify the image ID as id in the URI.
This operation does not require a request body.
This operation returns details of the specified image in the response body. The image_type
field in the response indicates whether the image is built-in (base) or custom (snapshot).
Note
The response body does not include the serverId field. To retrieve the serverId
field, get details for all images. See Section 2.7.1, “List Images” [124]
Example 2.82. Get Image Details: JSON Response
{
"image": {
"OS-DCF:diskConfig": "AUTO",
"created": "2012-02-28T19:38:57Z",
"id": "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"links": [
{
"href": "https://dfw.servers.api.rackspacecloud.com/v2/010101/images/
3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/images/3afe97b2-26dc-49c5a2cc-a2fc8d80c001",
"rel": "bookmark"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/images/3afe97b2-26dc-49c5a2cc-a2fc8d80c001",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"metadata": {
"arch": "x86-64",
"auto_disk_config": "True",
"com.rackspace__1__build_core": "1",
"com.rackspace__1__build_managed": "0",
"com.rackspace__1__build_rackconnect": "0",
"com.rackspace__1__options": "0",
"com.rackspace__1__visible_core": "1",
"com.rackspace__1__visible_managed": "0",
"com.rackspace__1__visible_rackconnect": "0",
"image_type": "base",
"org.openstack__1__architecture": "x64",
"org.openstack__1__os_distro": "org.ubuntu",
"org.openstack__1__os_version": "11.10",
"os_distro": "ubuntu",
"os_type": "linux",
"os_version": "11.10",
"rax_managed": "false",
"rax_options": "0"
},
"minDisk": 10,
"minRam": 256,
"name": "Ubuntu 11.10",
"progress": 100,
"status": "ACTIVE",
"updated": "2012-02-28T19:39:05Z"
}
143
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
}
144
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.83. Get Image Details: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<image
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE"
updated="2013-04-19T16:59:32Z"
name="Ubuntu 11.10 (Oneiric Oncelot)"
created="2012-02-28T19:38:57Z" minDisk="10" progress="100"
minRam="256" id="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001"
OS-DCF:diskConfig="AUTO">
<metadata>
<meta key="os_distro">ubuntu</meta>
<meta key="com.rackspace__1__visible_core">1</meta>
<meta key="com.rackspace__1__build_rackconnect">1</meta>
<meta key="auto_disk_config">True</meta>
<meta key="com.rackspace__1__options">0</meta>
<meta key="image_type">base</meta>
<meta key="org.openstack__1__os_version">11.10</meta>
<meta key="org.openstack__1__os_distro">org.ubuntu</meta>
<meta key="rax_managed">false</meta>
<meta key="os_version">11.10</meta>
<meta key="com.rackspace__1__release_version">1</meta>
<meta key="rax_options">0</meta>
<meta key="com.rackspace__1__visible_rackconnect">1</meta>
<meta key="com.rackspace__1__release_id">1002</meta>
<meta key="com.rackspace__1__visible_managed">1</meta>
<meta key="com.rackspace__1__build_core">1</meta>
<meta key="arch">x86-64</meta>
<meta key="os_type">linux</meta>
<meta key="org.openstack__1__architecture">x64</meta>
<meta key="com.rackspace__1__build_managed">1</meta>
</metadata>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/010101/images/3afe97b2-26dc-49c5-a2cca2fc8d80c001"
rel="self"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/images/3afe97b2-26dc-49c5-a2cca2fc8d80c001"
rel="bookmark"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/images/3afe97b2-26dc-49c5-a2cca2fc8d80c001"
type="application/vnd.openstack.image" rel="alternate"/>
</image>
145
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.7.3. Delete Image
Verb
URI
Description
DELETE
/images/id
Deletes the specified image.
Normal Response Code: 204
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
Status Transition:
ACTIVE
ERROR
DELETED
DELETED
This operation deletes the specified image from the system.
Specify the image ID as id in the URI.
Images are immediately removed.
Specify the image ID as id in the URI.
This operation does not require a request body.
This operation does not contain a response body. Successful deletion returns a 204 response code.
146
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.8. Metadata
You can list and set metadata for a server or an image after you create the server or image.
Metadata provides additional information about your provisioned resources. It follows the
format of 'metadata key : metadata value', and is viewable by operations through the API.
Some metadata can be configured by the provider and others by the user to provide extra
functionality, labeling, or providing information for 3rd party applications to act upon.
Verb
URI
Description
GET
/servers/id/metadata
Lists metadata associated with a server or an image.
PUT
/servers/id/metadata
Sets metadata for the specified server or image.
POST
/servers/id/metadata
Updates metadata items for the specified server or image.
GET
/servers/id/metadata/key
Gets a metadata item associated with a server or an image.
PUT
/servers/id/metadata/key
Sets a metadata item for a specified server or image.
DELETE
/servers/id/metadata/key
Deletes a metadata item for a specified server or image.
2.8.1. List Metadata
Verb
URI
Description
GET
/servers/id/metadata
Lists metadata associated with a server.
GET
/images/id/metadata
Lists metadata associated with an image.
Normal Response Codes: 200 and 203
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
Lists all metadata associated with a server or an image.
Specify the server or image ID as id in the URI.
This operation does not require a request body.
This operation returns a response body.
Example 2.84. List Metadata: JSON Response
{
"metadata": {
"Label" : "Web",
"Version" : "2.1"
}
}
Example 2.85. List Metadata: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://docs.openstack.org/compute/api/v1.1">
<meta key="Label">Web</meta>
<meta key="Version">2.1</meta>
</metadata>
147
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.8.2. Set Metadata
Verb
URI
Description
PUT
/servers/id/metadata
Sets metadata for the specified server.
PUT
/images/id/metadata
Sets metadata for the specified image.
Normal Response Code: 200
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), buildInProgress (409),
overLimit (413), badMediaType (415), serviceUnavailable (503)
Sets metadata for the specified server or image.
Specify the server or image ID as id in the URI.
In the request body, specify the metadata element followed by attributes.
The following table describes the attributes that you can set in the request body:
Table 2.12. Set Metadata Request Attributes
Attribute
Description
Required
metadata
Key and value pairs for metadata.
Yes
Existing metadata items are replaced with the ones provided in the request regardless of
the names of the original metadata items.
If you exceed the maximum number of metadata items, the call throws an overLimit (413)
fault.
You can query the maximum number of key-value pairs that can be supplied for each server
through the maxServerMeta absolute limit. You can query the maximum number of keyvalue pairs for an image through the maxImageMeta absolute limit. See Section 1.9.3, “Get
Limits” [26].
Example 2.86. Set Metadata: JSON Request
{
"metadata": {
"Label" : "Web",
"Version" : "2.1"
}
}
Example 2.87. Set Metadata: JSON Response
{
"metadata": {
"Label" : "Web",
"Version" : "2.1"
}
}
Example 2.88. Set Metadata: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://docs.openstack.org/compute/api/v1.1">
<meta key="Label">Web</meta>
<meta key="Version">2.1</meta>
</metadata>
148
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 2.89. Set Metadata: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://docs.openstack.org/compute/api/v1.1">
<meta key="Label">Web</meta>
<meta key="Version">2.1</meta>
</metadata>
149
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.8.3. Update Metadata
Verb
URI
Description
POST
/servers/id/metadata
Updates metadata items for the specified server.
POST
/images/id/metadata
Updates metadata items for the specified image.
Normal Response Code: 200
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), buildInProgress (409),
overLimit (413), badMediaType (415), serviceUnavailable (503)
Updates metadata items for a specified server or image, or adds the specified metadata if
there is no current metadata associated with the server or image.
Specify the server or image ID as id in the URI.
In the request body, specify the metadata element followed by attributes.
The following table describes the attributes that you can set in the request body:
Table 2.13. Update Metadata Request Attributes
Attribute
Description
Required
meta
Key and value pairs for metadata.
Yes
Updates replace existing metadata items with the same key. Items that are not explicitly
mentioned in the request are not modified.
If you exceed the maximum number of metadata items in the request, the call throws an
overLimit (413) fault. You can query the maximum number of key-value pairs that can be
supplied for each server through the maxServerMeta absolute limit. You can query the
maximum number of key-value pairs for an image through the maxImageMeta absolute
limit. See Section 1.9.3, “Get Limits” [26].
Example 2.90. Update Metadata: JSON Request
{
"metadata": {
"Label" : "Web2"
}
}
Example 2.91. Update Metadata: JSON Response
{
"metadata" : {
"Label" : "Web2",
"Version" : "2.1"
}
}
Example 2.92. Update Metadata: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://docs.openstack.org/compute/api/v1.1">
<meta key="Label">Web2</meta>
</metadata>
150
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Example 2.93. Update Metadata: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://docs.openstack.org/compute/api/v1.1">
<meta key="Label">Web2</meta>
<meta key="Version">2.1</meta>
</metadata>
151
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.8.4. Get Metadata Item
Verb
URI
Description
GET
/servers/id/metadata/key
Gets a metadata item associated with a server.
GET
/images/id/metadata/key
Gets a metadata item associated with an image.
Normal Response Codes: 200 and 203
Error Response Codes: computeFault (400, 500, …), serviceUnavailable (503), unauthorized (401), badRequest (400), forbidden (403), itemNotFound (404), Method Not Allowed
(405), overLimit (413)
Retrieves a single metadata item by key.
Specify the server or image ID as id and the key as key in the URI.
This operation does not require a request body.
This operation returns a response body.
Example 2.94. Get Metadata Item: JSON Response
{
"meta" : {
"Label" : "Web"
}
}
Example 2.95. Get Metadata Item: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<meta
xmlns="http://docs.openstack.org/compute/api/v1.1"
key="Label">Web</meta>
152
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.8.5. Set Metadata Item
Verb
URI
Description
PUT
/servers/id/metadata/key
Sets a metadata item for a specified server.
PUT
/images/id/metadata/key
Sets a metadata item for a specified image.
Normal Response Code: 200
Error Response Codes: computeFault (400, 500, …), serviceUnavailable (503), unauthorized (401), badRequest (400), forbidden (403), itemNotFound (404), Method Not Allowed
(405), buildInProgress (409), overLimit (413), badMediaType (415)
Sets a metadata item by its key.
Specify the server or image ID as id and the metadata key as key in the URI.
You must also specify the metadata element followed by the key and value pair in the request body. The key specified in the request body must match the key specified in the URI
request.
The following table describes the attributes that you can set in the request body:
Table 2.14. Set Metadata Item Request Attributes
Attribute
Description
Required
meta
Key and value pairs for metadata. The key specified
must match the key specified in the URI request.
Yes
If you exceed the maximum number of metadata items in the request, the call throws an
overLimit (413) fault. You can query the maximum number of key-value pairs that can be
supplied for each server through the maxServerMeta absolute limit. You can query the
maximum number of key-value pairs for an image through the maxImageMeta absolute
limit. See Section 1.9.3, “Get Limits” [26].
Example 2.96. Set Metadata Item: JSON Request
{
"meta" : {
"Label" : "Web"
}
}
Example 2.97. Set Metadata Item: JSON Response
{
"meta" : {
"Label" : "Web"
}
}
153
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 2.98. Set Metadata Item: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<meta
xmlns="http://docs.openstack.org/compute/api/v1.1"
key="Label">Web</meta>
Example 2.99. Set Metadata Item: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<meta
xmlns="http://docs.openstack.org/compute/api/v1.1"
key="Label">Web</meta>
2.8.5.1. Using auto_disk_config image metadata key
When added as metadata to an image, the metadata auto_disk_config key determines
how the cloud server's root disk partition is handled when the server is started or resized. It
has the following possible values:
TRUE
The root partition is expanded to encompass all of the
available virtual disk.
FALSE
The root partition remains the same size as the original
image, currently 20 KB. Extra virtual disk is seen as unformatted free space by the OS.
DISABLED (preferred setting for
Windows and Free-BSD images)
In this case, the action taken is the same as for the value
FALSE. In addition, this action cannot be overidden by
use of the Disk Configuration Extension.
The image metadata auto_disk_config key is related to, and can actually control, the available Disk Configuration Extension v2 API attribute: OS-DCF:diskConfig. It does this in
two ways.
1. The image metadata auto_disk_config value sets the default value of OSDCF:diskConfig.
2. When the image’s auto_disk_config value is DISABLED, automatic disk configuration
cannot be enabled when the server is booted or rebuilt.
The following table shows the effect of setting the image metadata auto_disk_config key
on the server attribute OS-DCF:diskConfig and whether the image-specified value may
be overridden when starting or resizing a server.
auto_disk_configResulting OS-DCF:diskConfig
value
User Selectable at Start or Resize?
TRUE
AUTO
Yes
FALSE
MANUAL
Yes
DISABLED
MANUAL
No
Warning
We do not advise changing auto_disk_config during resizes, even when allowed, since it can have unintended consequences.
154
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
2.8.6. Delete Metadata Item
Verb
URI
Description
DELETE
/servers/id/metadata/key
Deletes a metadata item for the specified server.
DELETE
/images/id/metadata/key
Deletes a metadata item for the specified image.
Normal Response Code: 204
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), buildInProgress (409),
overLimit (413), serviceUnavailable (503)
Deletes a metadata item.
Specify the server or image ID as id and the key as key in the URI.
The operation does not require a request body.
The operation does not return a response body.
Successful deletion returns a 204 response code.
155
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
3. Rackspace Extensions
Rackspace provides the following extensions to the OpenStack Compute API v2:
• Disk configuration extension. Enables control of how the disk is partitioned when a server is created, rebuilt, or resized.
• Extended status extension. Shows extended statuses including the VM, task, and power
statuses in the response bodies for the list servers and get server details calls.
• Rescue mode extension. Creates a new server with the file system for the specified version of Cloud Servers mounted to fix file system and configuration errors.
• Used limits extension. Returns the amount of absolute limit capacity that is currently
used.
• Volume attachment extension. In conjunction with the Cloud Block Storage API, you can
attach a volume to a server instance, list volume attachments for a server instance, get
volume details for a volume attachment, and delete a volume attachment.
• Scheduled images. Allows you to schedule automatic creation of server images.
• Flavor extra specs. Allows you to schedule automatic creation of server images.
• OS instance actions. allows you to view a log of events and actions taken on a server..
• Config drive. read-only configuration drive that is attached to server instances on boot.
• Boot from volume. Shows you extra specifications for a flavor.
• Networks. Shows you how to attach and manage networks.
3.1. Disk Configuration Extension
The disk configuration extension adds a OS-DCF:diskConfig attribute on images and
servers that controls how the disk is partitioned when servers are created, rebuilt, or resized. A server inherits the OS-DCF:diskConfig value from the image it was created
with, and an image inherits the OS-DCF:diskConfig value of the server from which it
was created. To override the inherited setting, you can include the OS-DCF:diskConfig
attribute in the request body of a server create, rebuild, or resize request. Valid OSDCF:diskConfig values are:
• AUTO. The server is built with a single partition the size of the target flavor disk. The file
system is automatically adjusted to fit the entire partition. This keeps things simple and
automated. AUTO is valid only for images and servers with a single partition that use the
EXT3 file system. This is the default setting for applicable Rackspace base images.
• MANUAL. The server is built using whatever partition scheme and file system is in
the source image. If the target flavor disk is larger, the remaining disk space is left
unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions,
and so on, and enables you to manage the disk configuration.
156
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Note
Although Rackspace Windows images are configured with a OSDCF:diskConfig value of MANUAL, the NTFS file system expands to the entire
partition on only the first boot.
Resizing down requires the server to have a OS-DCF:diskConfig value of AUTO.
The namespace for this extended attribute is:
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
3.1.1. Changes to Get Server/Image Details
A GET request against the /servers/detail, /servers/id, /images/detail, or /images/id resource returns the OS-DCF:diskConfig extended attribute. See the following examples:
• Example 2.2, “List Servers Details: JSON Response” [51]
• Example 2.5, “List Servers Detail: XML Response” [54].
• Example 2.16, “Get Server Details: JSON Response” [71]
• Example 2.18, “Get Server Details: XML Response” [73].
• Example 2.78, “List Images: JSON Response (detail)” [125]
• Example 2.79, “List Images: XML Response (detail)” [127].
• Example 2.82, “Get Image Details: JSON Response” [143]
• Example 2.83, “Get Image Details: XML Response” [145].
3.1.2. Changes to Create Server
When you create a server from an image with the OS-DCF:diskConfig value set to AUTO, the server is built with a single partition that is expanded to the disk size of the flavor selected. When you set the OS-DCF:diskConfig attribute to MANUAL, the server is
built by using the partition scheme and file system that is in the source image. If the target flavor disk is larger, remaining disk space is left unpartitioned. A server inherits the OSDCF:diskConfig attribute from the image from which it is created. However, you can
override the OS-DCF:diskConfig value when you create a server, as follows:
Example 3.1. Create Server with OS-DCF:diskConfig: JSON Request
{
"server" : {
"name" : "new-server-test",
"imageRef" : "5f68715f-201f-4600-b5a1-0b97e2b1cb31",
"flavorRef" : "2",
"OS-DCF:diskConfig" : "MANUAL",
"metadata" : {
157
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"My Server Name" : "Ubuntu 10.04 LTS manual"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}
Example 3.2. Create Server with OS-DCF:diskConfig: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
imageRef="5f68715f-201f-4600-b5a1-0b97e2b1cb31"
flavorRef="2"
OS-DCF:diskConfig="MANUAL"
name="new-server-test"
>
<metadata>
<meta key="My Server Name">Ubuntu 10.04 LTS manual</meta>
</metadata>
<personality>
<file path="/etc/banner.txt">
ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
</file>
</personality>
</server>
In this example, the server is created with OS-DCF:diskConfig set to MANUAL, regardless of what value the image OS-DCF:diskConfig attribute is set to. Images also inherit
the OS-DCF:diskConfig value from a server. So, if an image is created from the server, it
also has a OS-DCF:diskConfig value of MANUAL.
3.1.3. Changes to Rebuild Server
You can set the OS-DCF:diskConfig attribute when you rebuild a server. In the following examples, the OS-DCF:diskConfig attribute is set to MANUAL, which allows unused
disk space to be used for other partitions after the server is rebuilt.
If you do not set the OS-DCF:diskConfig attribute is not set during the rebuild, the original value of the attribute is retained.
Example 3.3. Rebuild Server with OS-DCF:diskConfig: JSON Request
158
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
{
"rebuild" : {
"name" : "new-server-test",
"imageRef" : "d42f821e-c2d1-4796-9f07-af5ed7912d0e",
"flavorRef" : "2",
"OS-DCF:diskConfig" : "manual",
"adminPass" : "diane123",
"metadata" : {
"My Server Name" : "Apache1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}
Example 3.4. Rebuild Server with OS-DCF:diskConfig: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<rebuild xmlns="http://docs.openstack.org/compute/api/v1.1"
name="rebuilt-server"
imageRef="d6dd6c70-a122-4391-91a8-decb1a356549"
OS-DCF:diskConfig="MANUAL"
adminPass="diane123">
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<personality>
<file path="/etc/banner.txt">
ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
b25zLiINCg0KLVJpY2hhcmQgQmFjaA== </file>
</personality>
</rebuild>
3.1.4. Changes to Resize Server
You can set the OS-DCF:diskConfig attribute when you resize a server, which enables
you to change the value of the attribute when you scale a server up or down.
If you do not set the OS-DCF:diskConfig attribute during the resize, the original value
of the attribute is retained.
159
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 3.5. Resize Server with OS-DCF:diskConfig: JSON Request
{
"resize" : {
"flavorRef" : "3",
"OS-DCF:diskConfig" : "manual"
}
}
Example 3.6. Resize Server with OS-DCF:diskConfig: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<resize xmlns="http://docs.openstack.org/compute/api/v1.1"
flavorRef="2"
OS-DCF:diskConfig="MANUAL"/>
3.2. Extended Status Extension
The extended status extension displays the VM, task, and power statuses for servers.
The extension displays these statuses in the following fields in the response bodies for the
list servers and get server details calls:
Table 3.1. Extended Status Extension
Field
Description
OS-EXT-STS:vm_state
The virtual machine (VM) status. For possible values, see OSEXT-STS:vm_state [
].
OS-EXTSTS:task_state
The task status. For possible values, see OS-EXTSTS:task_state [
].
OS-EXTSTS:power_state
The power status. For possible values, see OS-EXTSTS:power_state [
].
Note
The API does not regulate the VM and task status values so it is possible that
these status values can be added, removed, or renamed.
Currently, the possible values for the VM, task, and power status fields are:
OS-EXT-STS:vm_state
The virtual machine (VM) status. Possible values are:
• active
• build
• deleted
• error
• paused
• rescued
• resized
• soft_deleted
• stopped
• suspended
OS-EXT-STS:task_state
The task status. Possible values are:
160
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
OS-EXT-STS:power_state
API v2
block_device_mapping
deleting
image_snapshot
image_pending_upload
image_uploading
migrating
networking
pausing
powering_off
powering_on
rebooting
rebooting_hard
rebuilding
rebuild_block_device_mapping
rebuild_spawning
rescuing
resize_confirming
resize_finish
resize_migrated
resize_migrating
resize_prep
resize_reverting
resuming
scheduling
spawning
starting
stopping
suspending
unpausing
unrescuing
updating_password
The power status. Possible values are:
• 0. The instance is powered down.
• 1. The instance is powered up.
• 4. The instance is shut off.
The following table shows the server statuses that correspond with the VM and tasks statuses:
Table 3.2. Server Statuses and Corresponding VM and Task Statuses
Server status
OS-EXT-STS:vm_state OS-EXTSTS:task_state
ACTIVE
active
a
HARD_REBOOT
active
rebooting_hard
MIGRATING
active
migrating
PASSWORD
active
updating_password
REBOOT
active
rebooting
REBUILD
active
rebuilding
REBUILD
active
rebuild_block_device_mapping
161
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Server status
OS-EXT-STS:vm_state OS-EXTSTS:task_state
REBUILD
active
rebuild_spawning
RESIZE
active
resize_prep
RESIZE
active
resize_migrating
RESIZE
active
resize_migrated
RESIZE
active
resize_finish
BUILD
building
a
DELETED
deleted
a
ERROR
error
a
PAUSED
paused
a
RESCUE
rescued
a
VERIFY_RESIZE
resized
a
REVERT_RESIZE
resized
resize_reverting
DELETED
soft_deleted
a
SHUTOFF
stopped
a
SUSPENDED
suspended
a
a
API v2
Possible task statuses include the following:
• block_device_mapping
• deleting
• image_snapshot. Indicates that a create image action has been initiated and that the hypervisor is creating the snapshot. Any operations that would modify data on the server's virtual hard disk should be avoided during this time.
• image_pending_upload. Indicates that the hypervisor has completed taking a snapshot of the server. At this point, the hypervisor
is packaging the snapshot and preparing it for upload to the image store.
• image_uploading. Indicates that the hypervisor is currently uploading a packaged snapshot of the server to the image store.
• migrating
• networking
• pausing
• powering_off
• powering_on
• rebooting
• rebooting_hard
• rebuilding
• rebuild_block_device_mapping
• rebuild_spawning
• rescuing
• resize_confirming
• resize_finish
• resize_migrated
• resize_migrating
• resize_prep
162
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
• resize_reverting
• resuming
• scheduling
• spawning
• starting
• stopping
• suspending
• unpausing
• unrescuing
• updating_password
The namespace for this extended attribute is:
xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/
v1.1"
For information about server statuses, see Server Status Values [57].
3.3. Rescue Mode Extension
Rescue mode creates a new Cloud Server with the file system for the specified Cloud Server
system mounted to fix file system and configuration errors. See also Section 2.4.7, “Rescue
Server” [101] and Section 2.4.8, “Unrescue Server” [103].
When you place a server in rescue mode, the following events occur:
1. The server is shut down.
2. A new server is created, as follows:
• The new server is based on the image from which the original server was created, with
a random password. This password is returned to you in a response to issuing the rescue mode API call.
• The new server has a secondary disk that is the file system of the original server. Use
the clean rescue server to fix problems on the original server.
To place a server in rescue mode, issue the request body in a POST request to /servers/id/
action. When you put a server into rescue mode, you cannot use it until its status goes from
ACTIVE to RESCUE. This does not happen immediately.
After you resolve any problems and reboot the rescued server, you can unrescue the server, which restores the repaired image to running state with its original password. The unrescue operation does not return a response body. The HTTP status code is 202 (Accepted) for
a successful unrescue.
The following JSON request and response examples show how to place a server in rescue
mode:
163
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 3.7. Place a Server in Rescue Mode: JSON Request
{
"rescue" : null
}
After you place a server in rescue mode, the following response is returned:
Example 3.8. Place a Server in Rescue Mode: JSON Response
{
"adminPass" : "Qy7gCeHeYaT7"
}
The following XML request and response examples show how to place a server in rescue
mode:
Example 3.9. Place a Server in Rescue Mode: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<rescue
xmlns="http://docs.openstack.org/compute/ext/rescue/api/v1.1"/>
After you place a server in rescue mode, the following response is returned:
Example 3.10. Place a Server in Rescue Mode: XML Response
<adminPass>eBHcCgGBVj6Z</adminPass>
The following XML example shows how to unrescue a server that is in rescue mode:
Example 3.11. Unrescue a Server in Rescue Mode: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<unrescue
xmlns="http://docs.rackspacecloud.com/servers/api/v1.1"/>
3.4. Used Limits Extension
Verb
URI
Description
GET
v2/tenant_id/limits
Extends limits to include information about the absolute
limits that are currently used.
Returns absolute and rate limit information, including information about the currently used
absolute limits.
Absolute and rate limits are part of the core API. See Section 1.9, “Limits” [23].The used limits extension adds attributes to the response body that show how much capacity is currently being used.
The following table describes the URI parameters:
Parameter
Description
tenant_id
The ID for the tenant or account in a multi-tenancy cloud.
This operation does not require a request body.
This operation returns a response body.
164
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
In the following response example, the totalRAMUsed value is an extended attribute.
The following example response shows a JSON response:
Example 3.12. Used Limits: JSON Response
{
"limits": {
"rate": [
{
"uri": "*",
"regex": ".*",
"limit": [
{
"value": 10,
"verb": "POST",
"remaining": 2,
"unit": "MINUTE",
"next-available": "2011-12-15T22:42:45Z"
},
{
"value": 10,
"verb": "PUT",
"remaining": 2,
"unit": "MINUTE",
"next-available": "2011-12-15T22:42:45Z"
},
{
"value": 100,
"verb": "DELETE",
"remaining": 100,
"unit": "MINUTE",
"next-available": "2011-12-15T22:42:45Z"
}
]
},
{
"uri": "*changes-since*",
"regex": "changes-since",
"limit": [
{
"value": 3,
"verb": "GET",
"remaining": 3,
"unit": "MINUTE",
"next-available": "2011-12-15T22:42:45Z"
}
]
},
{
"uri": "*/servers",
"regex": "^/servers",
"limit": [
{
"verb": "POST",
"value": 25,
"remaining": 24,
"unit": "DAY",
"next-available": "2011-12-15T22:42:45Z"
}
165
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
]
}
],
"absolute": {
"maxTotalRAMSize": 51200,
"totalRAMUsed": 1024,
"maxServerMeta": 5,
"maxImageMeta": 5,
"maxPersonality": 5,
"maxPersonalitySize": 10240
}
}
}
3.5. Scheduled Images Extension
Verb
URI
Description
POST
/servers/serverId/rax-si-image-schedule
Enables scheduled images.
GET
/servers/serverId/rax-si-image-schedule
Shows scheduled images settings.
DELETE
/servers/serverId/rax-si-image-schedule
Disables scheduled images.
You may schedule daily or weekly images of your server automatically, but you cannot
schedule both daily and weekly images for a server. When you schedule an image, a new
resource is created at /servers/{serverId}/rax-si-image-schedule. This resource, which contains the retention value and an optional day of the week specification, indicates that this
server will be monitored by the scheduled images service.
If you do not include a day of the week specification in your scheduled images request, the
server's image will be created daily.
If you include a day of the week specification in your scheduled images request, the server's
image will be created weekly on the day you indicate. Specify the optional day of the
week using a string value from the following enumeration: SUNDAY, MONDAY, TUESDAY,
WEDNESDAY, THURSDAY, FRIDAY, SATURDAY.
The scheduled images request for both daily and weekly images requires a retention value, a positive integer, which indicates the number of images created by the scheduled images service that will be retained in your cloud storage account. The scheduled images service will remove scheduled images in excess of that value, keeping the most recently created scheduled images (and all manually created images) of that server. You may configure
each server's retention value independently.
Keep in mind:
• Smaller snapshots tend to finish more quickly.
• A very large snapshot may take so long to finish that it may block the next day's scheduled snapshot from occurring.
• If you have a large amount of data to save, you may wish to explore other backup options.
166
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Important
The scheduled images service is a "best effort service". Images are scheduled so
that they will not interfere with each other or with on-demand snapshots. You
may not specify a particular time at which your server snapshot will be taken,
nor can we guarantee what time your scheduled image will become active, as
the time that an image becomes active depends upon the current network traffic load, and other factors. We do guarantee that all users will receive the same
best-effort service.
For weekly images, you specify the day of the week (determined by UTC) when
you'd like your server image created. As with daily scheduled images, we create a schedule for you and promise to satisfy it on a best-effort basis. There's no
guarantee that your server's schedule will stay the same from week to week:
we reserve the right to modify the time your image is made so that we can balance the the number of image creations in flight throughout the cloud and
throughout the day. Additionally, as some days of the week are much more
popular than others for scheduling images, in rare circumstances we may create
your weekly scheduled image in a window beginning 12:00 UTC the day before
the day of the week you specify and ending at 12:00 UTC the day after the day
of the week you specify. This is the time your image is scheduled to be created.
The time it will be available for you to use (that is, when its status is ACTIVE)
depends on factors such as the size of the image and overall network congestion in the cloud.
The namespace for this extended element is:
xmlns:RAX-SI="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0"
3.5.1. Changes to Server Detail Response
A GET request against the /servers/detail, or /servers/id, resource returns the RAXSI:schedule_images extended element. See the following examples:
• Example 2.3, “List Servers Details Where Servers Have Scheduled Images Enabled: JSON
Response” [53].
• Example 2.6, “List Servers Detail Where Servers Have Scheduled Images Enabled: XML Response” [55].
• Example 2.17, “Get Server Details for a Server with Scheduled Images Enabled: JSON Response” [72].
• Example 2.19, “Get Server Details for a Server with Scheduled Images Enabled: XML Response” [74].
3.5.2. Enable Scheduled Images
Verb
URI
Description
POST
/servers/serverId/rax-si-image-schedule
Enables scheduled images.
167
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Normal Response Code: 204
Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401),
forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)
This operation enables scheduled images on a server, by creating a image_schedule resource. When your images are created, they are named according to one of the following
schemes:
• daily-{server-name}-{10-digit-number}
• weekly-{server-name}-{10-digit-number}
Image names are limited to 255 characters. The {server-name} may be truncated, if necessary, for the scheduled snapshot image name to meet this limit.
Specify the server ID as serverId in the URI.
In the body of the request, retention specifies the number of scheduled images created
by the scheduled images service to keep for a server. The retention value must be a positive
integer from 1 to 65,535 (the system limit).
In the body of the request, day_of_week indicates the day on which you'd like your weekly image to be created. The allowed values for this field are: SUNDAY, MONDAY, TUESDAY,
WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY.
Note
Regarding Retention:
• Excess scheduled image removal will be done at the time the scheduled images service successfully adds a new snapshot to your account.
• The way the scheduled images service recognizes that an image is eligible for removal is by locating the following user metadata on the image:
org.openstack__1__created-by: scheduled-images-service.
To save an scheduled image so that it is not eligible for retention culling, simply remove this metadatum. We do not recommend adding the above metadatum to an image manually.
• If a retention value has already been specified for a server, it is overridden.
If you want to change from daily to weekly scheduled images, simply post a new request
containing the day of week and the retention value you desire. Likewise, if you want to
switch from weekly to daily scheduled images, simply post a new request containing only a
retention value.
Example 3.13. Enable daily scheduled images: JSON Request
{
"image_schedule" : {
"retention": 7
}
}
168
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 3.14. Enable daily scheduled images: XML Request
<?xml version='1.0' encoding='UTF-8'?>
<image_schedule xmlns="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0">
<retention>7</retention>
</image_schedule>
Example 3.15. Enable weekly scheduled images: JSON Request
{
"image_schedule": {
"retention": 5,
"day_of_week": "SATURDAY"
}
}
Example 3.16. Enable weekly scheduled images: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<image_schedule xmlns="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0">
<retention>5</retention>
<day_of_week>SATURDAY</day_of_week>
</image_schedule>
3.5.3. Show Scheduled Images
Verb
URI
Description
GET
/servers/serverId/rax-si-image-schedule
Show scheduled images.
Normal Response Code: 204
Error Response Codes: computeFault (500, …), badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404)
This operation returns the retention value if the server has scheduled images enabled. For
weekly images, the response also include the scheduled day of the week for the image. If
the server has scheduled images disabled, an HTTP 404 is returned.
There is no request body.
Example 3.17. Show daily scheduled images: JSON Response
{
"image_schedule" : {
"retention": 7
}
}
Example 3.18. Show daily scheduled images: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<image_schedule xmlns="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0">
<retention>7</retention>
</image_schedule>
Example 3.19. Show weekly scheduled images: JSON Response
{
"image_schedule": {
"retention": 5,
"day_of_week": "SATURDAY"
}
}
169
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 3.20. Show weekly scheduled images: XML Response
<?xml version="1.0" encoding="UTF-8"?>
<image_schedule xmlns="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0">
<retention>5</retention>
<day_of_week>SATURDAY</day_of_week>
</image_schedule>
Examples of Errors:
Example 3.21. Show Scheduled Images Error: JSON Response
{
"itemNotFound": {
"message": "Image schedule does not exist for server 24ade2fe-60d9-4d3e-a02c-c9a6a1b588a6",
"code": 404
}
}
Example 3.22. Show Scheduled Images Error: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<itemNotFound code="404" xmlns="http://docs.openstack.org/compute/api/v1.1">
<message>Image schedule does not exist for server 24ade2fe-60d9-4d3e-a02c-c9a6a1b588a6
</message>
</itemNotFound>
3.5.4. Disable Scheduled Images
Verb
URI
Description
DELETE
/servers/serverId/rax-si-image-schedule
Disable scheduled images.
Normal Response Code: 204
Error Response Codes: computeFault (500, …), badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404)
This operation disables scheduled images by deleting the image_schedule resource that indicates the scheduled image service should create snapshots of this server. Thus scheduled
images will no longer be created.
There is no request body.
There is no response body.
170
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
3.6. Flavors Extra Specs Extension
Verb
URI
Description
GET
/flavors/$class/os-extra_specs
Show the extra specifications for server flavors.
This operation shows extra specifications for the flavor, such as identifying your flavor class.
3.6.1. Show Flavor Extra Specs
Verb
URI
Description
GET
/flavors/$flavorclassID/os-extra_specs
Show the extra specifications for server flavors.
Normal Response Code: 200, 203
Error Response Codes: computeFault (500, …), badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404)
This operation returns the extra flavor specifications.
There is no request body.
Example 3.23. Show Flavor Extra Specs - Standard: JSON Response
{
"extra-specs": {
"class": "standard1"
}
}
Example 3.24. Show Flavor Extra Specs - Compute1: JSON Response
{
"extra_specs": {
"class": "compute1",
"disk_io_index": "-1",
"number_of_data_disks": "0",
"policy_class": "compute_flavor"
}
}
3.7. Instance Actions Extension
Verb
URI
Description
GET
/servers/{server-id}/os-instance-actions
List actions on a server.
GET
/servers/{server-id}/os-instance-actions/{request-id}
Show specified action on a server.
The Instance Actions extension allows you to view a log of events and actions taken on a
server.
3.7.1. List Server Actions
Verb
URI
Description
GET
/servers/{server-id}/os-instance-actions
List server actions.
171
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Normal Response Code: 200
Error Response Codes: computeFault (500, …), badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404), methodNotAllowed (405), overLimit (413), serviceUnavailable (503)
This operation returns the available actions on the specified server.
The following table describes the URI parameter:
Parameter
Description
server-id
The server's name or UUID.
The nova command is: nova instance-action-list <server-id>
There is no request body.
Example 3.25. List Server Actions: JSON Response
{
"instanceActions": [
{
"action": "reboot",
"instance_uuid": "86cf2416-aaa7-4579-a4d7-0bfe42bfa8ff",
"message": null,
"project_id": "453265",
"request_id": "req-7b6f6a5e-daf7-483e-aea5-a11993d1d357",
"start_time": "2013-08-15T21:40:42.000000",
"user_id": "35746"
},
{
"action": "create",
"instance_uuid": "86cf2416-aaa7-4579-a4d7-0bfe42bfa8ff",
"message": null,
"project_id": "453265",
"request_id": "req-920c6627-c8c9-4d02-9d3d-81917e5586df",
"start_time": "2013-07-12T21:35:37.000000",
"user_id": "35746"
}
]
}
3.7.2. Show Server Action
Verb
URI
Description
GET
/servers/{server-id}/os-instance-actions/{request-id}
Show server action.
Normal Response Code: 200
Error Response Codes: computeFault (500, …), badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404)
This operation returns the details of the specified action on the specified server.
The following table describes the URI parameters:
Parameter
Description
server-id
The server's name or UUID.
172
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Parameter
Description
request-id
The id of the server action.
API v2
The nova command is: nova instance-action <server-id> <request-id>.
There is no request body.
Example 3.26. Show Server Action: JSON Response
{
"instanceAction": {
"action": "create",
"instance_uuid": "86cf2416-aaa7-4579-a4d7-0bfe42bfa8ff",
"message": null,
"project_id": "453265",
"request_id": "req-920c6627-c8c9-4d02-9d3d-81917e5586df",
"start_time": "2013-07-12T21:35:37.000000",
"user_id": "35746"
}
}
3.8. Config Drive Extension
Verb
URI
Description
GET
/servers/{server-id}/os-instance-actions
Create server with config-drive.
Config_drive is a read-only configuration drive that is attached to server instances on boot.
It is given the label "config-2", and it shows up as a CDROM drive on the instance. It is especially useful in conjunction with cloud-init (a server bootstrapping application) and for passing large files to be used by your server.
To use the config drive, once it is attached to a server, you need to mount it. Mounting instructions vary by operating system. For some Linux operating systems, for example, you
might issue the following two instructions:
# mkdir -p /mnt/config
# mount /dev/disk/by-label/config-2 /mnt/config
When a config drive is created, it is configured by data contained in one or both of the following arguments:
user_data
contained in openstack/latest/user_data
Note
If the content of the user_data file is not
purely text, convert it by using base64 encoding to allow for proper transfer and storage. If your user_data needs to be encoded
and isn't, you'll get an 400 Userdata content
cannot be decoded message.
personality
located in openstack/content/0000 with the path listed in the openstack/latest/meta_data.json file. See Section 2.1.2.3, “Server Personality” [66].
173
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
The following list shows files present in the config drive if both user-data and personality arguments are passed during server creation:
• ec2/2009-04-04/meta-data.json
• ec2/2009-04-04/user-data
• ec2/latest/meta-data.json
• ec2/latest/user-data
• openstack/2012-08-10/meta_data.json
• openstack/2012-08-10/user_data
• openstack/content
• openstack/content/0000
• openstack/content/0001
• openstack/latest/meta_data.json
• openstack/latest/user_data
3.8.1. Create server with config_drive and user_data
Verb
URI
Description
POST
/servers
Create server with config_drive and user_data.
Normal Response Code: 200
Error Response Codes: computeFault (500, …), badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404), methodNotAllowed (405), overLimit (413), serviceUnavailable (503)
Example 3.27. Create server using config_drive with user_data: JSON Request
{
"server" : {
"OS-DCF:diskConfig" : "MANUAL",
"config_drive" : true,
"flavorRef" : "2",
"imageRef" : "bb06b82f-78ed-4d48-98ff-b011cdb0e947",
"key_name" : "stagingkey",
"max_count" : 1,
"min_count" : 1,
"name" : "test",
"networks" : [
{
"uuid" : "00000000-0000-0000-0000-000000000000"
},
{
"uuid" : "11111111-1111-1111-1111-111111111111"
}
],
"user_data" :
"I2Nsb3VkLWNvbmZpZwoKIyBib290IGNvbW1hbmRzCiMgZGVmYXVsdDogbm9uZQojIHRoaXMgaXMgdmVyeSBzaW1pbGFyIHRvIHJ1bmNtZCwgYnV0IGNvbW1
"
}
}
174
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 3.28. Create server using config_drive with user_data: JSON
Response
{
"server":
{
"OS-DCF:diskConfig":
"MANUAL",
"adminPass":
"LMoheHauXt8w",
"id":
"ef08aa7a-b5e4-4bb8-86df-5ac56230f841",
"links":
[
{
"href":"https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ef08aa7ab5e4-4bb8-86df-5ac56230f841",
"rel": "self"
},
{
"href":"https://dfw.servers.api.rackspacecloud.com/010101/servers/ef08aa7ab5e4-4bb8-86df-5ac56230f841",
"rel": "bookmark"
}
]
}
}
Example 3.29. Create server using config_drive with user_data: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<server
xmlns="http://docs.openstack.org/compute/api/v1.1"
imageRef="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001"
flavorRef="2"
config_drive="true"
name="api-test-server-xml2">
<metadata>
<meta key="My Server Name">APITest Server XML</meta>
</metadata>
<user_data>
IyEvYmluL2Jhc2gKL2Jpbi9zdQplY2hvICJJIGFtIGluIHlvdSEiCg==
</user_data>
<networks>
<uuid>0ef47ac7-6797-4e01-8a47-ed26ec3aaa56</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>11111111-1111-1111-1111-111111111111</uuid>
</networks>
<keypair>
<name>name_of_keypair-96bbe50e-05e1-4d59-9115-4779a3ebcc2e</name>
<public_key>ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr+o/6lHBQdW5aYd44bd8JttDCE/
F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ 02RhIPyyxYpv9FhY+2YiUkpwFOcLImyrxEsYXpD/
0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw==
Generated by Nova</public_key>
</keypair>
</server>
Example 3.30. Create server using config_drive with user_data: XML
Response
<?xml version="1.0" encoding="UTF-8"?>
<server
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1"
id="ed5c7754-29b6-45fa-96cb-ab64958c8c0a"
adminPass="Dd5pNZtpVVQ3"
OS-DCF:diskConfig="AUTO">
<metadata/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ed5c7754-29b6-45fa-96cbab64958c8c0a"
rel="self"/>
175
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/servers/ed5c7754-29b6-45fa-96cbab64958c8c0a"
rel="bookmark"/>
</server>
3.9. Launch an instance from a volume
You can boot General Purpose and IO server instances from a volume instead of an image,
using the API operation, or nova boot command, with the block-device parameter of
the server boot API operation. This moves the system disk from local to remote, providing
an a la carte storage experience and separating the system disk from the server.
Note
General Purpose and IO servers may be booted from volume.
Compute and Memory servers must be booted from volume, because image-based builds are not supported for these two flavor classes.
Standard and OnMetal servers may not be booted from volume.
Click the links in the following tasks to learn more about booting from volume:
• Create volume from image and boot instance
• Use pre-made bootable volume to boot instance
• API operations for to create or use bootable volumes
3.9.1. Create volume from image and boot instance
You can create a volume from an existing image, volume, or snapshot. This procedure
shows you how to create a bootable volume from an image, and use the volume to boot
an instance, instead of using an image.
Procedure 3.1. To create a bootable image and boot a server
1.
Create a bootable volume from an image
$ nova volume-create 100 --volume-type=SSD --display-name=BFB-test-SSD -image-id=ff228647-fd57-47fe-b42d-2b7813bb9115
Once the volume is online, the new volume's UUID will be passed to nova.
Here is the JSON request body for the same request, if you don't use the nova client:
{
"volume": {
"display_name": "BFB-test-SSD",
"imageRef": "ff228647-fd57-47fe-b42d-2b7813bb9115",
"availability_zone": null,
"volume_type": "SSD",
"display_description": null,
"snapshot_id": null,
176
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"size": 100
}
}'
2.
Boot a server from the bootable volume:
$nova boot --flavor compute1-15 --block-device-mapping vda=
8dcf68f9-0321-42f3-a3dc-b861b9335a9b:::0 BFVServer
Note
Block device mapping is in the following format:
<dev_name>=<id>:<type>:<size(GB)>:<delete_on_terminate>. Type and size
can be left blank, delete on terminate can be expressed as True or 1 and
False or 0.
This command creates a Compute1 15GB server named BVFServer, which persists on
server termination.
Here is the JSON request body for the same request, if you don't use the nova client:
{
"server": {
"name": "BFVServer",
"imageRef": "",
"block_device_mapping": [
{
"volume_id": "8dcf68f9-0321-42f3-a3dc-b861b9335a9b",
"delete_on_termination": "0",
"device_name": "vda"
}
],
"flavorRef": "compute1-15",
"max_count": 1,
"min_count": 1,
"networks": [
{
"uuid": "00000000-0000-0000-0000-000000000000"
},
{
"uuid": "11111111-1111-1111-1111-111111111111"
}
]
}
}'
You can also create a bootable volume and boot a server in a single step.
Procedure 3.2. To create a bootable image and boot a server in a single step
•
Boot server from bootable volume, without first creating the volume:
$nova boot --flavor compute1-15 --block-device source=image,id=
e0b7734d-2331-42a3-b19e-067adc0da17d,dest=volume,size=100,shutdown=
preserve,bootindex=0 BFVServer
177
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
This command creates a Compute1 15GB server from a volume that is prepped with
the image set by the id.
See Section 3.9.3, “API operations for creating or using bootable volumes” [179] for
a JSON example, if you don't use the nova client,
3.9.2. Use pre-made bootable volume to boot instance
You can use a pre-made bootable volume use it to boot an instance, instead of using an image. Pre-made bootable volumes are just Cloud Block Storage volumes that include the "imageRef" key in the JSON object. The key needs to have the value of an image's UUID in order to be bootable. If it is not bootable, it will show an empty string.
The following example shows the nova command for booting a server from an existing volume:
$nova boot --flavor compute1-15 --block-device-mapping vda=8dcf68f9-0321-42f3a3dc-b861b9335a9b:::0 BFVServer
Note
Block device mapping is in the following format:
vda=<dev_id>:<type>:<size(GB)>:<delete_on_terminate>. Type and size can be
left blank, delete on terminate can be expressed as True or 1 and False or 0.
This command creates a Compute1 15GB server named BVFServer.
The following example shows a cURL command for booting a server from an existing volume:
$curl -i 'https://preprod.ord.servers.api.rackspacecloud.com/v2/5892688/osvolumes_boot' -X POST
-H "Content-Type: application/json" -H "X-Auth-Token: $token" -d '{"server":
{"name":"BFVServer5","imageRef":"", \
"block_device_mapping_v2":[{"boot_index":"0","uuid":"bb02b1a3-bc77-4d17ab5b-421d89850fca","volume_size":"100", \
"source_type":"image","destination_type":"volume",
"delete_on_termination":false}], \
"flavorRef":"general1-1","max_count":1,"min_count":1, \
"networks":[{"uuid":"00000000-0000-0000-0000-000000000000"},
{"uuid":"11111111-1111-1111-1111-111111111111"}]}}' \
| python -m json.tool
This command creates a General Purpose v1 1GB server named BVFServer5.
Here is the JSON request body for the same request, if you don't use the nova client:
{
"server": {
"name": "BFVServer5",
"imageRef": "",
"block_device_mapping": [
{
"boot_index":"0"
178
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"uuid":"bb02b1a3-bc77-4d17-ab5b-421d89850fca",
"volume_size":"100",
"source_type":"image",
"destination_type":"volume",
"delete_on_termination":false
}
],
"flavorRef": "general1-1",
"max_count": 1,
"min_count": 1,
"networks": [
{
"uuid": "00000000-0000-0000-0000-000000000000"
},
{
"uuid": "11111111-1111-1111-1111-111111111111"
}
]
}
}'
3.9.3. API operations for creating or using bootable volumes
Verb
URI
Description
POST
/servers
Create volume and boot server in one step.
3.9.3.1. Create bootable volume and boot server in one step
Verb
URI
Description
POST
/servers
Creates a volume and boots a server in one step
Normal Response Code: OK (200)
This operation creates a bootable volume and boots a server in one step.
This operation requires a request body. The following example shows a JSON response for
the create volume and boot server in one step operation.
Note
The block_device_mapping_v2 attribute uuid could be the ID of Cloud
Image or an already prepared volume. In the following example, it's a Cloud Images image with the uuid bb02b1a3-bc77-4d17-ab5b-421d89850fca,
and thus the block_device_mapping_v2 attribute source_type is set to
image.
Example 3.31. One-step create volume and boot server: JSON Request
{
"server":{
"name":"BFVServer5",
"imageRef":"",
"block_device_mapping_v2":[
{
"boot_index":"0",
"uuid":"bb02b1a3-bc77-4d17-ab5b-421d89850fca",
"volume_size":"100",
179
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
"source_type":"image",
"destination_type":"volume",
"delete_on_termination":false
}
],
"flavorRef":"compute1-15",
"max_count":1,
"min_count":1,
"networks":[
{
"uuid":"00000000-0000-0000-0000-000000000000"
},
{
"uuid":"11111111-1111-1111-1111-111111111111"
}
]
}
}
This operation returns a response body. The following example shows a JSON response for
the create volume and boot server in one step operation.
Example 3.32. One-step create volume and boot server: JSON Response
{
"server":{
"OS-DCF:diskConfig":"MANUAL",
"id":"42f9607f-41c4-48e5-8206-2732aee9456b",
"links":[
{
"href":"https://iad.servers.api.rackspacecloud.com/v2/596067/servers/
42f9607f-41c4-48e5-8206-2732aee9456b",
"rel":"self"
},
{
"href":"https://iad.servers.api.rackspacecloud.com/596067/servers/
42f9607f-41c4-48e5-8206-2732aee9456b",
"rel":"bookmark"
}
],
"adminPass":"pass"
}
}
3.10. Network extension
Cloud Networks lets you create a virtual Layer 2 network, known as an isolated network,
which gives you greater control and security when you deploy web applications.
When you create a next generation Cloud Server, Cloud Networks enables you to attach
one or more networks to your server. You can attach an isolated network that you have
created or a Rackspace network.
If you install the Cloud Networks virtual interface extension, you can create a virtual interface to a specified Rackspace or isolated network and attach that network to an existing
server instance. You can also list virtual interfaces for and delete virtual interfaces from a
server instance. For information about the Cloud Networks virtual interface extension, see
Section 3.10.1, “Cloud Networks Virtual Interface Extension” [181].
Cloud Networks enables you to attach one or more of the following networks to your server:
• PublicNet. Provides access to the Internet, Rackspace services such as Cloud Monitoring,
Managed Operations Service Level Support, RackConnect, Cloud Backup, and certain operating system updates.
180
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
When you list networks through Cloud Networks, PublicNet is labeled public.
• ServiceNet. Provides access to Rackspace services such as Cloud Files, Cloud Databases,
and Cloud Backup, and to certain packages and patches through an internal only, multi-tenant network connection within each Rackspace data center.
When you list networks through Cloud Networks, ServiceNet is labeled private.
You can use ServiceNet for communications among web servers, application servers, and
database servers without incurring bandwidth charges. However, without an isolated
network, you must apply security rules to protect data integrity. When you add or remove a server, you must update the security rules on individual servers to permit or deny
connections from newly added servers or removed servers.
• Isolated. Enables you to deploy web applications on a virtual Layer 2 network that you
create through Cloud Networks. Keeps your server separate from PublicNet, ServiceNet,
or both. When you create a isolated network, it is associated with your tenant ID.
3.10.1. Cloud Networks Virtual Interface Extension
Use the Cloud Networks virtual interface extension to create a virtual interface to a specified network and attach that network to an existing server instance. You can attach an isolated network that you have created or a Rackspace network.
A virtual interface works in the same way as the network interface card (NIC) inside your
laptop. Like a NIC, a virtual interface is the medium through which you can attach a network. To use a virtual interface to attach a network to your server, you create and connect
a virtual interface for a specified network to a server instance. The network, which is comprised of logical switches, is attached to your server instance through the virtual interface.
You can create a maximum of one virtual interface per instance per network.
You can also use the Cloud Networks virtual interface extension to:
• List the virtual interfaces for a server instance.
• Delete a virtual interface for a network from a server instance. When you delete a virtual
interface, the associated network is detached from the server instance.
If you want to delete an isolated network, the network cannot be attached to any server. Delete the virtual interface for the isolated network, and then you can delete the network.
3.10.2. Networks
This section describes the API operations for the networks extension.
3.10.2.1. Networks
Verb
URI
Description
GET
/os-networksv2
Lists the networks configured for a specified tenant ID.
181
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Verb
URI
Description
POST
/os-networksv2
Creates a network for the specified tenant ID.
POST
/os-networksv2
Provisions a new server and attaches networks.
GET
/os-networksv2/id
Shows information for a specified network ID.
DELETE
/os-networksv2/id
Deletes the specified network.
API v2
3.10.2.1.1. List Networks
Verb
URI
Description
GET
/os-networksv2
Lists the networks configured for a specified tenant ID.
Normal Response Code: OK (200)
Error Response Codes: Unauthorized (401), Forbidden (403)
Lists the networks configured for the tenant ID specified in the request URI.
This operation does not require a request body.
This operation returns a response body. The response body returns the following fields:
Table 3.3. List Networks Response Fields
Name
Description
id
The network ID.
label
The name of the network. ServiceNet is labeled as private and PublicNet is labeled as public in the network list.
cidr
The CIDR for an isolated network.
Note
To list the networks that are associated with servers, see List Servers in the Next
Generation Cloud Servers Developer Guide.
The following examples show a JSON and an XML response for the list networks operation.
Example 3.33. List Networks: JSON Response
{
"networks":[
{
"cidr":"192.168.0.0/24",
"id":"1f84c238-b05a-4374-a0cb-aa6140032cd1",
"label":"new_network"
},
{
"id":"00000000-0000-0000-0000-000000000000",
"label":"public"
},
{
"id":"11111111-1111-1111-1111-111111111111",
"label":"private"
}
]
}
Example 3.34. List Networks: XML Response
182
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
<?xml version='1.0' encoding='UTF-8'?>
<networks>
<network>
<cidr>172.16.0.0/24</cidr>
<id>e65accc0-1d98-45eb-af76-ab3d31edc7d2</id>
<label>new_network</label>
</network>
<network>
<id>00000000-0000-0000-0000-000000000000</id>
<label>public</label>
</network>
<network>
<id>11111111-1111-1111-1111-111111111111</id>
<label>private</label>
</network>
</networks>
3.10.2.1.2. Create Network
Verb
URI
Description
POST
/os-networksv2
Creates a network for the specified tenant ID.
Normal Response Code: OK (200)
Error Response Codes: Bad Request (400), Unauthorized (401), Forbidden (403)
This operation creates a network for the specified tenant ID.
This operation requires a request body. Specify the following attributes in the request
body:
Table 3.4. Create Network Request Attributes
Name
Description
Required
cidr
The IP block from which to allocate the network. For example, 172.16.0.0/24
or 2001:DB8::/64. For more information about CIDR notation, see CIDR Notation.
Yes
label
The name of the new network. For example, my_new_network.
Yes
This operation returns a response body. The response body returns the following fields:
Table 3.5. Create Network Response Fields
Name
Description
cidr
The IP block from which the network was allocated.
id
The network ID.
label
The name of the new network.
The following examples show a JSON and XML requests and responses for the create network operation.
Example 3.35. Create Network: JSON Request
{
"network":
{
"cidr": "192.168.0.0/24",
"label": "superprivate"
}
}
183
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 3.36. Create Network: JSON Response
{
"network": {
"cidr": "192.168.0.0/24",
"id": "1ff4489e-db0e-45a6-8c9f-4616c6ef5db1",
"label": "superprivate"
}
}
Example 3.37. Create Network: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<network
cidr="192.168.0.0/24"
label="superprivate_xml"
/>
Example 3.38. Create Network: XML Response
<network>
<cidr>192.168.0.0/24</cidr>
<id>f212726e-6321-4210-9bae-a13f5a33f83f</id>
<label>superprivate_xml</label>
</network>
3.10.2.1.3. Provision Server and Attach Networks
Verb
URI
Description
POST
/servers
Provisions a new server with specified networks.
Normal Response Code: Accepted (202)
Error Response Codes: computeFault (400, 500, …), Bad Request (400), Unauthorized (401),
Forbidden (403), Not Found (404), Bad Method (405), Request Entity Too Large (413), Unsupported Media Type (415), Service Unavailable (503)
Status Transition:
BUILD
ACTIVE
BUILD
ERROR (on error)
This operation asynchronously provisions a new server.
You must specify the networks that you want to attach to your server. If you do not specify
any networks, ServiceNet and PublicNet are attached by default. For information about the
Rackspace networks, see Isolated Networks and Rackspace Networks.
You can optionally provision the server instance with specified isolated networks. However, if you specify an isolated network, you must explicitly specify the UUIDs for PublicNet and ServiceNet to attach these networks to your server. The UUID for ServiceNet
is 11111111-1111-1111-1111-111111111111, and the UUID for PublicNet is
00000000-0000-0000-0000-000000000000. Omit these UUIDs from the request to
detach from these networks.
Note
Rack Connect and Managed Operations Service Level customers will receive an
error if they opt out of attaching to PublicNet or ServiceNet.
To attach a network to an existing server, you must create a virtual interface. See Section 3.10.2.2, “Virtual Interfaces” [189].
184
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
For complete information about this API operation, see Create Server in the Next Generation Cloud Servers Developer Guide.
Note
To list the networks that are associated with servers, see List Servers in the Next
Generation Cloud Servers Developer Guide.
185
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
The following table describes the required and optional attributes that you can specify in
the request body:
Table 3.6. Provision Server with Isolated Network Request Attributes
Name
Description
Required
name
The server name.
Yes
imageRef
The image reference. Specify as an ID or full URL.
Yes
flavorRef
The flavor reference. Specify as an ID or full URL.
Yes
networks
By default, the server instance is provisioned with all Rackspace networks and isolated networks for the tenant. Optionally, to provision the server instance with a
specific isolated tenant network, specify the UUID of the network in the uuid attribute. You can specify multiple UUIDs.
No
OS-DCF:diskConfig
The disk configuration value, which is AUTO or MANUAL. See Disk Configuration Ex- No
tension.
metadata
Metadata key and value pairs.
No
personality
File path and contents.
No
The following examples show a JSON and XML requests and responses for the provision
server operation.
Example 3.39. Provision Server with Isolated Network: JSON Request
{
"server" : {
"name" : "api-test-server-1",
"imageRef" : "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001",
"flavorRef" : "2",
"config_drive": true,
"key_name":"name_of_keypair",
"OS-DCF:diskConfig" : "AUTO",
"metadata" : {
"My Server Name" : "API Test Server 1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
],
"networks": [
{
"uuid": "f212726e-6321-4210-9bae-a13f5a33f83f"
},
{
"uuid": "00000000-0000-0000-0000-000000000000"
},
{
"uuid": "11111111-1111-1111-1111-111111111111"
}
]
}
}
Example 3.40. Provision Server with Isolated Network: JSON Response
{
"server": {
"OS-DCF:diskConfig": "AUTO",
"adminPass": "LMoheHauXt8w",
"id": "ef08aa7a-b5e4-4bb8-86df-5ac56230f841",
"links": [
{
186
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
"href": "https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ef08aa7ab5e4-4bb8-86df-5ac56230f841",
"rel": "self"
},
{
"href": "https://dfw.servers.api.rackspacecloud.com/010101/servers/ef08aa7ab5e4-4bb8-86df-5ac56230f841",
"rel": "bookmark"
}
]
}
}
187
API v2
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 3.41. Provision Server with Isolated Network: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" imageRef="3afe97b2-26dc-49c5-a2cca2fc8d80c001" flavorRef="2"
name="api-test-server-xml2">
<metadata>
<meta key="My Server Name">API Test Server XML</meta>
</metadata>
<personality>
<file path="/etc/banner.txt"> ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA==</file>
</personality>
<networks>
<network uuid="0ef47ac7-6797-4e01-8a47-ed26ec3aaa56"/>
<network uuid="00000000-0000-0000-0000-000000000000"/>
<network uuid="11111111-1111-1111-1111-111111111111"/>
</networks>
<keypair>
<key_name>name_of_keypair-96bbe50e-05e1-4d59-9115-4779a3ebcc2e</key_name>
</keypair>
</server>
Example 3.42. Provision Server with Isolated Network: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<server
xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/compute/api/v1.1"
id="ed5c7754-29b6-45fa-96cb-ab64958c8c0a" adminPass="Dd5pNZtpVVQ3"
OS-DCF:diskConfig="AUTO">
<metadata/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ed5c7754-29b6-45fa-96cbab64958c8c0a"
rel="self"/>
<atom:link
href="https://dfw.servers.api.rackspacecloud.com/010101/servers/ed5c7754-29b6-45fa-96cbab64958c8c0a"
rel="bookmark"/>
</server>
3.10.2.1.4. Show Network
Verb
URI
Description
GET
/os-networksv2/id
Shows information for a specified network ID.
Normal Response Code: OK (200)
Error Response Codes: Unauthorized (401), Forbidden (403), Network Not Found (420)
Specify the network ID as id in the URI.
This operation shows information for the specified network ID.
Note
To list the networks that are associated with servers, see List Servers in the Next
Generation Cloud Servers Developer Guide.
This operation does not require a request body.
188
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
This operation returns a response body. The response body returns the following fields:
Table 3.7. Show Network Response Fields
Name
Description
cidr
The CIDR for an isolated private network.
id
The network ID.
label
The name of the network.
The following examples show a JSON and an XML response for the show network operation.
Example 3.43. Show Network: JSON Response
{
"network": {
"cidr": "192.168.0.0/24",
"id": "f212726e-6321-4210-9bae-a13f5a33f83f",
"label": "superprivate_xml"
}
}
Example 3.44. Show Network: XML Response
<network>
<cidr>192.168.0.0/24</cidr>
<id>f212726e-6321-4210-9bae-a13f5a33f83f</id>
<label>superprivate_xml</label>
</network>
3.10.2.1.5. Delete Network
Verb
URI
Description
DELETE
/os-networksv2/id
Deletes the specified network.
Normal Response Code: Accepted (202)
Error Response Codes: Bad Request (400), Unauthorized (401), Forbidden (403), Network
Not Found (404)
This operation deletes the network specified in the URI.
You cannot delete an isolated network unless the network is not attached to any server.
To detach a network from a server, delete the virtual interface for the network from the
server instance. See Section 3.10.2.2.3, “Delete Virtual Interface” [193].
This operation does not require a request body.
This operation does not return a response body.
3.10.2.2. Virtual Interfaces
Use the Cloud Networks virtual interface extension to create a virtual interface to a specified network and attach that network to an existing server instance. You can attach a an
isolated network that you have created or a Rackspace network.
A virtual interface works in the same way as the network interface card (NIC) inside your
laptop. Like a NIC, a virtual interface is the medium through which you can attach a net189
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
work. To use a virtual interface to attach a network to your server, you create and connect
a virtual interface for a specified network to a server instance. The network, which is comprised of logical switches, is attached to your server instance through the virtual interface.
You can create a maximum of one virtual interface per instance per network.
You can also use the Cloud Networks virtual interface extension to:
• List the virtual interfaces for a server instance.
• Delete a virtual interface and detach it from a server instance.
Verb
URI
Description
GET
/servers/instance_id/os-virtual-interfacesv2
Lists the virtual interfaces configured for a server instance.
POST
/servers/instance_id/os-virtual-interfacesv2
Creates a virtual interface for a network and attaches the
network to a server instance.
DELETE
/servers/instance_id/os-virtual-interfacesv2/interface_id
Deletes a virtual interface from a server instance.
3.10.2.2.1. List Virtual Interfaces
Verb
URI
Description
GET
/servers/instance_id/os-virtual-interfacesv2
Lists the virtual interfaces configured for a server instance.
Normal Response Code: OK (200)
Error Response Codes: Unauthorized (401), Forbidden (403)
Lists the virtual interfaces configured for a server instance.
Specify the server instance ID as instance_id in the URI.
This operation does not require a request body.
This operation returns a response body. The response body returns the following fields:
Table 3.8. List Virtual Interfaces Response Fields
Name
Description
id
The virtual interface ID.
ip_addresses
For each IP address associated with the virtual interface, lists the address, network ID, and network label.
mac_address
The Media Access Control (MAC) address for the virtual interface. A MAC address is a unique
identifier assigned to network interfaces for communications on the physical network segment.
The following examples show a JSON and an XML response for the list virtual interfaces operation.
Example 3.45. List Virtual Interfaces: JSON Response
{
"virtual_interfaces": [
{
"id": "a589b11b-cd51-4274-8ec0-832ce799d156",
"ip_addresses": [
190
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
{
"address": "2001:4800:7810:0512:d87b:9cbc:ff04:850c",
"network_id": "ba122b32-dbcc-4c21-836e-b701996baeb3",
"network_label": "public"
},
{
"address": "64.49.226.149",
"network_id": "ba122b32-dbcc-4c21-836e-b701996baeb3",
"network_label": "public"
}
],
"mac_address": "BC:76:4E:04:85:0C"
},
{
"id": "de7c6d53-b895-4b4a-963c-517ccb0f0775",
"ip_addresses": [
{
"address": "192.168.0.2",
"network_id": "f212726e-6321-4210-9bae-a13f5a33f83f",
"network_label": "superprivate_xml"
}
],
"mac_address": "BC:76:4E:04:85:20"
},
{
"id": "e14e789d-3b98-44a6-9c2d-c23eb1d1465c",
"ip_addresses": [
{
"address": "10.181.1.30",
"network_id": "3b324a1b-31b8-4db5-9fe5-4a2067f60297",
"network_label": "private"
}
],
"mac_address": "BC:76:4E:04:81:55"
}
]
}
Example 3.46. List Virtual Interfaces: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<virtual_interfaces xmlns="http://docs.openstack.org/compute/api/v1.1">
<virtual_interface id="a589b11b-cd51-4274-8ec0-832ce799d156" mac_address="BC:76:4E:04:85:0C">
<ip_address network_id="ba122b32-dbcc-4c21-836e-b701996baeb3" network_label="public" address=
"2001:4800:7810:0512:d87b:9cbc:ff04:850c" />
<ip_address network_id="ba122b32-dbcc-4c21-836e-b701996baeb3" network_label="public" address=
"64.49.226.149" />
</virtual_interface>
<virtual_interface id="de7c6d53-b895-4b4a-963c-517ccb0f0775" mac_address="BC:76:4E:04:85:20">
<ip_address network_id="f212726e-6321-4210-9bae-a13f5a33f83f" network_label="superprivate_xml"
address="192.168.0.2" />
</virtual_interface>
<virtual_interface id="e14e789d-3b98-44a6-9c2d-c23eb1d1465c" mac_address="BC:76:4E:04:81:55">
<ip_address network_id="3b324a1b-31b8-4db5-9fe5-4a2067f60297" network_label="public" address=
"10.181.1.30" />
</virtual_interface>
</virtual_interfaces>
3.10.2.2.2. Create Virtual Interface
Verb
URI
Description
POST
/servers/instance_id/os-virtual-interfacesv2
Creates a virtual interface for a network and attaches the
network to a server instance.
Normal Response Code: OK (200)
Error Response Codes: Bad Request (400), Unauthorized (401), Forbidden (403)
This operation creates a virtual interface for a network and attaches the network to a server instance.
Specify the server instance ID as instance_id in the URI.
191
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Specify the network ID in the request body.
You can create a maximum of one virtual interface per instance per network.
This operation requires a request body. Specify the following attributes in the request
body:
Table 3.9. Create Virtual Interface Request Attributes
Name
Description
Required
network_id
The ID of the network for which you want to create a virtual interface. You can
create a virtual interface for an isolated or Rackspace network.
Yes
This operation returns a response body. The response body returns the following fields:
Table 3.10. Create Virtual Interface Response Fields
Name
Description
mac_address
The Media Access Control (MAC) address for the virtual interface. A MAC address is a unique
identifier assigned to network interfaces for communications on the physical network segment.
id
The virtual interface ID.
ip_addresses
For each IP address associated with the virtual interface, lists the following information:
• address. The IP address.
• network ID. The ID for the associated network.
• network label. The label for the associated network.
The following examples show a JSON and XML requests and responses for the create virtual interface operation.
Example 3.47. Create Virtual Interface: JSON Request
{
"virtual_interface":
{
"network_id": "1f7920d3-0e63-4fec-a1cb-f7916671e8eb"
}
}
Example 3.48. Create Virtual Interface: JSON Response
{
"virtual_interfaces":[
{
"mac_address":"FE:ED:FA:00:08:93",
"id":"045f195f-3347-487b-8e80-8ee3390eda56",
"ip_addresses":[
{
"address":"192.168.0.1",
"network_id":"196a0246-86cc-46fa-9ecf-850f67c2cb7c",
"network_label":"added_network"
}
]
}
]
}
Example 3.49. Create Virtual Interface: XML Request
<?xml version="1.0" encoding="UTF-8"?>
<virtual_interface
network_id="0ef47ac7-6797-4e01-8a47-ed26ec3aaa56"
/>
192
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Example 3.50. Create Virtual Interface: XML Response
<?xml version='1.0' encoding='UTF-8'?>
<virtual_interfaces xmlns="http://docs.openstack.org/compute/api/v1.1">
<virtual_interface id="24293921-e8fe-4f93-ac52-b8cc08435d00"
mac_address="FE:ED:FA:00:0D:13">
<ip_address address="1.1.1.129"
network_id="6d17d84a-9513-4c4c-bf5a-c2d5c0794292"
network_label="added_network"/>
</virtual_interface>
</virtual_interfaces>
3.10.2.2.3. Delete Virtual Interface
Verb
URI
Description
DELETE
/servers/instance_id/os-virtual-interfacesv2/interface_id
Deletes a virtual interface from a server instance.
Normal Response Code: OK (200)
Error Response Codes: Bad Request (400), Unauthorized (401), Forbidden (403), Network
Not Found (404)
This operation deletes the specified virtual interface from the specified server instance.
Specify the server instance ID as instance_id in the URI.
Specify the virtual interface ID as interface_id in the URI. To find the ID of a virtual interface, issue the list virtual interfaces API operation. See Section 3.10.2.2.1, “List Virtual Interfaces” [190].
This operation does not require a request body.
This operation does not return a response body.
193
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
4. Document Change History
This version of the document replaces and obsoletes all previous versions. The following table describes the most recent changes:
Revision Date
Summary of Changes
February 9, 2015
• Updated Section 2.1.2, “Create Server” [60] and Section 3.8, “Config Drive Extension” [173]
clarifying the config_drive parameter and functionality.
• Added link from personality section to config_drive in Section 2.1.2.3, “Server Personality” [66].
• Added json examples to Section 3.9.1, “Create volume from image and boot instance” [176].
January 30, 2015
• Updated Preface [ix] section with information about the migration of First Gen servers to
Next Gen servers.
January 22, 2015
Updated Section 3.8, “Config Drive Extension” [173] to note that non-text user_data files must
be base64 encoded.
January 12, 2015
Updated Section 1.3.2, “Authentication Request” [7] documentation with information about
using multi-factor authentication for added security when a user authenticates with username
and password credentials.
January 7, 2015
• Updated the auto_disk_config image metadata key Section 2.8.5, “Set Metadata
Item” [153].
• Updated information about RXTX factor in Section 1.13, “Flavors” [44].
December 17, 2014
• Added Boot from existing example Section 3.9.2, “Use pre-made bootable volume to boot
instance” [178].
December 4, 2014
• Corrected entry for Compute1-4 disk size Section 1.13.3, “Supported Flavors for Cloud
Servers” [47].
• Removed version operations which are no longer supported.
November 13, 2014
• Updated so that General Purpose servers are not described as able to be resized in Section 2.4.4, “Resize Server” [97].
October 30, 2014
• Updated following sections to support the Performance flavor rename and introduction
of new flavors: Revised flavors descriptions and names, and added a table detailing flavors
in section Section 1.13, “Flavors” [44], updated boot from volume examples in section Section 3.9, “Launch an instance from a volume” [176], and updated example in section Section 3.6, “Flavors Extra Specs Extension” [171].
• Fixed request example header in Section 3.9.3.1, “Create bootable volume and boot server
in one step” [179].
October 15, 2014
• Updated feedback link
October 9, 2014
• Updated Knowledge Center article link for guidance about selecting regional endpoints section: Section 1.14, “Service Access Endpoints” [48].
• Updated link for submitting feedback
• Fixed cURL example for image creation in Section 2.4.9, “Create Image” [104]
• Added instructions on creating bootable volumes to Section 3.9, “Launch an instance from a
volume” [176].
• Added network extension documentation in Section 3.10, “Network extension” [180].
August 21, 2014
• updated Knowledge Center article link for guidance about selecting regional endpoints section: Section 1.14, “Service Access Endpoints” [48].
• added scheduled image day-of-week parameter to Section 3.5, “Scheduled Images Extension” [166].
July 24, 2014
• Added OnMetal flavors to Section 1.13, “Flavors” [44], including note that you can't attach
block storage to OnMetal servers.
• Noted that private networks won't work for OnMetal servers, noted that OnMetal servers
must be created using ssh key pairs and that admin password is meaningless, and not-
194
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Revision Date
API v2
Summary of Changes
ed need to wait a few moments for network config to complete when building OnMetal
servers in Section 2.1.2, “Create Server” [60].
• Noted that passwords are meaningless for OnMetal in Section 2.1.2.1, “Server Passwords” [65] and Section 2.4.1, “Change Administrator Password” [90].
• Noted that server actions are not available for OnMetal servers for following actions: Section 2.4.3, “Rebuild Server” [92], Section 2.4.4, “Resize Server” [97], Section 2.4.5, “Confirm
Resized Server” [99], Section 2.4.1, “Change Administrator Password” [90], Section 2.4.6,
“Revert Resized Server” [100], Section 2.4.7, “Rescue Server” [101], Section 2.4.8, “Unrescue
Server” [103], and Section 2.4.9, “Create Image” [104].
• Adjusted list flavors example in Section 2.6.1, “List Flavors” [111].
• Need to adjusted list images example in Section 2.7.1, “List Images” [124].
• Added guidance about selecting regional endpoints section: Section 1.14, “Service Access
Endpoints” [48].
July 15, 2014
• Updated the name for Managed Operations Service Level in Section 1.1, “Cloud Servers Concepts” [1].
May 29, 2014
• Updated absolute limits in Section 1.9.2, “Absolute Limits” [25].
May 7, 2014
• Corrected json example in authentication.
May 6, 2014
• Added note about image creation. Section 2.7, “Images” [124].
April 4, 2014
• Corrected json and xml example in Section 2.7.1, “List Images” [124].
March 11, 2014
• Added drive mounting example to Section 3.8, “Config Drive Extension” [173].
February 12, 2014
• Added list of operations using changes-since parameter in Section 1.7, “Efficient Polling with
the Changes-Since Parameter” [22].
February 6, 2014
• Updated some examples and shared content.
January 24, 2014
• Moved section Section 2.2, “Server Key Pairs” [82] under API Operations and grouped creation and uploading keypairs into subsection.
• Correct Key pair example in Section 2.2.1.1, “Create Server Key Pair” [82] adding missing
properties.
• Corrected typo in Chapter 3, “Rackspace Extensions” [156]
• Corrected response examples in Section 2.3.2, “List Addresses by Network” [88]
January 17, 2014
• Correct Key pair example in Section 2.1.2, “Create Server” [60]
• Corrected details for last page of collection in Section 1.6, “Paginated Collections” [19]
December 10, 2013
• Fixed Identity operation links in section Section 1.12.1, “Assigning Roles to Account
Users” [43]
December 4, 2013
• Updated the name for Managed Cloud Service Level in Section 1.1, “Cloud Servers Concepts” [1].
• Corrected create server xml request in Section 2.1.2, “Create Server” [60].
• Marked name and password attributes as not required in Section 2.4.3, “Rebuild Server” [92].
• Removed image_backup from OS-EXT-STS:task_state [
].
November 25, 2013
• Changed quota from 65 to 128GB Section 1.8, “Quotas” [23].
November 13, 2013
• Fixed syntax error in Section 2.1.1.4, “ List Server Response Fields for GET /servers/detail” [58].
November 5, 2013
• Fixed Json errors in Example 1.38, “Extended Action: JSON Request” [35], Example 2.78,
“List Images: JSON Response (detail)” [125], Section 2.3.2, “List Addresses by Network” [88]
Section 1.5, “Links and References” [15] Section 2.1.2, “Create Server” [60]
• Fixed Json errors.
November 4, 2013
• Published Performance server information, previously limited access.
October 31, 2013
• Corrected name of metadata parameter in Section 2.8.2, “Set Metadata” [148]
• updated examples in Section 2.6.1, “List Flavors” [111]
195
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Revision Date
API v2
Summary of Changes
October 30, 2013
• updated examples to include performance 1 details in Section 2.6.1, “List Flavors” [111]
October 7, 2013
•
•
•
•
•
•
•
October 17, 2013
• Updated create server examples to correct key pair references Section 2.1.2, “Create Server” [60]
October 9, 2013
• Added config drive extension Section 3.8, “Config Drive Extension” [173] and linked it in Section 2.1.2, “Create Server” [60]
• Corrected keypair examples for Section 2.1.2, “Create Server” [60] and Section 2.2.1.1, “Create Server Key Pair” [82]
• Modified Section 3.2, “Extended Status Extension” [160], correcting some image information.
September 26, 2013
• Added section Section 1.12, “Role Based Access Control” [43]
• Added section Section 3.7, “Instance Actions Extension” [171]
August 29, 2013
• Finished removing references to bandwidth extension.
August 14, 2013
• Corrected Section 2.3.2, “List Addresses by Network” [88] to use networkLabel instead of
networkID.
August 2, 2013
• Added Section 2.8.5.1, “Using auto_disk_config image metadata key” [154].
July 26, 2013
• Reorganized API call Section 2.1.1, “List Servers” [50].
July 25, 2013
• Amended API call Section 2.8.3, “Update Metadata” [150].
July 12, 2013
• Corrected description for auto assignment of device id (should be "null" not "auto") and xml
request for Section 2.5.1, “Attach Volume to Server” [106].
• Removed the Bandwidth extension from Chapter 3, “Rackspace Extensions” [156] since
the extension is no longer implemented. It causes an unsustainable load on Nova. Also removed cross-reference from Section 2.1.1, “List Servers” [50] and Section 2.1.4, “Get Server
Details” [68]
• Updated json examples to include OS-DCF prefix for diskConfig attribute in Section 3.1.3,
“Changes to Rebuild Server” [158] and Section 3.1.4, “Changes to Resize Server” [159].
June 26, 2013
• Added Server Key Pairs APIs. See Section 2.2, “Server Key Pairs” [82].
June 24, 2013
• Added important note that user may choose any endpoint regardless of account origin.
June 5, 2013
• Added Scheduled Images Extension Details
performance flavor enhancement info: Section 2.4.4, “Resize Server” [97]
performance flavor enhancement info: Section 2.4.9, “Create Image” [104]
performance flavor enhancement info: Section 2.6.1, “List Flavors” [111]
performance flavor enhancement info: Section 2.6.2, “Get Flavor Details” [122]
performance flavor enhancement info: Section 3.6, “Flavors Extra Specs Extension” [171]
performance flavor enhancement info: Section 2.7, “Images” [124]
performance flavor enhancement info: Section 1.13, “Flavors” [44]
• Revised maxPersonalitySize to 1000
May 24, 2013
• Added python-pip versions of sudo pip calls in the installing nova client section
May 23, 2013
• Updated "control panel" to "Control Panel."
May 20, 2013
• Updated description of update server in Section 2.1.5, “Update Server” [75].
May 14, 2013
• Updated description of file injection in Section 2.1.2.3, “Server Personality” [66].
May 22, 2013
• Changed language to Cloud Control Panel.
May 1, 2013
• Updated the unrescue API operation to remove the response body. This call does not return
a response body.
April 22, 2013
• Updated incorrect XML example in the get image details API operation.
• Added information about how to determine if an image is a base or custom image.
April 15, 2013
• Added section about quotas.
• Updated the default rate limits.
• Updated the cURL examples in the list servers API operation to show export of environment
variables.
February 4, 2013
• Updated the change administrator password API operation to define administrator password as the root password for the server.
196
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Revision Date
API v2
Summary of Changes
January 31, 2013
• Minor updates.
January 23, 2013
• Updated the links and references topic to show the personality attribute in the JSON examples.
January 21, 2013
• Updated the list images API operation to correct the SERVER filter to SNAPSHOT.
• Abbreviated the list images example responses.
January 18, 2013
• Updated the diskConfig extended attribute to OS-DCF:diskConfig throughout the
guide.
• Removed normal response code 300 from the get server details API operation.
January 16, 2013
• Updated the Section 2.5, “Volume Attachment Actions” [106] to correct the JSON and XML
requests and responses.
January 10, 2013
• Updated Section 2.1.2.3, “Server Personality” [66] to reflect the actual maximum personality
size.
• Updated Section 1.9.2, “Absolute Limits” [25] to reflect the actual maximum personality size.
January 8, 2013
• Updated Section 2.1.4, “Get Server Details” [68] to add explanations to the accessIPv4 and
accessIPv6 fields.
December 4, 2012
• Corrected the NOVA_RACK_AUTH environment variable to NOVA_RAX_AUTH.
• Corrected volumeId attribute in the attributes table in the attach volume to server API call.
November 7, 2012
• Added power_state value of 4 to the description of OS-EXT-STS extended attribute description.
November 2, 2012
• Corrected formatting errors in code samples.
October 30, 2012
• Updated the limits section to describe the maxTotalPrivateNetworks absolute limit.
• Phased-release launch of Cloud Networks.
• Added new Cloud Networks books to the resources topic.
October 16, 2012
• Updated the list images examples.
October 16, 2012
• Updated the list servers API to include example cURL requests.
• Updated the rescue mode API operation to correct the normal response code to 200.
October 5, 2012
• Updated Section 2.1.2, “Create Server” [60] to add new networks element with uuid attribute for creating private isolated networks.
September 11, 2012
• Updated Section 1.9, “Limits” [23] with correct absolute and rate limits and JSON and XML
examples.
September 10, 2012
• Updated Section 1.9, “Limits” [23] with correct absolute and rate limits and JSON and XML
examples.
• Clarified that you must specify a flavor ID and not a full flavor reference in the Section 2.1.1,
“List Servers” [50], Section 2.1.2, “Create Server” [60], Section 2.1.4, “Get Server Details” [68], and Section 2.4.3, “Rebuild Server” [92] requests.
• Clarified that you must specify an image ID and not a full image reference in the Section 2.1.1, “List Servers” [50], Section 2.1.2, “Create Server” [60], Section 2.1.4, “Get Server
Details” [68], and Section 2.4.3, “Rebuild Server” [92] requests.
• Corrected the OS-DCF:diskConfig request attribute to OS-DCF:diskConfig in Section 2.1.2, “Create Server” [60], Section 2.4.3, “Rebuild Server” [92], and Section 2.4.4, “Resize Server” [97].
September 7, 2012
• Updated the Section 1.7, “Efficient Polling with the Changes-Since Parameter” [22] examples to show correct retryAt syntax.
• Updated the list images JSON and XML examples to reflect the latest images.
• Updated the XML request example in Section 2.4.7, “Rescue Server” [101] to add missing
closing backslash.
• Updated the request examples in Section 2.4.8, “Unrescue Server” [103] to show correct unrescue action.
August 28, 2012
• Updated the Section 1.7, “Efficient Polling with the Changes-Since Parameter” [22] example to include the seconds value.
August 20, 2012
• Updated examples for the list servers and get server details calls with the OS-EXTSTS:vm_state, OS-EXT-STS:task_state, and OS-EXT-STS:power_state extended
attributes.
197
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
Revision Date
API v2
Summary of Changes
• Added the OS-EXT-STS extension description. See Section 3.2, “Extended Status Extension” [160].
August 15, 2012
• Next generation Cloud Servers UK launch date. Added authentication endpoint for UK accounts to the documentation and removed the preview release notes for authentication updates.
August 1, 2012
•
•
•
•
•
•
•
July 16, 2012
• Updated request and response examples in the create server API operation.
July 11, 2012
• Removed links for error codes in list servers API operations.
July 9, 2012
• Updated authentication section with pointer to preview release notes for UK authentication.
• Updated list servers API operation to include namespaces for the OS-DCF:diskConfig and
bandwidth extended attributes.
June 27, 2012
• Added a note about changing the name or host name of a server to the create server and
update server API operations.
• Removed backup schedules extension.
• Added status MIGRATING to the list servers operation.
June 21, 2012
• Updated the rate limits.
June 13, 2012
• Added preliminary HTTP status codes topic, with explanations of status codes.
June 5, 2012
• Updated references to legacy Cloud Servers to first generation Cloud Servers.
May 9, 2012
• Updated Section 2.1.2.3, “Server Personality” [66] with guidelines about file injection.
• Updated Section 2.1.1, “List Servers” [50], Section 2.1.4, “Get Server Details” [68], and
bandwidth_extension section with bandwidth extension information.
May 1, 2012
• Limited availability release date.
• Added volume attachment API operations.
February 29, 2012
• Private beta release date.
• First edition of this document.
Next generation Cloud Servers US launch date.
Updated Rackspace contact information in the preface.
Updated authentication topic to remove redundancy and add regional support.
Updated Chapter 1, “General API Information” [1] to update examples for API v2.
Updated Section 1.1, “Cloud Servers Concepts” [1] to revise definitions.
Updated examples in Chapter 2, “API Operations” [49] to reflect API v2 changes.
Updated Chapter 3, “Rackspace Extensions” [156] to update extensions descriptions.
198
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
5. Resources
Next generation Cloud Servers v2
Cloud Networks v2
First generation Cloud Servers v1.0
• Next Generation Cloud Servers Release Notes
• Cloud Networks Release Notes
• First Generation Cloud Servers Developer Guide
• Next Generation Cloud Servers Getting Started
• Cloud Networks Getting Started
• Cloud Networks Developer Guide
• Cloud Servers™ API Schema Types
• Cloud Servers - Frequently Asked
Questions
• Next Generation Cloud Servers Developer Guide
• Cloud Authentication Client Developer Guide v1.1
• Cloud Identity Client Developer
Guide v2.0
For Cloud Servers and Cloud Networks service resources, see the Rackspace Cloud site,
which provides related documents and links to Rackspace support channels including
knowledge base articles, phone, chat, and tickets.
For product updates and announcements through Twitter, see http://twitter.com/
rackspace.
For information about the supernova client, which is an unsupported wrapper for the nova
client useful for managing multiple nova environments, see supernova client.
199
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
Glossary
API
Application Programming Interface. Enables programmers to create application services by using
an open application.
authentication
To make API calls, you authenticate by issuing a request to the Rackspace Cloud Identity Service.
In response to valid credentials, the request returns an authentication token and the Cloud services catalog with the endpoints to request Cloud services. Each time that you make an API call,
you include the authentication token and the endpoint for the Cloud service that you want to access.
bandwidth
The amount of available data used by communication resources such as the Internet. Bandwidth
refers to the amount of data that is used to download things or the amount of data available to
download.
CIDR
Classless Inter-Domain Routing (CIDR). A method for allocating IP addresses and routing Internet
Protocol packets. Used with Cloud Networks.
flavor
A resource configuration for a server. Each flavor is a unique combination of disk, memory, vCPUs,
and network bandwidth.
HTTP
HyperText Transfer Protocol. The protocol that tells browsers where to find information.
image
A collection of files for a specific operating system (OS) that you use to create or rebuild a server. Rackspace provides pre-built images. You can also create custom images from servers that you
have launched. Custom images can be used for data backups or as "gold" images for additional
servers. In the Rackspace Cloud Images service, an image is represented by a JSON-encoded data
structure (the image schema) and its raw binary data (the image file).
PublicNet
Provides access to the Internet, Rackspace services such as Cloud Monitoring, Managed Cloud Service Level, RackConnect, Cloud Backup, and certain operating system updates. When you list networks through Cloud Networks, PublicNet is labeled public.
REST
REpresentational State Transfer. A style of architecture for hypermedia systems that is used for
the World Wide web.
RESTful
A kind of web service API that uses REST.
server
A computer that provides explicit services to the client software running on that system. A server
is a virtual machine (VM) instance in the Cloud Servers environment. To create a server, you must
specify a name, flavor reference, and image reference.
200
Next Generation Cloud Servers™
Dev Guide
February 10, 2015
API v2
ServiceNet
Provides access to Rackspace services such as Cloud Files, Cloud Databases, and Cloud Backup, and
to certain packages and patches through an internal only, multi-tenant network connection within each Rackspace data center. When you list networks through Cloud Networks, ServiceNet is labeled as private.
201
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement