API Maintainence

From Virtualizor Wiki
Jump to: navigation, search
NOTE
This is OLD API Documentation. Click on the following link for New API Documentation
Admin API

Set Maintainence Mode

Parameters Description
off_subject Maintainence mode subject
off_message Maintainence mode message

Example Code

<?php

    require_once('admin.php');

    $key =  'uketenhrhpunty5lhgwkcuxxxxxxxxxx';

    $pass = 'yrsofc3tg3tre7bjpfppspxxxxxxxxxx';

    $ip = 'xxx.xxx.xxx.xxx';

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);

    $post = array();
    $post['off_subject']='';
    $post['off_message']='';
    
    $output = $admin->maintenance($post);
    print_r($output);
?>

Returns:

Array
(
    [title] => Maintenance
    [done] => 1
    [timenow] => 1403242959
    [time_taken] => 0.017
)