CubePathDOCS
CDN

Create Origin

post/cdn/zones/{zone_uuid}/origins

Create a new origin for a CDN zone. You can provide a full origin_url (e.g., https://s3.example.com/bucket/) which will be automatically parsed. To serve one of your Object Storage buckets, pass object_storage_bucket_uuid instead of the connection fields: the origin is configured from the bucket and starts serving as soon as its access is ready.

Autorización

Authorization
Authorization*string

Bearer YOUR_API_TOKEN con un token de API. También vale la cabecera X-API-Key: YOUR_API_TOKEN.

Parámetros de ruta

zone_uuid*string

Cuerpo de la petición

Create a new CDN origin

application/jsonObligatorio
name*string
Rango1 ≤ length ≤ 100
origin_url?string | null

Full origin URL (e.g., https://s3.example.com/bucket-name/). If provided, extracts address, port, protocol, host_header, and base_path automatically.

Rangolength ≤ 500
address?string | null

IP address or hostname

Rango1 ≤ length ≤ 255
port?integer | null
Rango1 ≤ value ≤ 65535
protocol?CDNOriginProtocol | null
Valores"http""https"
weight?integer
Rango1 ≤ value ≤ 1000Por defecto100
priority?integer
Rango1 ≤ value ≤ 100Por defecto1
is_backup?boolean
Por defectofalse
health_check_enabled?boolean
Por defectotrue
health_check_path?string

Path of the HTTP check. Only used when health_check_type is http; with http and no path the check goes to /.

Rangolength ≤ 255Por defecto"/health"
health_check_type?string

tcp opens a connection to the origin (the default, what every origin has). http sends a request to health_check_path and takes the origin down when the answer is not one of health_check_expected_status: if it is the only origin of the zone, the zone answers 503.

Por defecto"tcp"Valores"tcp""http"
health_check_method?string

Method of an http check

Por defecto"GET"Valores"GET""HEAD"
health_check_expected_status?string

Statuses or classes an http check takes as up, separated by spaces (up to 8): 200, 301, 2xx

Rangolength ≤ 64Por defecto"2xx 3xx"
health_check_interval?integer

Seconds between the checks of an http check

Rango5 ≤ value ≤ 300Por defecto10
health_check_threshold?integer

Results in a row that make an http check change the state

Rango1 ≤ value ≤ 10Por defecto3
verify_ssl?boolean
Por defectotrue
host_header?string | null

Custom Host header to send to origin

Rangolength ≤ 255
base_path?string | null

Base path prefix for origin requests (e.g., /bucket-name)

Rangolength ≤ 255
enabled?boolean
Por defectotrue
s3_auth_enabled?boolean

Sign requests with AWS SigV4 for private S3-compatible buckets

Por defectofalse
s3_access_key?string | null

S3 access key ID

Rango8 ≤ length ≤ 128
s3_secret_key?string | null

S3 secret access key (write-only)

Rango8 ≤ length ≤ 128
s3_region?string | null

S3 region (e.g. us-east-1, eu-central-1)

Rangolength ≤ 64
s3_service?string

AWS service name (almost always 's3')

Rangolength ≤ 32Por defecto"s3"
object_storage_bucket_uuid?string | null

Serve one of your Object Storage buckets. Leave out every connection field (origin_url, address, port, protocol, host_header, base_path, verify_ssl, health checks, enabled and the s3_* fields): they are set from the bucket, and the origin starts serving once its access is ready.

Rangolength ≤ 36

Respuestas

Successful Response

application/json

uuid*string
name*string
address*string
s3_auth_enabled*boolean
object_storage_bucket_uuid?string | null
detail*string