Update Edge CNAME

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.

Request

A request to update an edge CNAME configuration is described below.

HTTP Method Request URI

PUT

https://api.transactcdn.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

AccountNumber

Required

Replace this variable with a customer account number. This account number may be found in the upper left-hand corner of the TCC.

EdgeCNAMEID

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:

Request Headers

This endpointIdentifies a request's connection point to our REST API service. only takes advantage of common request headers.

Request Body

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:

  • 0: Disabled (Default Value).
  • 1: Enabled. CDN activity on this edge CNAME will be logged.

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., can.0001.transactcdn.com).

OriginId

Required

Integer

Identifies whether an edge CNAME will be associated with a CDN origin server or a customer origin server.

Valid values are:

  • -1: Indicates that the edge CNAME will point to the root folder of a CDN origin server (e.g., /000001).
  • CustomerOriginID: Specifying an ID for an existing customer origin configuration indicates that the edge CNAME should point to that customer origin. This type of edge CNAME points to the root folder of that customer origin server (e.g., /800001/CustomerOrigin).

Response

The response to the above request includes an HTTP status code, response headers, and a response body.

Status Code

A status code indicates whether the request was successfully performed.

Response Headers

The response for this endpoint only includes standard HTTP response headers.

View common response headers.

Response Body

The response body for a successful request does not contain a response parameter.

Errors

The response body for an unsuccessful request may contain an error parameter that provides additional information.

View common error messages.

Sample Request and Response (JSON)

A sample JSON request is shown below.

PUT https://api.transactcdn.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.transactcdn.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

Sample Request and Response (XML)

A sample XML request is shown below.

PUT https://api.transactcdn.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.transactcdn.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