Update Customer Origin - ADN

Sets the properties for a customer origin on the ADN platform.

Updating a customer origin will overwrite the entire customer origin configuration. This will occur regardless of whether a request parameter has been excluded from the request.

This endpoint cannot be used to update the directory assigned to a customer origin configuration that has been associated with an edge CNAME.

Once a customer origin has been updated, ensure optimal communication to the origin server by calling the Reselect ADN Gateways endpoint.

Request

A request to update a customer origin configuration is described below.

HTTP Method Request URI

PUT

https://api.edgecast.com/v2/mcc/customers/AccountNumber/origins/adn/CustomerOriginID

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 right-hand corner of the MCC.

CustomerOriginID

Required

Replace this variable with the system-defined ID of the customer origin configuration that you would like to update.

A list of ADN customer origin configurations and their corresponding system-defined IDs can be retrieved through the following endpoint:

Request Headers

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

Request Body

A valid customer origin configuration must meet the following requirements:

Pass the following request body parameters:

An indented parameter indicates that it is a property of the request parameter directly above it. When submitting a request, you will need to use the proper syntax to indicate this relationship. Please refer to the parent request parameter for more information.

Name Data Type Description

DirectoryName

Required

String

Defines the directory name that will be assigned to the customer origin configuration. This alphanumeric name is appended to the end of the base CDN URL that points to the customer origin server.

Example:

This setting is read-only for a customer origin configuration that has been associated with at least one edge CNAME configuration. In this scenario, make sure that this response parameter is set to the directory name currently assigned to the customer origin configuration.

FollowRedirects

Boolean

Determines whether our edge servers will respect a URL redirect when validating the set of optimal ADN gateway servers for your customer origin configuration.

Default Value:

False

HostHeader

Required

String

Defines the value that will be assigned to the Host header for all requests to this customer origin configuration. A host header is especially useful when there are multiple virtual hostnames hosted on a single physical server or load-balanced set of servers.

Use one of the following formats when setting the Host header value:

  • hostname:port (e.g., www.example.com:80)
  • IPv4Address:port (e.g., 10.10.10.255:80)
  • [IPv6Address]:port (e.g., [1:2:3:4:5:6:7:8]:80)
  • Blank: The request URI determines the value of the Host request header.

A protocol should not be specified when setting this parameter.

HttpHostnames

Required for HTTP requests.

Array

This request parameter contains the set of hostnames/IP addresses to which HTTP requests for this customer origin configuration may be fulfilled.

Key information:

  • XML: Each hostname/IP address must be contained within a <Hostname> tag.
  • JSON: The desired set of hostnames/IP addresses must be contained within a set of square brackets. Additionally, each hostname/IP address (i.e., Name request parameter) must be contained with a set of curly braces.

Name

Required for HTTP requests.

String

HttpHostnames array

Identifies the hostname/IP address of an origin server that will be associated with the customer origin configuration being created.

Use one of the following formats to identify an origin server:

  • protocol://hostname:port (e.g., http://www.example.com:80)
  • protocol://IPv4Address:port (e.g., http://10.10.10.255:80)
  • protocol://[IPv6Address]:port (e.g., http://[1:2:3:4:5:6:7:8]:80)

HttpLoadBalancing

Required for HTTP requests.

String

Determines how HTTP requests will be load balanced across the specified hostnames/IP addresses.

Valid values are:

  • PF: This value indicates that "Primary and Failover" mode will be used to load balance requests to this customer origin. In this mode, the specified hostnames/IP addresses form an ordered failover list. All requests will first be sent to the first hostname/IP address in the list. If that server is unavailable (i.e., TCP connection is refused or a timeout occurs), then the request will be sent to the next entry in the list.
  • RR: This value indicates that "Round Robin" mode will be used to load balance requests for this customer origin. In this mode, our servers will send a balanced numbers of requests to each hostname.

Key information:

  • Domains are resolved into IP addresses via our DNS servers.
  • The specified hostnames/IP addresses form an ordered list of IP addresses.
  • The specified load balancing mode is irrelevant if only a single hostname or IP address has been defined for handling HTTP requests.
  • This load balancing mode is independent from any external load balancing configuration defined for your origin servers.

HttpsHostnames

Required for HTTPS requests.

Array

This request parameter contains the set of hostnames/IP addresses to which HTTPS requests for this customer origin configuration may be fulfilled.

Key information:

  • XML: Each hostname/IP address must be contained within a <Hostname> tag.
  • JSON: The desired set of hostnames/IP addresses must be contained within a set of square brackets. Additionally, each hostname/IP address (i.e., Name request parameter) must be contained with a set of curly braces.

This request parameter is only available for customers that have purchased an SSL certificate or the HTTPS feature.

Name

Required for HTTPS requests.

String

HttpsHostnames array

Identifies the hostname/IP address of an origin server that will be associated with the customer origin configuration being created.

Use one of the following formats to identify an origin server:

  • protocol://hostname:port (e.g., http://www.example.com:80)
  • protocol://IPv4Address:port (e.g., http://10.10.10.255:80)
  • protocol://[IPv6Address]:port (e.g., http://[1:2:3:4:5:6:7:8]:80)

End-to-end data encryption is sacrificed when the HTTP protocol is used to serve HTTPS requests.

HttpsLoadBalancing

Required for HTTPS requests.

String

Determines how HTTPS requests will be load balanced across the specified hostnames/IP addresses.

Valid values are:

  • PF: This value indicates that "Primary and Failover" mode will be used to load balance requests to this customer origin. In this mode, the specified hostnames/IP addresses form an ordered failover list. All requests will first be sent to the first hostname/IP address in the list. If that server is unavailable (i.e., TCP connection is refused or a timeout occurs), then the request will be sent to the next entry in the list.
  • RR: This value indicates that "Round Robin" mode will be used to load balance requests for this customer origin. In this mode, our servers will send a balanced numbers of requests to each hostname/IP address.

Key information:

  • Domains are resolved into IP addresses via our DNS servers.
  • The specified hostnames/IP addresses form an ordered list of IP addresses.
  • The specified load balancing mode is irrelevant if only a single hostname or IP address has been defined for handling HTTP requests.
  • This load balancing mode is independent from any external load balancing configuration defined for your origin servers.

NetworkConfiguration

Integer

Determines how hostnames associated with this customer origin configuration will be resolved to an IP address.

Valid values are:

  • 1: Default. Indicates that the IP preference for this customer origin will be system-defined. Currently, this configuration causes hostnames to be resolved to IPv4 only.
  • 2: IPv6 Preferred over IPv4. Indicates that although hostnames for this customer origin can be resolved to either IP version, a preference will be given to IPv6.
  • 3: IPv4 Preferred over IPv6. Indicates that although hostnames for this customer origin can be resolved to either IP version, a preference will be given to IPv4.
  • 4: IPv4 Only. Indicates that hostnames for this customer origin can only be resolved to IPv4.
  • 5: IPv6 Only. Indicates that hostnames for this customer origin can only be resolved to IPv6.

ValidationURL

Required

String

Defines the URL to a sample asset stored on your servers. A set of optimal ADN gateway servers for your customer origin server is determined through the delivery of this sample asset.

Make sure that the hostname in the specified URL matches the one defined in the HostHeader request parameter.

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.edgecast.com/v2/mcc/customers/0001/origins/adn/123456 HTTP/1.1

Authorization: TOK:12345678-1234-1234-1234-1234567890ab

Accept: application/json

Content-Type: application/json

Host:api.edgecast.com

Content-Length: 419

{
	"DirectoryName" : "MyWebServer",
	"HostHeader" : "webapp.example.com:80",
	"HttpHostnames" : [{
			"Name" : "http:\/\/webapp1.example.com:80"
		}, {
			"Name" : "http:\/\/webapp2.example.com:80"
		}
	],
	"HttpLoadBalancing" : "RR",
	"HttpsHostnames" : [{
			"Name" : "https:\/\/webapp.example.com:443"
		}
	],
	"HttpsLoadBalancing" : "PF",
	"ValidationURL" : "http:\/\/webapp.example.com:80\/images\/PerformanceTestObject_5k.gif"
}

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.edgecast.com/v2/mcc/customers/0001/origins/adn/123456 HTTP/1.1

Authorization: TOK:12345678-1234-1234-1234-1234567890ab

Accept: application/xml

Content-Type: application/xml

Host:api.edgecast.com

Content-Length: 669

<CustomerOriginParameter xmlns="http://www.whitecdn.com/schemas/apiservices/">
	<DirectoryName>MyWebServer</DirectoryName>
	<HostHeader>webapp.example.com:80</HostHeader>
	<HttpHostnames>
		<Hostname>
			<Name>http://webapp1.example.com:80</Name>
		</Hostname>
		<Hostname>
			<Name>http://webapp2.example.com:80</Name>
		</Hostname>
	</HttpHostnames>
	<HttpLoadBalancing>RR</HttpLoadBalancing>
	<HttpsHostnames>
		<Hostname>
			<Name>https://webapp.example.com:443</Name>
		</Hostname>
	</HttpsHostnames>
	<HttpsLoadBalancing>PF</HttpsLoadBalancing>
	<ValidationURL>http://webapp.example.com:80/images/PerformanceTestObject_5k.gif</ValidationURL>
</CustomerOriginParameter>

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