HostFact API versie 3.1



VPS

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



downloadaccountdata

Middels deze functie kunt u de PDF met accountgegevens als Base64 encoded string ophalen.
Voorbeeldbestand: /voorbeelden/vps/vps.downloadaccountdata.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("../hostfact_api.php");

$api = new HostFactAPI();

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

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

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => vps
    [action] => downloadaccountdata
    [status] => success
    [date] => 2022-11-24T12:00:00+02:00
    [success] => Array
        (
        )

    [vps] => Array
        (
            [Filename] => Gegevens.VPS.pdf
            [Base64] => JVBERi0xLj...cKJSVFT0YK
        )

)