Flavors operations#
A flavor is a mapping configuration to a CDN provider.
The section describes the flavors operations in the Rackspace CDN API.
Retrieve flavors#
GET /v1.0/{project_id}/flavors
This operation retrieves a list of all available flavors.
The following table shows the possible response codes for this operation.
Response Code |
Name |
Description |
---|---|---|
200 |
OK |
Success. |
Request#
The following table shows the URI parameters for the request.
Name |
Type |
Description |
---|---|---|
{project_id} |
String |
The project ID for the user. If you do not set the |
This operation does not accept a request body.
Example: Retrieve flavors HTTP request
GET /v1.0/110011/flavors HTTP/1.1
Host: global.cdn.api.rackspacecloud.com
X-Auth-Token: 0f6e9f63600142f0a970911583522217
Accept: application/json
Content-type: application/json
Response#
The following table shows the body parameters for the response.
Name |
Type |
Description |
---|---|---|
id |
String |
Specifies the name of the flavor. The name must not exceed 64 bytes in length and is limited to Unicode, digits, underscores, and hyphens. |
providers |
String |
Specifies the list of providers mapped to this flavor. |
providers.provider |
String |
Specifies the name of the provider. The name must not exceed 64 bytes in length and is limited to Unicode, digits, underscores, and hyphens. |
providers.links |
String |
Specifies a list with an
|
links |
String |
Specifies the self- navigating JSON document paths. |
links.href |
String |
Specifies the location to use to access the resource. |
links.rel |
String |
Specifies how the
|
Example: Retrieve flavors HTTP and JSON response
HTTP/1.1 200 OK
Content-Type: application/json
{
"flavors": [
{
"id": "cdn",
"providers": [
{
"provider": "akamai",
"links": [
{
"href": "http: //www.akamai.com",
"rel": "provider_url"
}
]
}
],
"links": [
{
"href": "https: //global.cdn.api.rackspacecloud.com/v1.0/110011/flavors/cdn",
"rel": "self"
}
]
}
]
}
Retrieve flavor details#
GET /v1.0/{project_id}/flavors/{flavor_id}
This operation retrieves details for the flavor specified by flavor_id.
The following table shows the possible response codes for this operation.
Response Code |
Name |
Description |
---|---|---|
200 |
OK |
Success. |
Request#
The following table shows the URI parameters for the request.
Name |
Type |
Description |
---|---|---|
{project_id} |
String |
The project ID for the user. If you do not set the |
{flavor_id} |
String |
Specifies the flavor ID. For example: cdn |
This operation does not accept a request body.
Example: Retrieve flavor details HTTP request
GET /v1.0/110011/flavors/cdn HTTP/1.1
Host: global.cdn.api.rackspacecloud.com
X-Auth-Token: 0f6e9f63600142f0a970911583522217
Accept: application/json
Content-type: application/json
Response#
The following table shows the body parameters for the response.
Name |
Type |
Description |
---|---|---|
id |
String |
Specifies the name of the flavor. The name must not exceed 64 bytes in length and is limited to Unicode, digits, underscores, and hyphens. |
providers |
String |
Specifies the list of providers mapped to this flavor class. |
providers.provider |
String |
Specifies the name of the provider. The name must not exceed 64 bytes in length and is limited to Unicode, digits, underscores, and hyphens. |
providers.links |
String |
Specifies a list with a
|
links |
String |
Specifies the self- navigating JSON document paths. |
links.href |
String |
Specifies the location to access this resource. |
links.rel |
String |
Specifies how the href link provided is related to this resource_url. |
Example: Retrieve flavor details HTTP and JSON response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "cdn",
"providers": [
{
"provider": "akamai",
"links": [
{
"href": "http://www.akamai.com",
"rel": "provider_url"
}
]
}
],
"links": [
{
"href": "https://global.cdn.api.rackspacecloud.com/v1.0/110011/flavors/cdn",
"rel": "self"
}
]
}