This operation purges files in the cache of edge nodes.

Parameters

Return Values

Example Output:

<?php
$curl_post_data = array(
    'user_key' =>'Your User Key',
    'user_secret' =>'Your User Secret',
    'zone_id' =>'Zone Id',
    'files' => array('Your Purge File')   
);
$request_body = json_encode($curl_post_data);
$service_url = 'https://api.medianova.com/v1/zone/purge/add';
$ch = curl_init($service_url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                    
curl_setopt($ch, CURLOPT_POSTFIELDS, $request_body);                                                                 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                     
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                         
    'Content-Type: application/json',                                                                               
    'Content-Length: ' . strlen($request_body))                                                                      
);
$response = curl_exec($ch);
$decoded = json_decode($response);
var_dump($decoded); 
 
?>

Return Example:

{
  "status": true
}

 

Was this post helpful?