Get All Customer Origins - HTTP Small

Retrieves all customer origin configurations associated with the HTTP Small platform.

Request

A request to retrieve a list of customer origins is described below.

HTTP Method Request URI

GET

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

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.

Request Headers

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

Request Body

Request body parameters are not required by this endpoint.

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 contains the following response parameters for each customer origin configuration returned by this endpoint:

Name Data Type Description

DirectoryName

String

Identifies the directory name 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:

HostHeader

String

Identifies the value that will be assigned to the Host header for all requests to this customer origin configuration.

HttpFullUrl

String

Indicates the CDN URL for HTTP requests to this customer origin server.

HttpHostnames

Array

This response parameter contains the hostnames/IP addresses that will handle HTTP requests.

IsPrimary

Integer

HttpHostnames array

Indicates whether a particular hostname/IP address is the primary one for HTTP requests.

Valid values are:

  • 0: Indicates that the current hostname/IP address is not the primary one. This value will always be reported for the Round-Robin load balancing mode.
  • 1: Indicates that the current hostname/IP address is the primary one.

Name

String

HttpHostnames array

Reports the URL for the current hostname. This URL consists of the protocol, hostname, and the port.

Ordinal

Integer

HttpHostnames array

Indicates the position in the ordered list for the current hostname/IP address. This position is primarily used by "Primary and Failover" load balancing mode to determine which hostname/IP address will take over when a hostname/IP address higher on the list is unreachable.

HttpLoadBalancing

String

Indicates how HTTP requests will be load balanced for the specified hostnames/IP addresses.

Valid values are:

  • PF: This value indicates that "Primary and Failover" mode will be used to load balance requests for 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 hostname/IP address.
  • 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.

The load balancing mode indicated for your customer origin configuration is independent from any load balancing configuration that may exist at the origin server.

HttpsFullUrl

String

Indicates the CDN URL for HTTPS requests to this customer origin server.

HttpsHostnames

Array

This response parameter contains the hostnames/IP addresses that will handle HTTPS requests.

IsPrimary

Integer

HttpsHostnames array

Indicates whether a particular hostname/IP address is the primary one for HTTPS requests.

Valid values are:

  • 0: Indicates that the current hostname/IP address is not the primary one. This value will always be reported for the Round-Robin load balancing mode.
  • 1: Indicates that the current hostname/IP address is the primary one.

Name

String

HttpsHostnames array

Reports the URL for the current hostname/IP address. This URL consists of the protocol, hostname/IP address, and the port.

Ordinal

Integer

HttpsHostnames array

Indicates the position in the ordered list for the current hostname/IP address. This position is primarily used by "Primary and Failover" load balancing mode to determine which hostname/IP address will take over when a hostname/IP address higher on the list is unreachable.

HttpsLoadBalancing

String

Indicates how HTTPS requests will be load balanced for the specified hostnames/IP addresses.

Valid values are:

  • PF: This value indicates that "Primary and Failover" mode will be used to load balance requests for 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 hostname/IP address.
  • 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.

The load balancing mode indicated for your customer origin configuration is independent from any load balancing configuration that may exist at the origin server.

Id

Integer

Indicates the unique ID assigned to this customer origin configuration.

MediaTypeId

Integer

Identifies the platform on which the customer origin configuration resides. This response parameter will always report "8," which is the value assigned to the HTTP Small platform.

ShieldPOPs

Array

If the Origin Shield feature has been enabled on this customer origin configuration, then this response parameter will contain an object for each Origin Shield location that will act as an intermediate cache layer between our edge servers and your customer origin server.

Name

String

ShieldPOPs array

For each location returned by this endpoint, this response parameter will return a null value.

POPCode

String

ShieldPOPs array

Contains a three or four-letter abbreviation that indicates how Origin Shield will be applied for a particular region.

Learn more.

Region

String

ShieldPOPs array

For each location returned by this endpoint, this response parameter will return a null value.

UseOriginShield

Integer

Indicates whether Origin Shield has been activated on the customer origin.

Valid values are:

  • 0: Disabled.
  • 1: Enabled. The customer origin configuration is protected by the Origin Shield feature.

networkConfiguration

Integer

Indicates how hostnames associated with a 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.

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.

GET https://api.edgecast.com/v2/mcc/customers/0001/origins/httpsmall HTTP/1.1

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

Accept: application/json

Host:api.edgecast.com

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: 921

[{
		"DirectoryName" : "MyCustomerOrigin",
		"HostHeader" : "images.example.com:80",
		"HttpFullUrl" : "http:\/\/wac.0001.edgecastcdn.net\/800001\/MyCustomerOrigin",
		"HttpHostnames" : [{
				"IsPrimary" : 0,
				"Name" : "http:\/\/images1.example.com:80",
				"Ordinal" : 0
			}, {
				"IsPrimary" : 0,
				"Name" : "http:\/\/images2.example.com:80",
				"Ordinal" : 1
			}
		],
		"HttpLoadBalancing" : "RR",
		"HttpsFullUrl" : null,
		"HttpsHostnames" : [],
		"HttpsLoadBalancing" : null,
		"Id" : 1235,
		"MediaTypeId" : 8,
		"ShieldPOPs" : [],
		"UseOriginShield" : 0,
		"networkConfiguration" : 1
	}, {
		"DirectoryName" : "documents",
		"HostHeader" : "documents.example.com:80",
		"HttpFullUrl" : "http:\/\/wac.0001.edgecastcdn.net\/800001\/documents",
		"HttpHostnames" : [{
				"IsPrimary" : 0,
				"Name" : "http:\/\/documents1.example.com:80",
				"Ordinal" : 0
			}, {
				"IsPrimary" : 0,
				"Name" : "http:\/\/documents2.example.com:80",
				"Ordinal" : 1
			}
		],
		"HttpLoadBalancing" : "RR",
		"HttpsFullUrl" : null,
		"HttpsHostnames" : [],
		"HttpsLoadBalancing" : null,
		"Id" : 1235,
		"MediaTypeId" : 8,
		"ShieldPOPs" : [],
		"UseOriginShield" : 0,
		"networkConfiguration" : 1
	}
]

Sample Request and Response (XML)

A sample XML request is shown below.

GET https://api.edgecast.com/v2/mcc/customers/0001/origins/httpsmall HTTP/1.1

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

Accept: application/xml

Host:api.edgecast.com

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: 1380

<ArrayOfCustomerOrigin xmlns="http://www.whitecdn.com/schemas/apiservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<CustomerOrigin>
		<DirectoryName>MyCustomerOrigin</DirectoryName>
		<HostHeader>images.example.com:80</HostHeader>
		<HttpFullUrl>http://wac.0001.edgecastcdn.net/800001/MyCustomerOrigin</HttpFullUrl>
		<HttpHostnames>
			<Hostname>
				<IsPrimary>0</IsPrimary>
				<Name>http://images1.example.com:80</Name>
				<Ordinal>0</Ordinal>
			</Hostname>
			<Hostname>
				<IsPrimary>0</IsPrimary>
				<Name>http://images2.example.com:80</Name>
				<Ordinal>1</Ordinal>
			</Hostname>
		</HttpHostnames>
		<HttpLoadBalancing>RR</HttpLoadBalancing>
		<HttpsFullUrl i:nil="true"/>
		<HttpsHostnames/>
		<HttpsLoadBalancing i:nil="true"/>
		<Id>1234</Id>
		<MediaTypeId>8</MediaTypeId>
		<ShieldPOPs/>
		<UseOriginShield>0</UseOriginShield>
		<networkConfiguration>1</networkConfiguration>
	</CustomerOrigin>
	<CustomerOrigin>
		<DirectoryName>documents</DirectoryName>
		<HostHeader>documents.example.com:80</HostHeader>
		<HttpFullUrl>http://wac.0001.edgecastcdn.net/800001/documents</HttpFullUrl>
		<HttpHostnames>
			<Hostname>
				<IsPrimary>0</IsPrimary>
				<Name>http://documents1.example.com:80</Name>
				<Ordinal>0</Ordinal>
			</Hostname>
			<Hostname>
				<IsPrimary>0</IsPrimary>
				<Name>http://documents2.example.com:80</Name>
				<Ordinal>1</Ordinal>
			</Hostname>
		</HttpHostnames>
		<HttpLoadBalancing>RR</HttpLoadBalancing>
		<HttpsFullUrl i:nil="true"/>
		<HttpsHostnames/>
		<HttpsLoadBalancing i:nil="true"/>
		<Id>1235</Id>
		<MediaTypeId>8</MediaTypeId>
		<ShieldPOPs/>
		<UseOriginShield>0</UseOriginShield>
		<networkConfiguration>1</networkConfiguration>
	</CustomerOrigin>
</ArrayOfCustomerOrigin>