Updates the configuration for the specified edge CNAME.
Although this endpoint allows you to modify the name associated with an edge CNAME configuration, it will not update the corresponding CNAME record on a DNS server. Make sure to do so upon updating an edge CNAME's name.
A request to update an edge CNAME configuration is described below.
HTTP Method | Request URI |
---|---|
PUT |
https://api.edgecast.com/v2/mcc/customers/AccountNumber/cnames/EdgeCNAMEID |
Define the following variable when submitting the above request.
VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3). | Description |
---|---|
Required |
|
Required |
Replace this variable with the system-defined ID of the desired edge CNAME configuration. A list of edge CNAME configurations and their corresponding system-defined IDs can be retrieved through the following endpoints: |
This endpointIdentifies a request's connection point to our REST API service. only takes advantage of common request headers.
Pass the following request body parameters:
Omitting or setting an optional parameter to null will prevent it from being assigned a value.
Name | Data Type | Description |
---|---|---|
DirPath |
String |
Identifies a location on the origin server. This string should specify the relative path from the root folder of the origin server to the desired location. Set this parameter to blank to point the edge CNAME to the root folder of the origin server. |
EnableCustomReports |
Integer |
Determines whether hits and data transferred statistics will be tracked for this edge CNAME. Logged data can be viewed through the Custom Reports module. Valid values are:
|
Name Required |
String |
Sets the name that will be assigned to the edge CNAME. It should only contain lower-case alphanumeric characters, dashes, and periods. The name specified for this parameter should also be defined as a CNAME record on a DNS server. The CNAME record defined on the DNS server should point to the CDN hostname (e.g., wpc.0001.edgecastcdn.net) |
OriginId Required |
Integer |
Identifies whether an edge CNAME will be associated with a CDN origin server or a customer origin server. Valid values are:
Retrieve a list of customer origin IDs through the ADN, HTTP Large, or HTTP Small version of the Get All Customer Origins endpoint. |
The response to the above request includes an HTTP status code, response headers, and a response body.
A status code indicates whether the request was successfully performed.
The response for this endpoint only includes standard HTTP response headers.
The response body for a successful request does not contain a response parameter.
The response body for an unsuccessful request may contain an error parameter that provides additional information.
A sample JSON request is shown below.
PUT https://api.edgecast.com/v2/mcc/customers/0001/cnames/123456 HTTP/1.1
Authorization: TOK:12345678-1234-1234-1234-1234567890ab
Accept: application/json
Content-Type: application/json
Host:api.edgecast.com
Content-Length: 133
{ "DirPath" : "\/RelativePath", "EnableCustomReports" : 0, "Name" : "images.example.com", "OriginId" : -1 }
A sample JSON response is shown below.
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Date: Thu, 15 Apr 2021 12:00:00 GMT
Content-Length: 0
A sample XML request is shown below.
PUT https://api.edgecast.com/v2/mcc/customers/0001/cnames/123456 HTTP/1.1
Authorization: TOK:12345678-1234-1234-1234-1234567890ab
Accept: application/xml
Content-Type: application/xml
Host:api.edgecast.com
Content-Length: 295
<CustomerCnameParameter xmlns="http://www.whitecdn.com/schemas/apiservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <DirPath>/RelativePath</DirPath> <EnableCustomReports>0</EnableCustomReports> <Name>images.example.com</Name> <OriginId>-1</OriginId> </CustomerCnameParameter>
A sample XML response is shown below.
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Date: Thu, 15 Apr 2021 12:00:00 GMT
Content-Length: 0