Description
Log out of the SoftNAS and deactivate the API session.
 
 
Request
 
 
Example
| 
 
<?php  
  
    $mypath = getcwd();  
  
    $mypath = preg_replace('/\\\\/', '/', $mypath);  
  
    $cookie_file_path = "$mypath/cookies/cookie.txt";  
  
    $ch = curl_init();  
  
    curl_setopt($ch, CURLOPT_URL, "https://example.com/softnas/logout.php");  
  
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
  
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);  
  
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE );  
  
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE );  
  
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);   // Cookie management. 
  
  
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);  
  
    curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);  
  
  
  
    $output = curl_exec($ch);  
  
    $info = curl_getinfo($ch);  
  
    curl_close($ch);  
  
    echo $info;  
  
?>  
 | 
 
Return Values
 
 
Example
| 
 
{ 
    "result": {}, 
    "session_id": 8062, 
    "success": true 
} 
  
 |