API Add Admin ACL

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

Add Admin ACL

Parameters Type Description
add_admin_acl POST Flag to Add ACL
name POST Name of the Plan
act_add_admin_acl POST Add Admin ACL
act_addbackupserver POST Add Backup Server
act_adddnsplan. POST Add DNS Plan
act_addips POST Add IPs
act_addiso POST Add ISOs
act_addmg POST Add Media Groups
act_addpdns POST Add PDNS
act_addplan POST Add Plans
act_addreversedns POST Add rDNS
act_addserver POST Add Slave Server
act_addsg POST Add Server Groups
act_addtemplate POST Add Templates
act_adduser POST Add Users
act_adminacl POST View Admin ACLs
act_backupservers POST View Backup Servers
act_changehostname POST Edit Hostname
act_cluster_statistics POST View Cluster Statistics
act_config POST Edit General Settings
act_createssl POST Create SSL
act_createtemplate POST Create Template
act_createvs POST Create VPS
act_databackup POST View DB Backups
act_defaultvsconf POST Default VPS Config
act_delete_admin_acl POST Delete Admin ACL
act_deletebackupserver POST Delete Backup Server
act_deletedatabackup POST Delete Data Backup
act_deletednsplan POST Delete DNS Plan
act_deleteippool POST Delete IP Pool
act_deleteips POST Delete IPs
act_deleteiso POST Delete ISO
act_deleteloginlogs POST Delete Login Logs
act_deletemg POST Delete Media Group
act_deletepdns POST Delete PDNS
act_deleteplan POST Delete Plans
act_deleteserver POST Delete Server
act_deletesg POST Delete Server Group
act_deletetemplate POST Delete Template
act_deleteuser POST Delete User
act_deleteuserlogs POST Delete User Log
act_deletevpsbackup POST Delete VPS Backup
act_deletevs POST Delete VPS
act_dldatabackup POST Download DB Backups
act_dnsplans POST View DNS Plans
act_edit_admin_acl POST Edit Admin ACL
act_editbackupservsers POST Edit Backup Server
act_editdnsplan POST Edit DNS Plan
act_editemailtemps POST Edit Email Templates
act_editfirewall POST Edit Firewall
act_editippool POST Edit IP Pool
act_editips POST Edit IPs
act_editiso POST Edit ISO
act_editmg POST Edit Media Group
act_editpdns POST Edit PDNS
act_editplan POST Edit Plan
act_editserver POST Edit Server
act_editsg POST Edit Server Group
act_editssl POST Edit SSL
act_edittemplate POST Edit Template
act_edituser POST Edit User
act_editvs POST 'Edit VPS
act_emailsettings POST Edit Email Settings
act_emailtemps POST View email templates
act_filemanager POST Access File Manager
act_hostname POST View Hostname
act_importvs POST Import VS
act_ippool POST View IP Pools
act_iptables POST Restart IP Tables
act_kernconfig POST Edit Kernel Config
act_licenseinfo POST View License Info
act_listips POST View IPs
act_listiso POST View ISO
act_listvs POST View VPS
act_loginlogs POST View Login Logs
act_logs POST View Logs
act_maintenance POST Maintenance Mode
act_managepdns POST Manage DNS Servers
act_migrate POST Migrate Virtual Server
act_mysqld POST Restart MySQL
act_network POST Restart network service
act_os POST View Template Browser
act_ostemplates POST View Templates
act_pdns POST View DNS Servers
act_performdatabackup POST Perform DB Backups
act_phpmyadmin POST Access PhpMyAdmin
act_plans POST View Plans
act_procs POST Manage processes
act_rebootserver POST Reboot Server
act_rebuildvs POST Rebuild Virtual Server
act_restorevpsbackup POST Restore VPS Backups
act_sendmail POST Restart mail server
act_server_statistics POST View Server Statistics
act_serverinfo POST View Server Info
act_servers POST View Servers
act_services POST Manage services
act_sg POST View Server Groups
act_ssh POST Access SSH
act_ssl POST Access SSL
act_suspendvs POST Suspend Virtual Server
act_unsuspendvs POST Unsuspend Virtual Server
act_updates POST Perform Updates
act_userlogs POST View User logs
act_users POST View Users
act_vpsbackups POST View VPS Backups
act_vpsbackupsettings POST Edit VPS Backup Settings
act_vpsvnc POST Virtual Server VNC
act_vsresources POST View VPS Resources
act_webserver POST Restart webserver
deletelogs POST Delete logs

Example Code



    $key =  'uketenhrhpunty5lhgwkcuxxxxxxxxxx';

    $pass = 'yrsofc3tg3tre7bjpfppspxxxxxxxxxx';

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

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

    $post = array();
    $post['name'] = 'apitest';
    $post['add_admin_acl'] = 'on';
    $post['act_add_admin_acl'] = 'on';
    $post['act_addbackupserver'] = 'on';
    $post['act_adddnsplan'] = 'on';
    $post['act_addippool'] = 'on';
    $post['act_addips'] = 'on';
    $post['act_addiso'] = 'on';
    $post['act_addmg'] = 'on';
    $post['act_addpdns'] = 'on';
    $post['act_addplan'] = 'on';
    $post['act_addreversedns'] = 'on';
    $post['act_addserver'] = 'on';
    $post['act_addsg'] = 'on';
    $post['act_addtemplate'] = 'on';

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

Returns: <syntaxhighlight lang="php"> Array (

   [title] => Add Administrator ACL
   [done] => TRUE;
   [error] =>
   [timenow] => 1431431639
   [time_taken] => 0.163