Adds a customer origin to the ADN platform.
Once a customer origin has been created, complete the setup process by calling the Reselect ADN Gateways endpoint.
A request to create a customer origin is described below.
HTTP Method | Request URI |
---|---|
POST |
https://api.edgecast.com/v2/mcc/customers/AccountNumber/origins/adn |
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 |
|
This endpointIdentifies a request's connection point to our REST API service. only takes advantage of common request headers.
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. Use the proper syntax to indicate this relationship when submitting a request. Please refer to the parent request parameter for more information.
Name | Data Type | Description |
---|---|---|
DirectoryName Required |
String |
Identifies the directory name that will be assigned to the customer origin configuration. This alphanumeric value is appended to the end of the base CDN URL that points to the customer origin server. Example: http://adn.0001.edgecastcdn.net/800001/CustomerOriginThis variable represents the directory name assigned to your 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:
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:
|
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:
|
HttpLoadBalancing Required for HTTP requests. |
String |
Determines how HTTP requests will be load balanced across the specified hostnames/IP addresses. Valid values for this request parameter are described below.
Key information:
|
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:
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:
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 for this request parameter are described below.
Key information:
|
NetworkConfiguration |
Integer |
Determines how hostnames associated with this customer origin configuration will be resolved to an IP address.
|
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. |
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 contains the following response parameter:
Name | Data Type | Description |
---|---|---|
CustomerOriginId |
Integer |
Indicates the unique ID assigned to this customer origin configuration. |
The response body for an unsuccessful request may contain an error parameter that provides additional information.
A sample JSON request is shown below.
POST https://api.edgecast.com/v2/mcc/customers/0001/origins/adn 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: 34
{ "CustomerOriginId" : 123456 }
A sample XML request is shown below.
POST https://api.edgecast.com/v2/mcc/customers/0001/origins/adn 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: 204
<CustomerOriginAddResult xmlns="http://www.whitecdn.com/schemas/apiservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <CustomerOriginId>123456</CustomerOriginId> </CustomerOriginAddResult>