Zone Update for Aksela Object
It allows you to update an Aksela zone.
Method | Link |
---|---|
PUT |
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
user_key | string | Yes | API User Token |
user_secret | string | Yes | API User Secret Token |
zone_id | integer | Yes | Zone ID |
label | string | No | Zone Description |
origin_url | string | No | Origin URL |
origin_set_header | string | No | Must be string and not contains not contain "HTTP", "https", "//". |
origin_authentication | bool | object | No | Zone Auth Object |
username | string | Yes | Zone Auth Username |
password | string | Yes | Zone Auth Password |
edge_cache | string | No | Valid format: "{number}#{type}". Valid Types: Minute (m). It must between 5 and 59. Hour (h). It must between 1 and 23. Day (d). It must between 1 and 8. Examples: "5#m", "1#h", "3#d". |
browser_cache | string | No | Valid values; 'no','0','1h','2h','3h','6h','12h','1d','2d','3d','1m','3m','6m','1y' |
query_string | bool | No | Allow HTTP Query String |
custom_query_string | bool | No | Allow HTTP Custom Query String |
custom_query_string_args | array | No | Custom Query String Arguments. |
custom_headers | array | No | Custom Header Object. It's must be an array and contains the object. |
gzip | bool | No | Gzip compress |
image_compress | bool | No | Gzip option must be enabled for this feature. |
image_optimization | bool | No | Image optimization feature. |
shared_ssl | bool | No | Shared SSL feature |
http2 | bool | No | SNI must be enabled for this feature. Additionally, if shared_ssl is enabled, This option is automatically activated. |
collapse_whitespace | bool | No | The Collapse Whitespace filter reduces bytes transmitted in an HTML file by removing unnecessary whitespace. |
combine_css | bool | No | Combine CSS seeks to reduce the number of HTTP requests made by a browser during page refresh by replacing multiple distinct CSS files with a single CSS file, containing the contents of all of them. |
combine_javascript | bool | No | Combine JavaScript seeks to reduce the number of HTTP requests made by a browser during page refresh by replacing multiple distinct JavaScript files with a single one. |
convert_meta_tags | bool | No | The Convert Meta Tags filter adds a response header that matches each meta tag with an HTTP-equiv attribute. For example, <meta HTTP-eqiv="Content-Language" c> would be converted to Content-Language: fr in the response headers. |
defer_javascript | bool | No | defer_javascript tries to defer JavaScript execution until page load. It defers this by changing the type and src attributes of [removed] elements on the HTML page. |
force_root_domain | bool | No | This option let you redirect all root domain requests to subdomain base addresses. |
force_root_redirect_code | integer | No | This option let you redirect with HTTP status codes due to force_root_domain. HTTP Status code has to be 300(Permanently) or 301(Temporary) or 302(See Other). |
ignore_set_cookie | bool | No | Files having set cookie parameters won't be cached on Aksela. In order to code the file set-cookie parameter is ignored. |
inline_import_to_link | bool | No | The "Inline @import to Link" filter converts a <style> tag consisting of only @import statements into the corresponding <link> tags. |
pre_resolve_dns | bool | No | DNS resolution time varies from <1ms for locally cached results, to hundreds of milliseconds due to the cascading nature of DNS. |
remove_comments | bool | No | The remove_comments filter eliminates HTML comments, which are often used to document the code or to comment out experiments. |
rewrite_css | bool | No | This filter parses linked and inline CSS rewrites the images found and minifies the CSS. |
rewrite_javascript | bool | No | This filter minifies JavaScript code, using an algorithm similar to that in Douglas Crockford |
shard_domain | bool | No | Best practices suggest minimizing round-trip times by parallelizing downloads across hostnames. |
default_cache_type | string | No | Cache TYPE: 'Edge' or 'Origin' |
default_cache_time | string | No | Ignore the origin Default Cache Time and set every request to have a Max-Age one of values. Valid format: "{number}#{type}". Valid Types: Minute (m). It must between 5 and 59. Hour (h). It must between 1 and 23. Day (d). It must between 1 and 8. Examples: "5#m", "1#h", "3#d". |
default_dynamic_page_cache | bool | No | Page Cache Valid Format true, false |
xcdn_header | string | No | Medianova CDN origin uses this request header upon each request to your origin. You may use this unique key to distinguish Medianova CDN requests from others. |
mobile_redirect | bool | No | Redirect visitors that are using mobile devices to a mobile-optimized websiteƧ |
mobile_redirect_force_user_agent | bool | No | mobile_redirect must be true. If you consider User-Agent information when you are developing your web site for mobile devices, by enabling this feature you can add the "?mobile=true" URL parameter to the originating request. After this process, a separate cache structure will be created for mobile and other devices. |
mobile_redirect_type | numeric | No | mobile_redirect must be true and mobile_redirect_force_user_agent must be false. Valid values; 1 or 2. 1 is desktop to mobile. 2 is mobile to desktop. |
mobile_redirect_url | string | No | mobile_redirect must be true and mobile_redirect_force_user_agent must be false. This field must be a valid URL. |
Return Values
Variable | Type |
---|---|
status | bool |
data | object |
Example PHP Code
<?php
$data = array(
"user_key" => "user_key",
"user_secret" => "user_secret",
"zone_id" =>"zone_id",
"username" => "username",
"password" => "password"
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.medianova.com/v1/zone/aksela/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Example Output
{
"status": true,
"data": {
"alias": [],
"brotli": false,
"cdn_url": "www.cdn-url.com",
"collapse_whitespace": false,
"combine_css": true,
"combine_javascript": false,
"convert_meta_tags": false,
"create_at": "2016-12-21 11:49:46",
"custom_headers": false,
"default_cache_time": 3600,
"defer_javascript": true,
"edge_cache": "2#d",
"force_root_domain": false,
"gzip": true,
"html_cache": false,
"html_cache_time": 345600,
"http2": false,
"ignore_set_cookie": false,
"image_compress": true,
"image_optimization": true,
"inline_import_to_link": true,
"label": null,
"mobile_redirect": true,
"mobile_redirect_force_user_agent": false,
"mobile_redirect_keep_path": 2,
"mobile_redirect_type": 2,
"mobile_redirect_url": "http://mobile-url.com",
"name": "rquFea4rsda",
"origin_authentication": false,
"origin_cache_control_ignore": false,
"origin_url": "https://origin.com",
"page_rules": true,
"pre_resolve_dns": false,
"purge_username": "purge-username",
"queries": false,
"remove_comments": true,
"rewrite_css": true,
"rewrite_javascript": false,
"shard_domain": false,
"shared_ssl": true,
"status": true,
"xcdn_header": "ajBZcwVGFbwDHfd1vn8tVcfB",
"zone_id": 1
}
}