HostFact API versie 3.1
Tickets
Tickets zijn te beheren via de controller 'ticket'.
attachment download
Middels deze functie kunt u een bijlagen van een ticket bericht downloaden. Het bestand wordt in een Base64 encoded string teruggegeven.
Voorbeeldbestand: /voorbeelden/attachment/attachment.ticket.download.php
Invoerparameters:
| Veldnaam | Waarde | Omschrijving |
|---|---|---|
| TicketID | string | De unieke ID van een ticket |
| Type | string | Bij een ticket altijd 'ticket' |
| Filename | string | De bestandsnaam |
Voorbeeld invoer:
<?php
require_once("../hostfact_api.php");
$api = new HostFactAPI();
$attachmentParams = array(
'TicketID' => 'T20180001',
'Type' => 'ticket',
'Filename' => 'example.txt'
);
$response = $api->sendRequest('attachment', 'download', $attachmentParams);
print_r_pre($response);
?>Voorbeeld uitvoer:
Array
(
[controller] => attachment
[action] => download
[status] => success
[date] => 2022-11-24T12:00:00+02:00
[success] => Array
(
[0] => example.txt
[1] => VGhpcyBpcyBhbiBleGFtcGxlIGZpbGUgd2l0aCBzb21lIGNvbnRlbnQ=
)
)