Origin Settings

Origin Settings (Add-Delete)

put

Update or delete origin settings for a resource. This setting is available for small, large and Aksela resource types.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
resource_uuidstringOptional

UUID of the resource

origin_typestring · enumOptional

Type of the origin

Possible values:
Responses
200
Successfully updated or deleted the origin settings for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 251

{
  "resource_uuid": "****-****-****-****",
  "origin_type": "mainstream",
  "origin_settings": [
    {
      "id": 1,
      "weight": 50,
      "priority": "primary",
      "protocol": "https",
      "http_port": 80,
      "https_port": 443,
      "origin_url": "example.com",
      "host_header": "update.com",
      "is_delete": false
    }
  ]
}
200

Successfully updated or deleted the origin settings for the resource.

{
  "status": true,
  "data": {}
}

Advanced Origin Settings

put

Add or delete advanced origin settings for a resource. This setting is available for small, large and Aksela resource types.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
resource_uuidstringOptional

UUID of the resource

Responses
200
Successfully updated or deleted the advanced origin settings for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 469

{
  "resource_uuid": "***",
  "advanced_origin_settings": [
    {
      "id": 1,
      "is_delete": false,
      "protocol": "http",
      "origin_url": "test.mydomain.com",
      "host_header": null,
      "http_port": 80,
      "https_port": 443,
      "priority": 0,
      "uri_match_mode": "directory",
      "uri_match_rule": "/images;/assets"
    },
    {
      "id": 2,
      "is_delete": false,
      "protocol": "http",
      "origin_url": "image.example.com",
      "host_header": null,
      "http_port": 80,
      "https_port": 443,
      "priority": 10,
      "uri_match_mode": "file_extension",
      "uri_match_rule": ".jpg;.png;.gif"
    }
  ]
}
200

Successfully updated or deleted the advanced origin settings for the resource.

{
  "status": true,
  "data": {}
}

Rewrite Origin URL

put

Update rewrite origin settings for a resource. It is used to ensure that requests made to origin redirect some directories or files to different directories and files.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
resource_uuidstringOptional

UUID of the resource

Responses
200
Successfully updated the rewrite origin settings for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 392

{
  "resource_uuid": "****-****-****-****",
  "rewrite_origin_settings": [
    {
      "match_mode": "full_path",
      "origin_uri": "/test/1.jpg",
      "target_uri": "/test/2.jpg",
      "priority": 50
    },
    {
      "match_mode": "wildcard",
      "origin_uri": "/test.*",
      "target_uri": "/test.mp4",
      "priority": 10
    },
    {
      "match_mode": "all_files",
      "target_uri": "/assets",
      "priority": 5
    },
    {
      "match_mode": "path",
      "origin_uri": "/test2",
      "target_uri": "/test",
      "priority": 15
    }
  ]
}
{
  "status": false,
  "data": {}
}

Origin SNI Request

put

Update Origin SNI Request Domain settings for a resource

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
resource_uuidstringRequired

UUID of the resource

origin_sni_request_statusbooleanRequired

Indicates if the Origin SNI request is enabled or disabled.

origin_sni_request_domainstringRequired

The domain for the Origin SNI request.

Responses
200
Successfully updated the Origin SNI Request Domain settings for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 113

{
  "resource_uuid": "***-***-****",
  "origin_sni_request_status": true,
  "origin_sni_request_domain": "test.mydomain.com"
}
200

Successfully updated the Origin SNI Request Domain settings for the resource.

{
  "status": true,
  "data": {}
}

Redirect Handle From Origin

put

This setting is available for small, large and Aksela resource types.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
resource_uuidstringRequired

UUID of the resource

status_redirect_handlebooleanRequired

Enables the opening and closing of the origin redirection process.

Responses
200
Successfully updated the Redirect Handle settings for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 272

{
  "resource_uuid": "***",
  "status_redirect_handle": true,
  "handle_origin_rejection_error": [
    301,
    302,
    303,
    307,
    308
  ],
  "redirect_handle_request_headers": [
    {
      "key": "x-test-request",
      "value": "request-header"
    }
  ],
  "redirect_handle_add_headers": [
    {
      "key": "x-test-add",
      "value": "response-header"
    }
  ]
}
200

Successfully updated the Redirect Handle settings for the resource.

{
  "status": true,
  "data": {}
}

Origin Response Timeout

put

This setting is available in small, large and dynamic(aksela) resource types.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
resource_uuidstringRequired

UUID of the resource

origin_response_timeoutinteger · min: 5 · max: 300Required

Sets the maximum expected time for the response from the origin server. Value must be between 5 and 300.

Responses
200
Successfully updated the Origin Response Timeout for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "resource_uuid": "****-****-****-*****",
  "origin_response_timeout": 50
}
200

Successfully updated the Origin Response Timeout for the resource.

{
  "status": true,
  "data": {}
}

Last updated

Was this helpful?