API Create SSL

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

Create SSL Certificate

Parameters Description
country Counrtry Code
state Full Name of State
locality City Name
organisation Complete Organisation Name
orgunit Complete Organisation Type
comname Complete Company name
email Valid Email Address
keysize Key Size for the Encryption

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['country']     = 'IN';
    $post['state']       = 'maharashtra';
    $post['locality']    = 'mumbai';
    $post['organisation']= 'soft';
    $post['orgunit']     = 'tech';
    $post['comname']     = 'soft';
    $post['email']       = 'apitest@apitest.com';
    $post['keysize']     = '';

    $output = $admin->createssl($post);
    print_r($output);
?>

Returns: