WeFact Hosting API versie 2.7



VPS

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



list

Middels deze functie kunt u een lijst met VPS diensten ophalen die voldoen aan de meegegeven parameters.
Voorbeeldbestand: /voorbeelden/vps/vps.list.php


Invoerparameters:
Veldnaam Waarde Omschrijving
status string VPS status, zie variabelen-lijst
offset int Standaard: 0
limit int Standaard: 1000
sort string Standaard: Hostname
order 'ASC' of 'DESC' Standaard: ASC
searchat string Welke velden doorzocht moeten worden.
Standaard: Hostname
searchfor string Zoekterm
created filter_datetime Filtermogelijkheid op aanmaakdatum
modified filter_datetime Filtermogelijkheid op wijzigingsdatum

Voorbeeld invoer:
<?php

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

$api = new WeFactAPI();

$vpsParams = array(
				// Get all vps of customer DB0001
				'searchat' 			=> 'DebtorCode',
				'searchfor' 		=> 'DB0001'
);

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

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => vps
    [action] => list
    [status] => success
    [date] => 2016-09-01T12:00:00+02:00
    [totalresults] => 2
    [currentresults] => 2
    [offset] => 0
    [filters] => Array
        (
            [searchat] => DebtorCode
            [searchfor] => DB0001
        )

    [vps] => Array
        (
            [0] => Array
                (
                    [Identifier] => 1
                    [Hostname] => vps1.example.com
                    [Debtor] => 1
                    [DebtorCode] => DB0001
                    [CompanyName] => Company X
                    [Initials] => John
                    [SurName] => Jackson
                    [IPAddress] => 123.45.67.89
                    [ServerID] => 1234
                    [Package] => 1
                    [Node] => 1
                    [Image] => img1
                    [Status] => active
                    [Subscription] => Array
                        (
                            [ProductCode] => P005
                            [Description] => VPS package 1
                            [Number] => 1
                            [PriceExcl] => 35
                            [TaxPercentage] => 21
                            [DiscountPercentage] => 0
                            [Periods] => 1
                            [Periodic] => m
                            [StartPeriod] => 2016-10-14
                            [EndPeriod] => 2016-11-14
                            [NextDate] => 2016-09-30
                            [TerminationDate] => 
                            [AmountExcl] => 35
                            [AmountIncl] => 42.35
                        )

                    [Modified] => 2016-09-01 12:00:00
                )

            [1] => Array
                (
                    [Identifier] => 2
                    [Hostname] => vps2.example.com
                    [Debtor] => 1
                    [DebtorCode] => DB0001
                    [CompanyName] => Company X
                    [Initials] => John
                    [SurName] => Jackson
                    [IPAddress] => 123.45.67.89
                    [ServerID] => 1234
                    [Package] => 1
                    [Node] => 1
                    [Image] => img1
                    [Status] => waiting
                    [Modified] => 2016-09-01 12:00:00
                )

        )

)