Get Virtualizor

Edit Storage

Use the Edit Storage API to edit the configurations of the storage space on which VPSes are created. The configurations include name of the storage, alert threshold, changing the storage to be used as primary storage, and setting the oversell limit for the storage. The API response will contain "done" as "true" on successful update of the storage.

HTTP Request



actGETeditstorageThe action will return done as true after the particular storage has been editedYes
stidGETIntThe storage ID which needs to be editedYes
namePOSTtextThe name of the storageYes
oversellPOSTIntThe oversell value given to the storageNo
alert_thresholdPOSTIntIf this used size crosses this percentage, an email will be sent to the AdminNo
primary_storagePOST1/0If set then the storage will be set as primaryNo

Sample Code



    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

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

    $post = array();
    $post['stid'] = 113;
    $post['name'] = 'QCOW File Storage';

    $output = $admin->editstorage($post);



    "title": "Edit Storage",
    "done": true,
    "timenow": 1535565069,
    "time_taken": "0.281"
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list