Unlock VPS

Use the Unlock VPS API to unlock VPS present on your server by passing the VPS ID to the API. The API response contains “done” as “true” on successful unlocking of the VPS (Since 3.0.7+).

HTTP Request

https://hostname:4085/index.php?act=vs&action=unlock&vpsid=VPSID

Parameters

NameMethodValueDescriptionRequired
actGETvsThe action specified to retrieve data after vps is unlockedYes
vpsidGETIntThe ID of the vps which needs to be unlocked.Yes
actionGETtextThe value of the action should be “unlock” for unlocking the VPSYes

Sample Code

<?php

    require_once('/usr/local/virtualizor/sdk/admin.php');

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

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

    $vid = 3582;

    $output = $admin->unlock($vid);

    print_r(json_encode($output));

?>

Output

{
  "title": "Virtual Servers",
  "done": true,
  "done_msg": "VPS Unlocked",
  "vsop": {
    "action": "unlock",
    "id": 3582,
    "serid": "0",
    "status": {
      "3582": 1
    }
  },
  "timenow": 1535125750,
  "time_taken": "4.432"
}
Was this helpful to you?