Skip to main content

Create Small CDN Resource Origin Type: Mainstream

A new multi-origin can be defined that will enable load balancing and redundancy between origin servers.

 Parameters

 Description

 Type

 Required

 organization_uuid

The created organization in Medianova Cloud Panel unit ID value. Path parameter.

 String

 Yes

 resource_type

It is the type of the resource created in Medianova Cloud Panel. It can be “small, large, dynamic” values.

String

 Yes

 resource_name

It is the name given to the resource created in the Medianova cloud panel. It must be unique.

String

 Yes

 resource_label

Specifies the Resource. There is no character limit and special characters can be written.

String

 No

 data_source

Determines the source of the resource. It can take “origin”.

String

 Yes

origin_type

“origin_type” is sent as “mainstream” to define a new multi-origin that will enable load balancing and redundancy between origin servers.

String

Yes

origin_settings

Determines of this origin setting.

Array

Yes

origin_settings.weight

Determines the weight of this origin setting. Higher-weight origins receive more traffic in the load balancing algorithm.

Integer

No

origin_settings.priority

Specifies whether the origin is in the primary or standby position. It can take “primary” or “standby” values.

String

Yes

 origin_settings.protocol

It determines the protocol of the entered origin_url. It can take “http”, “https” or “follow” values. Specifies the protocol to be used in communication with the origin. When "follow" is used, it follows the protocol used by the client.

String

 Yes

origin_settings.http_port

Port number used for HTTP communication with the origin.

Integer

No

origin_settings.is_delete

If true, indicates the intention to delete the origin; otherwise, it should be false.

Boolean

No

origin_settings.https_port

Port number used for HTTPS communication with the origin.

Integer

No

origin_settings.origin_url

URL or IP address specifying where the origin is accessible.

String, URL

 Yes

origin_settings.host_header

Specifies the Host header. If null, the default host header is used.

String

No

Payload

CODE
{
    "resource_type": "small",
    "resource_name": "test-resource",
    "resource_label": "small test",
    "data_source" : "origin",
    "origin_type": "mainstream",
    "origin_settings": [
        {
            "weight": 50,
            "priority": "primary",
            "protocol": "follow",
            "http_port": 80,
            "is_delete": false,
            "https_port": 443, 
            "origin_url": "test.com",
			"host_header": null
        }
    ]
}

Response

CODE
{
    "status": true,
    "data": {
        "resource_uuid": "****-****-****-****",
        "resource_type": "small",
        "resource_name": "test-resource",
        "cdn_url": "test-resource.mncdn.org",
        "resource_label": "small test",
        "ssl_certificate": "shared_ssl",
        "created_at": "2024-02-02T07:45:33.000000Z",
        "data_source": "origin",
        "gzip_text": false,
        "gzip_image": false,
        "brotli": false,
        "image_optimization": false,
        "webp": true,
        "avif": null,
        "http2": true,
        "status_qs": false,
        "status_secure_token": false
    }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.