Add Origin Entry - BETA

This endpoint is currently available as a BETA. Business-critical processes should not depend on this functionality.

Add an origin entry to a customer origin group through a platform-specific endpoint.

Key information:

Use the cdn.origins scope to authenticate and authorize requests for the Origins API.

Request

Platform-specific requests to create an origin entry are described below.

HTTP Method Request URI

POST

HTTP Large:

https://api.vdms.io/cdn/origins/v0.5/http-large

ADN:

https://api.vdms.io/cdn/origins/v0.5/adn

Request Headers

This endpoint only takes advantage of common request headers.

Request Body

The request parameters for this endpoint are described below.

Name Data Type Description

group_id

Required

Integer

Identifies the origin entry's customer origin group.

host

Required

String

Identifies the web server(s) that will be associated with this origin entry through either a hostname or IP address.

Key information:

  • If you set the protocol_type_id property to either the HTTPS Only or HTTP Only mode, then you may also define a protocol for edge to origin communication.

  • You may not specify a hostname or IP address that points to our network. This type of configuration is disallowed since it may cause your traffic to infinitely loop within our network.
  • Use any combination of hostnames and IP addresses when defining a customer origin group's origin entries.
  • Our service resolve hostnames to an IP address prior to delivery. The customer origin group's network_type_id property determines how hostnames will be resolved to an IP address.
  • Syntax:

    • HTTPS Only and HTTP Only Modes:

      If you choose to assign a protocol, make sure that all origin entries within a customer origin group for a given mode use the same protocol. For example, you may not configure some HTTPS Only origin entries to use the HTTP protocol and others to use the HTTPS protocol.

      Hostname Example:

      https://www.mydomain.com

      IPv6 Example:

      [1:2:3:4:5:6:7:8]
    • Match Client Mode:

      Hostname or IP Address

      IPv4 Example:

      10.10.10.255

    Brackets are required when identifying an origin server through the use of IPv6 notation. This is the standard URI convention for IPv6 addresses.

is_primary

Required

Boolean

Determines whether this origin entry identifies the primary hostname or IP address for the protocol defined within the protocol_type_id property.

You may only enable this property on a single origin entry within a customer origin group per protocol. For the purpose of this restriction, an origin entry that uses the Match Client mode is considered to be assigned both HTTP and HTTPS.

For example, enabling this property on an origin entry that uses the Match Client mode will cause it to be the primary origin entry for both HTTP and HTTPS.

This property is critical for determining how requests are load balanced. Setup for both modes are described below.

  • Primary / Failover: Our service load balances requests using primary / failover mode when this property is enabled on an origin entry within the desired customer origin group. This load balancing mode is restricted to that origin entry's protocol. If that origin entry has been configured to use the Match Client mode, then requests will be load balanced for both HTTP and HTTPS.
  • Round-Robin: Our service load balances requests using round-robin mode when this property is disabled on all origin entries within the desired customer origin group for the desired protocol.

name

String

Defines the origin entry's name.

port

Integer

Determines the port for communication with your origin servers.

Default Value:

This property's default value varies according to the value defined within the protocol_type_id property.

80 | 443

protocol_type_id

Integer

Determines this origin entry's protocol through its system-defined ID. Valid values are:

  • 1: HTTP Only
  • 2: HTTPS Only
  • 3: Match Client

Use the Get Available Protocols endpoint to retrieve a list of protocols and their system-defined IDs.

Default Value:

1

storage_type_id

Integer

Identifies the origin group's type through its system-defined ID. Valid values are:

  • 1: Customer origin group

Default Value:

1

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

Name Data Type Description

group_id

Integer

Indicates the origin entry's customer origin group.

host

String

Identifies the web server(s) that will be associated with this origin entry through either a hostname or IP address.

Key information:

  • Our service resolve hostnames to an IP address prior to delivery. The customer origin group's network_type_id property determines how hostnames will be resolved to an IP address.

id

Integer

Indicates the origin entry's system-defined ID.

is_primary

Boolean

Indicates whether this origin entry identifies the primary hostname or IP address for the protocol defined within the protocol_type_id property.

You may only enable this property on a single origin entry within a customer origin group per protocol. For the purpose of this restriction, an origin entry that uses the Match Client mode is considered to be assigned both HTTP and HTTPS.

For example, enabling this property on an origin entry that uses the Match Client mode will cause it to be the primary origin entry for both HTTP and HTTPS.

This property is critical for determining how requests are load balanced. Setup for both modes are described below.

  • Primary / Failover: Our service load balances requests using primary / failover mode when this property is enabled on an origin entry within the desired customer origin group. This load balancing mode is restricted to that origin entry's protocol. If that origin entry has been configured to use the Match Client mode, then requests will be load balanced for both HTTP and HTTPS.
  • Round-Robin: Our service load balances requests using round-robin mode when this property is disabled on all origin entries within the desired customer origin group for the desired protocol.

name

String

Indicates the origin entry's name.

port

Integer

Indicates the port for communication with your origin servers.

Default Value:

This property's default value varies according to the value defined within the protocol_type_id property.

80 | 443

protocol_type_id

Integer

Indicates this origin entry's protocol through its system-defined ID. Valid values are:

  • 1: HTTP Only
  • 2: HTTPS Only
  • 3: Match Client

Use the Get Available Protocols endpoint to retrieve a list of protocols and their system-defined IDs.

Default Value:

1

storage_type_id

Integer

Indicates the origin group's type through its system-defined ID. Valid values are:

  • 1: Customer origin group

Default Value:

1

Errors

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

View common error messages.

Sample Request and Response (JSON)

A sample JSON request is shown below.

{
	"name": "marketing-origin-entry-a",
	"group_id": 12345,
	"is_primary": false,
	"storage_type_id": 1,
	"protocol_type_id": 2,
	"host": "cdn-lb.example.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: 205

{
	"id": 5036042,
	"name": "marketing-origin-entry-a",
	"host": "https://cdn-lb.example.com",
	"port": 443,
	"is_primary": false,
	"storage_type_id": 1,
	"protocol_type_id": 2,
	"group_id": 12345
}