Services operations#

This section describes the services operations of the Rackspace CDN API.

Retrieve all services#

GET /v1.0/{project_id}/services

This operation retrieves a list of all available services.

The following table shows the possible response codes for this operation.

Response Code

Name

Description

200

OK

Success or no services to return when there is an empty list of services.

400

Bad Request

Invalid limit value (string, less than or equal to 0, 1000000000), or the limit value is greater than the maximum allowed (which defaults to 20).

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 X- Project-Id header in the request, use project_id in the URI. For example: GET https://global.cdn.api.rackspacecloud.com/v1.0/{project_id}

The following table shows the query parameters for the request.

Name

Type

Description

marker

String

Specifies the service_id that represents the last service listed.

limit

Integer

Specifies the number of resources to list. The maximum value that you can specify for limit is 20.

This operation does not accept a request body.

Example: Retrieve all services HTTP request

GET /v1.0/110011/services{?marker=96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0,limit=20} 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 service ID that represents distributed content. The value is a UUID, such as 96737ae3-cfc1-4c72-be88- 5d0e7cc9a3f0, that is generated by the server.

project_id

String

Specifies the unique identifier for the user. (This is your actual account ID that is returned as part of the authentication service response.)

name

String

Specifies the name of the service.

domains

String

Specifies a list of domains used by users to access their website.

domains.domain

String

Specifies the domain used to access the assets on their website, for which a CNAME is given to the CDN provider.

domains.protocol

String

Specifies the protocol used to access the assets on this domain. Only http or https are currently allowed. protocol defaults to http.

origins

String

Specifies a list of origin domains or IP addresses where the original assets are stored.

origins.origin

String

Specifies the URL or IP address to pull origin content from.

origins.port

String

Specifies the port used to access the origin. The default is port 80. Note: Rackspace CDN cannot be used with custom ports. Services are required to run on HTTP (80) and HTTPS (443) for the origin servers.

origins.ssl

String

Uses HTTPS to access the origin. The default is false.

origins.rules

String

Specifies a collection of rules that define the conditions when this origin should be accessed. If there is more than one origin, the rules parameter is required.

origins.rules.name

String

Specifies the name of this rule.

origins.rules.request_url

String

Specifies the request URL this rule should match for this origin to be used. Regex is supported. Note: The regex is a Perl Compatible Regex (PCRE). For more information about PRCE, see Regular Expressions (Perl-Compatible).

caching

String

Specifies the TTL rules for the assets under this service. Supports wildcards for fine grained control.

caching.name

String

Specifies the name of this caching rule. Note: ‘default’ is a reserved name used for the default TTL setting.

caching.ttl

String

Specifies the TTL to apply.

caching.rules

String

Specifies a collection of rules that determine if this TTL should be applied to an asset.

caching.rules.name

String

Specifies the name of this rule.

caching.rules.request_url

String

Specifies the request URL this rule should match for this TTL to be used. Regex is supported. Note: The regex is a Perl Compatible Regex (PCRE). For more information about PRCE, see Regular Expressions (Perl-Compatible).

restrictions

String

Specifies the restrictions that define who can access assets (content from the CDN cache).

restrictions.name

String

Specifies the name of this restriction.

restrictions.rules

String

Specifies a collection of rules that determine if this TTL should be applied to an asset.

restrictions.rules.name

String

Specifies the name of this rule.

restrictions.rules.referrer

String

Specifies the http host that requests must come from.

flavor_id

String

Specifies the CDN provider flavor ID to use. For a list of flavors, see the operation to list the available flavors.

status

String

Specifies the current status of the service.

status.create_in_progress

String

Specifies that the service is currently being created and deployed.

status.deployed

String

Specifies that the service has been deployed and is ready to use.

status.update_in_progress

String

Specifies that the service is currently being updated.

status.delete_in_progress

String

Specifies that the service is currently being deleted.

status.failed

String

Specifies that the previous operation on the service failed to create, deploy, update, or delete. Looks for the errors[] for details.

errors

String

Specifies the list of errors that occurred during the previous service action.

errors.message

String

Specifies an error message detailing why there is an error.

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 all services HTTP and JSON response

HTTP/1.1 200 OK
Content-Type: application/json
{
    "links": [
        {
            "rel": "next",
            "href": "https://global.cdn.api.rackspacecloud.com/v1.0/110011/services?marker=96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0&limit=20"
        }
    ],
    "services": [
        {
            "id": "96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0",
            "project_id": "123456",
            "name": "mywebsite.com",
            "domains": [
                {
                    "domain": "www.mywebsite.com"
                }
            ],
            "origins": [
                {
                    "origin": "mywebsite.com",
                    "port": 80,
                    "ssl": false
                }
            ],
            "caching": [
                {
                    "name": "default",
                    "ttl": 3600
                },
                {
                    "name": "home",
                    "ttl": 17200,
                    "rules": [
                        {
                            "name": "index",
                            "request_url": "/index.htm"
                        }
                    ]
                },
                {
                    "name": "images",
                    "ttl": 12800,
                    "rules": [
                        {
                            "name": "images",
                            "request_url": "*.png"
                        }
                    ]
                }
            ],
            "restrictions": [
                {
                    "name": "website only",
                    "rules": [
                        {
                            "name": "mywebsite.com",
                            "referrer": "www.mywebsite.com"
                        }
                    ]
                }
            ],
            "flavor_id": "cdn",
            "status": "deployed",
            "errors" : [],
            "links": [
                {
                    "href": "https://global.cdn.api.rackspacecloud.com/v1.0/110011/services/96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0",
                    "rel": "self"
                },
                {
                    "href": "mywebsite.com.cdn1.raxcdn.com",
                    "rel": "access_url"
                }
            ]
        },
        {
            "id": "96737ae3-cfc1-4c72-be88-5d0e7cc9a3f1",
            "project_id": "123456",
            "name": "myothersite.com",
            "domains": [
                {
                    "domain": "www.myothersite.com"
                }
            ],
            "origins": [
                {
                    "origin": "44.33.22.11",
                    "port": 80,
                    "ssl": false
                },
                {
                    "origin": "77.66.55.44",
                    "port": 80,
                    "ssl": false,
                    "rules": [
                        {
                            "name": "videos",
                            "request_url": "^/videos/*.m3u"
                        }
                    ]
                }
            ],
            "caching": [
                {
                    "name": "default",
                    "ttl": 3600
                }
            ],
            "restrictions": [
                {}
            ],
            "flavor_id": "cdn",
            "status": "deployed",
            "links": [
                {
                    "href": "https://global.cdn.api.rackspacecloud.com/v1.0/110011/services/96737ae3-cfc1-4c72-be88-5d0e7cc9a3f1",
                    "rel": "self"
                },
                {
                    "href": "myothersite.com.cdn1.raxcdn.com",
                    "rel": "access_url"
                }
            ]
        }
    ]
}

Create a service#

POST /v1.0/{project_id}/services

This operation creates a service.

To create a new service, provide a JSON body for the new service with the required attributes.

For more information about rules ordering, caching rules, origin rules, and restrictions rules, see Rackspace CDN edge rules.

For origin rules, use the path /* to include all content for the site.

Note

service_id, which is used in several of the services operations, is returned in the response to create a service. Take note this value. You can also retrieve service_id using Retrieve a service.

The following table shows the possible response codes for this operation.

Response Code

Name

Description

202

Accepted

The request has been accepted for processing.

400

Bad Request

Attempt to create a service with a flavor_id that is not ‘cdn’.

400

Bad Request

Invalid JSON.

400

Bad Request

Missing or empty domains list.

400

Bad Request

Missing or empty origins list.

400

Bad Request

Non-Boolean value for origins:origin:ssl.

400

Bad Request

Restrictions list present with no name.

400

Bad Request

Value for origins:origin:port is something other than 80 or 443.

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 X- Project-Id header in the request, use project_id in the URI. For example: GET https://global.cdn.api.rackspacecloud.com/v1.0/{project_id}

The following table shows the body parameters for the request.

Name

Type

Description

name

String (Required)

Specifies the name of the service. The minimum length for name is 3. The maximum length is 256.

domains

String (Required)

Specifies a list of domains used by users to access their website.

domains.domain

String (Required)

Specifies the domain used to access the assets on your website, for which you use a CNAME to the CDN provider. The minimum length for domain is 3. The maximum length is 253.

domains.protocol

String

Specifies the protocol used to access the assets on this domain. Only http or https are allowed. The default protocol is http.

domains.certificate

String

Specifies the type of security certificate. For the certificate parameter to apply, the protocol parameter must be set to https. Use shared, san, or custom. For all 3 types of security certificates, make sure that your origin (or origins) are SSL-enabled. Your SSL certificate needs to come from a trusted certificate authority (CA). For more information about security certificates and Rackspace CDN, see Rackspace CDN secure delivery options.

domains.certificate.shared

String

Uses a shared https operator domain. The domain parameter must be a single word that is not dot separated.

origins

String (Required)

Specifies a list of origin domains or IP addresses where the original assets are stored.

origins.origin

String (Required)

Specifies the URL or IP address from which to pull origin content. The minimum length for origin is 3. The maximum length is 253.

origins.port

String

Specifies the port used to access the origin. The default is port 80. Note: Rackspace CDN cannot be used with custom ports. Services are required to run on HTTP (80) and HTTPS (443) for the origin servers. All origins in the origin specification must define the port so that it that corresponds to the domain’s protocol. If the domain’s protocol is http, the port should be 80; if the domain’s protocol is https, the port should be 443.

origins.ssl

String

Uses HTTPS to access the origin. The default is false.

origins.rules

String (Required)

Specifies a collection of rules that define the conditions when this origin should be accessed. If there is more than one origin, the rules parameter is required.

origins.rules.name

String (Required)

Specifies the name of this rule. The minimum length for name is 1. The maximum length is 256.

origins.rules.request_url

String (Required)

Specifies the request URL that this rule should match for this origin to be used. The minimum length for request_url is 1. The maximum length is 1024. Regex is supported. Note: Use a Perl Compatible Regex (PCRE). For more information about PRCE, see Regular Expressions (Perl-Compatible).

origins.hostheadertype

String

Specifies the type for the host header. The default value is domain. Other valid values are origin and custom.

origins.hostheadervalue

String

Specifies the value to be contained in the host header. The default value is NULL; this value is assigned only when hostheadertype is domain. You are required to specify hostheadervalue only when hostheadertype is specified as custom. If you specify hostheadertype as origin, hostheadervalue takes the value of the origin domain.

caching

String

Specifies the TTL rules for the assets under this service. Supports wildcards for fine-grained control.

caching.name

String (Required)

Specifies the name of this caching rule. The minimum length for name is 1. The maximum length is 256. Note: default is a reserved name used for the default TTL setting.

caching.ttl

String (Required)

Specifies the TTL to apply. The value of ttl must be greater than or equal to 0. The maximum value that you can specify is 365 days.

caching.rules

String

Specifies a collection of rules that determine if this TTL should be applied to an asset. Note: This is a required property if more than one entry is present for caching.

caching.rules.name

String (Required)

Specifies the name of this rule. The minimum length for name is 1. The maximum length is 256.

caching.rules.request_url

String (Required)

Specifies the request URL that this rule should match for this TTL to be used. The minimum length for request_url is 1. The maximum length is 1024. Regex is supported. Note: Use a Perl Compatible Regex (PCRE). For more information about PRCE, see Regular Expressions (Perl-Compatible).

restrictions

String

Specifies the restrictions that define who can access assets (content from the CDN cache).

restrictions.name

String (Required)

Specifies the name of this restriction. The minimum length for name is 1. The maximum length is 256.

restrictions.access

String

Specifies the type of this restriction. Valid values are whitelist, which is the default value and allows access, or blacklist, which does not allow access. Note that blacklist and whitelist must use different paths.

restrictions.rules

String

Specifies a collection of rules that determine if this restriction should be applied to an asset.

restrictions.rules.name

String (Required)

Specifies the name of this rule. The minimum length for name is 1. The maximum length is 256.

restrictions.rules.referrer

String

Specifies the HTTP host that requests must come from. The minimum length for referrer is 3. The maximum length is 1024.

restrictions.rules.request_url

String

Specifies the request URL to which the rule applies. The default value is /*, which indicates all content at the request URL.

restrictions.rules.geography

String

Specifies the geography from which to restrict requests.

restrictions.rules.client_ip

String

Specifies the client IP address to which the rule applies. Note: Rackspace CDN supports Classless Inter-Domain Routing (CIDR) for both IPv4 and IPv6 for these restrictions.

log_delivery

String (Required)

Specifies whether to enable log delivery to a Cloud Files container. You can use access log delivery to analyze the number of requests for each object, the client IP address, and time-based usage patterns (such as monthly or seasonal usage).

Log files are named according to the following pattern: service name, log date, log hour, and MD5 hash. For example: www.mywebsite.com/2015/02/01/16/096e6c4473f235db081deb51f42a8d98.log.gz. In this example, www.mywebsite.com is the name of the service, 2015/02/01 is the date (February 1, 2015), and 16 is the hour that the log file was created. There might be multiple files for a given hour because the system splits log files based on both time and log file size.

All times in the access logs are UTC time. Within the gzip logs, the format of the entries is similar to National Center for Supercomputing Applications (NCSA) combined log format, but without cookies. The pattern follows. The dashes (-) denote fields that the NCSA combined log format dictates be present but that Rackspace CDN does not capture.

For example: client_ip - - [day/month/year:hour:minute:second timezone] “method request HTTP_version” return_code bytes_sent “referrer” “user_agent”

Logs are stored in a Cloud Files container named.CDN_ACCESS_LOGS. If this container does not exist, itis created.

log_delivery.enabled

String (Required)

Specifies whether to enable or disable log delivery. Valid values are true and false.

flavor_id

String (Required)

Specifies the CDN provider flavor ID to use. For a list of flavors, see the operation to list the available flavors. The minimum length for flavor_id is 3. The maximum length is 256.

Example: Create a service HTTP and JSON request

POST /v1.0/110011/services HTTP/1.1
Host: global.cdn.api.rackspacecloud.com
X-Auth-Token: 0f6e9f63600142f0a970911583522217
Accept: application/json
Content-type: application/json
{
    "name": "mywebsite.com",
    "domains": [
        {
            "domain": "www.mywebsite.com"
        },
        {
            "domain": "blog.mywebsite.com"
        }
    ],
    "origins": [
        {
            "origin": "mywebsite.com",
            "port": 80,
            "ssl": false,
            "hostheadertype": "origin",
            "rules": [
            ]
        }
    ],
    "restrictions": [
                     {
                     "name": "website only",
                     "rules": [
                               {
                               "name": "mywebsite.com",
                               "referrer": "www.mywebsite.com"
                }
            ]
        }
    ],
    "caching": [
        {
            "name": "default",
            "ttl": 3600
        }
    ],
    "log_delivery": {
        "enabled": true
    },
    "flavor_id": "cdn"
   }

Response#

This operation does not return a response body.

Example: Create a service HTTP response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: https://global.cdn.api.rackspacecloud.com/v1.0/services/96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0

Retrieve a service#

GET /v1.0/{project_id}/services/{service_id}

This operation retrieves a service.

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 X-Project-Id header in the request, use project_id in the URI. For example: GET https://global.cdn.api.rackspacecloud.com/v1.0/ {project_id}

{service_id}

String

Specifies the service ID that represents distributed content. The value is a UUID, such as 96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0, that is generated by the server.

This operation does not accept a request body.

Example: Retrieve a service HTTP request

GET /v1.0/11111/services/6592bb63-e320-4dba-931d-31727e394aa0 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

name

String

Specifies the name of the service.

id

String

Specifies the service ID that represents distributed content. The value is a UUID, such as 96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0, that is generated by the server.

project_id

String

Specifies the unique identifier for the user. (This is your actual account ID that is returned as part of the authentication service response.)

name

String

Specifies the name of the service.

domains

String

Specifies a list of domains used by users to access their website.

domains.domain

String

Specifies the domain used to access the assets on their website, for which a CNAME is given to the CDN provider.

domains.protocol

String

Specifies the protocol used to access the assets on this domain. Only http or https are currently allowed. protocol defaults to http.

domains.certificate

String

Specifies the type of the certificate.

domains.certificate_status

String

Specifies the certificate status, such as deployed.

origins

String

Specifies a list of origin domains or IP addresses where the original assets are stored.

origins.origin

String

Specifies the URL or IP address from which to pull origin content.

origins.port

String

Specifies the port used to access the origin. The default is port 80. Note: Rackspace CDN cannot be used with custom ports. Services are required to run on HTTP (80) and HTTPS (443) for the origin servers.

origins.ssl

String

Uses HTTPS to access the origin. The default is false.

origins.rules

String

Specifies a collection of rules that define the conditions when this origin should be accessed. If there is more than one origin, the rules parameter is required.

origins.rules.name

String

Specifies the name of this rule.

origins.rules.request_url

String

Specifies the request URL that this rule should match for this origin to be used. Regex is supported. Note: The regex is a Perl Compatible Regex (PCRE). For more information about PRCE, see Regular Expressions (Perl-Compatible).

origins.hostheadertype

String

Specifies the type for the host header. Valid values are domain, origin, and custom.

caching

String

Specifies the TTL rules for the assets under this service. Supports wildcards for fine- grained control.

caching.name

String

Specifies the name of this caching rule. Note: ‘default’ is a reserved name used for the default TTL setting.

caching.ttl

String

Specifies the TTL to apply.

caching.rules

String

Specifies a collection of rules that determine if this TTL should be applied to an asset.

caching.rules.name

String

Specifies the name of this rule.

caching.rules.request_url

String

Specifies the request URL that this rule should match for this TTL to be used. Regex is supported. Note: The regex is a Perl Compatible Regex (PCRE). For more information about PRCE, see Regular Expressions (Perl-Compatible).

restrictions

String

Specifies the restrictions that define who can access assets (content from the CDN cache).

restrictions.name

String

Specifies the name of this restriction.

restrictions.rules

String

Specifies a collection of rules that determine if this restriction should be applied to an asset.

restrictions.rules.name

String

Specifies the name of this rule.

restrictions.rules.referrer

String

Specifies the HTTP host from which requests must come.

log_delivery

String

Specifies whether log delivery to a Cloud Files container is enabled or disabled. For more information about logs, see the log_delivery parameter description in Create a service.

log_delivery.enabled

String

Specifies whether log delivery is enabled (true) or disabled (false).

flavor_id

String

Specifies the CDN provider flavor ID to use. For a list of flavors, see the operation to list the available flavors.

status

String

Specifies the current status of the service.

status.create_in_progress

String

Specifies that the service is currently being created and deployed.

status.deployed

String

Specifies that the service has been deployed and is ready to use.

status.update_in_progress

String

Specifies that the service is currently being updated.

status.delete_in_progress

String

Specifies that the service is currently being deleted.

status.failed

String

Specifies that the previous operation on the service failed to create, deploy, update, or delete. Looks for the errors[] for details.

errors

String

Specifies the list of errors that occurred during the previous service action.

errors.message

String

Specifies an error message detailing why there is an error.

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 a service HTTP and JSON response

HTTP/1.1 200 OK
Content-Type: application/json
{
     "name": "http",
     "id": "6592bb63-e320-4dba-931d-31727e394aa0",
     "project_id": "11111",
     "domains": [{
             "domain": "https.scdn3.secure.raxcdn.com",
             "protocol": "https",
             "certificate": "shared",
             "certificate_status": "deployed"
     }],
     "origins": [{
             "origin": "origin.com",
             "port": 443,
             "ssl": true,
             "rules": [{
                     "name": "Default Origin",
                     "request_url": "/*"
             }],
             "hostheadertype": "domain"
     }],
     "restrictions": [],
     "caching": [{
             "name": "default",
             "ttl": 86400,
             "rules": [{
                     "name": "default",
                     "request_url": "/*"
             }]
     }],
     "flavor_id": "cdn",
     "log_delivery": {
             "enabled": false
     },
     "status": "deployed",
     "errors": [],
     "links": [{
             "href": "https://global.cdn.api.rackspacecloud.com/v1.0/11111/services/6592bb63-e320-4dba-931d-31727e394aa0",
             "rel": "self"
     }, {
             "href": "https://global.cdn.api.rackspacecloud.com/v1.0/11111/flavors/cdn",
             "rel": "flavor"
     }, {
             "href": "https.scdn3.secure.raxcdn.com",
             "rel": "access_url"
     }]
}

Update a service#

PATCH /v1.0/{project_id}/services/{service_id}

This operation updates the specified service.

You can use the HTTP PATCH method to add, remove, or replace service properties. For more information about the HTTP PATCH method, see RFC5789.

To update a service, send a JSON body that conforms to RFC6902 using paths and values for one or more of the service parameters, which are described in Create a service. If no changes are specified for a parameter in the JSON body, all parameter values from the previous version of the service are carried over by default.

The following table shows the possible response codes for this operation.

Response Code

Name

Description

202

Accepted

The request has been accepted for processing.

400

Bad Request

Invalid input JSON or service not deployed.

404

Not Found

Service not found.

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 X- Project-Id header in the request, use project_id in the URI. For example: GET https://global.cdn.api.rackspacecloud.com/v1.0/{project_id}

{service_id}

String

Specifies the service ID that represents distributed content. The value is a UUID, such as 96737ae3-cfc1-4c72-be88- 5d0e7cc9a3f0, that is generated by the server.

The following table shows the body parameters for the request.

Name

Type

Description

op

String (Required)

Specifies the operation, add, remove, or replace, to be executed.

path

String (Required)

Specifies the JSON Pointer location within the service’s JSON representation of the service parameter being added, replaced or removed.

value

String

Specifies the actual value to be added or replaced. It is not required for the remove operation.

Example: Update a service HTTP and JSON request

PATCH /v1.0/110011/services/96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0 HTTP/1.1
Host: global.cdn.api.rackspacecloud.com
X-Auth-Token: 0f6e9f63600142f0a970911583522217
Content-type: application/json-patch+json
  [
    {
        "op": "add",
        "path": "/domains/-",
        "value": {
            "domain": "newDomain.com",
            "protocol": "http"
        }
    },
    {
        "op": "replace",
        "path": "/domains/0",
        "value": {
            "domain": "replaceDomain.com",
            "protocol": "http"
        }
    },
    {
        "op": "add",
        "path": "/domains/-",
        "value": {
            "domain": "addDomain1.com",
            "protocol": "http"
        }
    },
    {
        "op": "add",
        "path": "/domains/-",
        "value": {
            "domain": "addDomain2.com",
            "protocol": "http"
        }
    },
    {
        "op": "add",
        "path": "/domains/-",
        "value": {
            "domain": "addDomain3.com",
            "protocol": "http"
        }
    },
    {
        "op": "remove",
        "path": "/domains/0"
    },
    {
        "op": "add",
        "path": "/domains",
        "value": [
            {
                "domain": "addDomainList.com",
                "protocol": "http"
            }
        ]
    },
    {
        "op": "replace",
        "path": "/name",
        "value": "newServiceName"
    },
    {
        "op": "replace",
        "path": "/origins/0",
        "value": {
            "origin": "1.2.3.4",
            "port": 80,
            "rules": [],
            "ssl": false
        }
    },
    {
        "op": "add",
        "path": "/origins/1",
        "value": {
            "origin": "1.2.3.4",
            "port": 80,
            "ssl": false,
            "rules": [
                {
                    "name": "origin",
                    "request_url": "/origin.htm"
                }
            ]
        }
    },
    {
        "op": "add",
        "path": "/origins/2",
        "value": {
            "origin": "4.2.5.4",
            "port": 80,
            "ssl": false,
            "rules": [
                {
                    "name": "origin",
                    "request_url": "/origin.htm"
                }
            ]
        }
    },
    {
        "op": "add",
        "path": "/origins/-",
        "value": {
            "origin": "1.2.3.4",
            "port": 80,
            "ssl": false,
            "rules": [
                {
                    "name": "origin",
                    "request_url": "/origin.htm"
                }
            ]
        }
    },
    {
        "op": "remove",
        "path": "/origins/0"
    },
    {
        "op": "replace",
        "path": "/caching/0",
        "value": {
            "name": "cache_name",
            "ttl": 111
        }
    },
    {
        "op": "remove",
        "path": "/caching/0"
    },
    {
        "op": "add",
        "path": "/caching/-",
        "value": {
            "name": "cache_name",
            "ttl": 111,
            "rules": [
                {
                    "name": "index",
                    "request_url": "/index.htm"
                }
            ]
        }
    },
    {
        "op": "replace",
        "path": "/log_delivery/enabled",
        "value": true
    }
]

Response#

This operation does not return a response body.

Example: Update a service HTTP response

HTTP/1.1 202 Accepted
Location: https://global.cdn.api.rackspacecloud.com/v1.0/services/96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0

Delete a service#

DELETE /v1.0/{project_id}/services/{service_id}

This operation deletes the specified service.

The following table shows the possible response codes for this operation.

Response Code

Name

Description

202

Accepted

The request has been fulfilled, but does not return a representation (that is, the response is empty).

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 X-Project-Id header in the request, use project_id in the URI. For example: GET https://global.cdn.api.rackspacecloud.com/v1.0/ {project_id}

{service_id}

String

Specifies the service ID that represents distributed content. The value is a UUID, such as 96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0, that is generated by the server.

This operation does not accept a request body.

Example: Delete a service HTTP request

DELETE /v1.0/110011/services/96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0 HTTP/1.1
Host: global.cdn.api.rackspacecloud.com
X-Auth-Token: 0f6e9f63600142f0a970911583522217
Content-Type: application/json

Response#

This operation does not return a response body.

Example: Delete a service HTTP response

HTTP/1.1 202 Accepted