WeFact Hosting API versie 2.7



VPS

VPS diensten zijn te beheren via de controller 'vps'.



create

Middels deze functie kunt u een VPS aanmaken op de VPS server.
Voorbeeldbestand: /voorbeelden/vps/vps.create.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een VPS
Hostname string De hostnaam
GetPassword 'yes' of 'no' Geeft aan of het ongecodeerde wachtwoord mee gegeven mag worden. Standaard: 'no'
Verplichte velden: Identifier of Hostname

Voorbeeld invoer:
<?php

require_once("../wefact_api.php");

$api = new WeFactAPI();

$vpsParams = array(
					'Hostname' 		=> 'vps2.example.com'
);

$response = $api->sendRequest('vps', 'create', $vpsParams);

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => vps
    [action] => create
    [status] => success
    [date] => 2016-09-01T12:00:00+02:00
    [success] => Array
        (
            [0] => VPS vps2.example.com is succesvol aangemaakt
            [1] => De e-mail met accountgegevens voor de VPS vps2.example.com is verzonden naar info@company.com
        )

    [vps] => Array
        (
            [Identifier] => 2
            [Hostname] => vps2.example.com
            [Debtor] => 1
            [DebtorCode] => DB0001
            [IPAddress] => 123.45.67.89
            [Package] => 1
            [Node] => 1
            [ServerID] => 1234
            [Image] => img1
            [MemoryMB] => 500
            [DiskSpaceGB] => 20
            [BandWidthGB] => 20
            [CPUCores] => 1
            [Comment] => 
            [Status] => active
            [Created] => 2016-09-01 12:00:00
            [Modified] => 2016-09-01 12:00:00
            [NodeInfo] => Array
                (
                    [Name] => Example VPS Node
                    [Images] => Array
                        (
                            [0] => Array
                                (
                                    [Node] => 1
                                    [Key] => img1
                                    [ImageName] => An example image
                                    [Status] => active
                                )

                        )

                    [Platform] => apiexample
                    [Location] => a
                    [Port] => 
                )

            [Translations] => Array
                (
                    [PackageName] => VPS package 1
                    [NodeName] => Example VPS Node
                    [ImageName] => An example image
                )

        )

)