Skip to main content
POST
Create origin group

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Body

application/json

Create an origin group with host origins, or mixed host and S3 origins.

name
string
required

Origin group name.

Example:

"YourOriginGroup"

sources
(Host Source · object | S3 Source · object | FastEdge Source · object)[]
required
use_next
boolean

Defines whether to use the next origin from the origin group if origin responds with the cases specified in proxy_next_upstream. If you enable it, you must specify cases in proxy_next_upstream.

Possible values:

  • true - Option is enabled.
  • false - Option is disabled.
Example:

true

proxy_next_upstream
string[]

Defines cases when the request should be passed on to the next origin.

Possible values:

  • error - an error occurred while establishing a connection with the origin, passing a request to it, or reading the response header
  • timeout - a timeout has occurred while establishing a connection with the origin, passing a request to it, or reading the response header
  • invalid_header - a origin returned an empty or invalid response
  • http_403 - a origin returned a response with the code 403
  • http_404 - a origin returned a response with the code 404
  • http_429 - a origin returned a response with the code 429
  • http_500 - a origin returned a response with the code 500
  • http_502 - a origin returned a response with the code 502
  • http_503 - a origin returned a response with the code 503
  • http_504 - a origin returned a response with the code 504
Example:
auth_type
string
default:none
deprecated

Deprecated. No longer necessary. Defaults to none.

Origin authentication type.

Possible values:

  • none - Used for public origins.
  • awsSignatureV4 - Used for S3 storage.
Example:

"none"

Response

Successful.

Origin group with host origins, or mixed host and S3 origins using inline origin_type and config in sources.

id
integer
required

Origin group ID.

Example:

1

name
string
required

Origin group name.

Example:

"YourOriginGroup"

sources
(Host Source · object | S3 Source · object | FastEdge Source · object)[]
required

List of origin sources in the origin group. Each entry can be a host origin or an S3 origin.

Host origins have a source field with the hostname or IP. S3 origins have origin_type: s3 and a config object with S3 credentials. Both types can be mixed in the same origin group.

A host origin source.

Example:
use_next
boolean

Defines whether to use the next origin from the origin group if origin responds with the cases specified in proxy_next_upstream. If you enable it, you must specify cases in proxy_next_upstream.

Possible values:

  • true - Option is enabled.
  • false - Option is disabled.
Example:

true

proxy_next_upstream
string[]

Defines cases when the request should be passed on to the next origin.

Possible values:

  • error - an error occurred while establishing a connection with the origin, passing a request to it, or reading the response header
  • timeout - a timeout has occurred while establishing a connection with the origin, passing a request to it, or reading the response header
  • invalid_header - a origin returned an empty or invalid response
  • http_403 - a origin returned a response with the code 403
  • http_404 - a origin returned a response with the code 404
  • http_429 - a origin returned a response with the code 429
  • http_500 - a origin returned a response with the code 500
  • http_502 - a origin returned a response with the code 502
  • http_503 - a origin returned a response with the code 503
  • http_504 - a origin returned a response with the code 504
Example:
auth_type
string
default:none
deprecated

Deprecated. No longer necessary. Defaults to none.

Origin authentication type.

Possible values:

  • none - Used for public origins.
  • awsSignatureV4 - Used for S3 storage.
Example:

"none"

path
string
deprecated

Deprecated. No longer necessary. Omit this field and the default origin path behavior will be used.

Origin path prefix.

Example:

""

Defines whether the origin group has related CDN resources.

Possible values:

  • true - Origin group has related CDN resources.
  • false - Origin group does not have related CDN resources.
Example:

true