# API: Change Event
# updateSUStatus
# Required parameters
Parameter | Description |
---|---|
id | Event ID |
# Optional parameters
Parameter | Description |
---|---|
name[language_id] | Event name/subject |
description[language_id] | Event description |
date | Event date in Y-m-d format |
status | Event status. Allowed values: Scheduled, InProgress, Cancelled, ResolvedFaultIssue, CompletedMaintenance, Finished |
startdate | Event start datetime in Y-m-d H:i:s format |
enddate | Event finish datetime in Y-m-d H:i:s format |
relatedinfo[language_id] | Event related servers information |
notification | Show Notification in clientarea. Allowed values: "no" - don't show; "yes" - show from the "Date" till the "Finish time"; "yes_active" - show from the "Start time" till "Finish time" |
type_id | Event type ID |
# Request
GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=updateSUStatus&id=ID
# PHP Samples
$url = 'http://url_to_hb.com/admin/api.php';
$post = [
'call' => 'updateSUStatus',
'api_id' => $API_ID,
'api_key' => $API_KEY,
'id' => $ID,
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$data = curl_exec($ch);
curl_close($ch);
$return = json_decode($data, true);
print_r($return);
include 'class.hbwrapper.php';
HBWrapper::setAPI('http://url_to_hb.com/admin/api.php','API ID','API Key');
$params = [
'id' => $ID,
];
$return = HBWrapper::singleton()->updateSUStatus($params);
print_r($return);
/* Use this method to access HostBill api from HostBill modules */
$api = new ApiWrapper();
$params = [
'id' => $ID,
];
$return = $api->updateSUStatus($params);
print_r($return);
# PHP Samples: Change Event all parameters
$url = 'http://url_to_hb.com/admin/api.php';
$post = [
'call' => 'updateSUStatus',
'api_id' => $API_ID,
'api_key' => $API_KEY,
'id' => $ID,
'id' => '10',
'name[3]' => 'Event name/subjectNew event name in language with id 3',
'description[3]' => 'New description in language with id 3',
'name[4]' => 'Event name/subjectNew event name in language with id 4',
'description[4]' => 'New description in language with id 4',
'date' => '2025-01-01',
'status' => 'InProgress',
'startdate' => '2025-01-02 23:45:00',
'enddate' => '2025-01-03 23:45:00',
'relatedinfo[3]' => 'New relatedinfo in language with id 3',
'relatedinfo[4]' => 'New relatedinfo in language with id 4',
'notification' => 'yes_active',
'type_id' => '32',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$data = curl_exec($ch);
curl_close($ch);
$return = json_decode($data, true);
print_r($return);
include 'class.hbwrapper.php';
HBWrapper::setAPI('http://url_to_hb.com/admin/api.php','API ID','API Key');
$params = [
'id' => $ID,
'id' => '10',
'name[3]' => 'Event name/subjectNew event name in language with id 3',
'description[3]' => 'New description in language with id 3',
'name[4]' => 'Event name/subjectNew event name in language with id 4',
'description[4]' => 'New description in language with id 4',
'date' => '2025-01-01',
'status' => 'InProgress',
'startdate' => '2025-01-02 23:45:00',
'enddate' => '2025-01-03 23:45:00',
'relatedinfo[3]' => 'New relatedinfo in language with id 3',
'relatedinfo[4]' => 'New relatedinfo in language with id 4',
'notification' => 'yes_active',
'type_id' => '32',
];
$return = HBWrapper::singleton()->updateSUStatus($params);
print_r($return);
/* Use this method to access HostBill api from HostBill modules */
$api = new ApiWrapper();
$params = [
'id' => $ID,
'id' => '10',
'name[3]' => 'Event name/subjectNew event name in language with id 3',
'description[3]' => 'New description in language with id 3',
'name[4]' => 'Event name/subjectNew event name in language with id 4',
'description[4]' => 'New description in language with id 4',
'date' => '2025-01-01',
'status' => 'InProgress',
'startdate' => '2025-01-02 23:45:00',
'enddate' => '2025-01-03 23:45:00',
'relatedinfo[3]' => 'New relatedinfo in language with id 3',
'relatedinfo[4]' => 'New relatedinfo in language with id 4',
'notification' => 'yes_active',
'type_id' => '32',
];
$return = $api->updateSUStatus($params);
print_r($return);
# PHP Samples: Unassign type from event
$url = 'http://url_to_hb.com/admin/api.php';
$post = [
'call' => 'updateSUStatus',
'api_id' => $API_ID,
'api_key' => $API_KEY,
'id' => $ID,
'id' => '10',
'type_id' => NULL,
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$data = curl_exec($ch);
curl_close($ch);
$return = json_decode($data, true);
print_r($return);
include 'class.hbwrapper.php';
HBWrapper::setAPI('http://url_to_hb.com/admin/api.php','API ID','API Key');
$params = [
'id' => $ID,
'id' => '10',
'type_id' => NULL,
];
$return = HBWrapper::singleton()->updateSUStatus($params);
print_r($return);
/* Use this method to access HostBill api from HostBill modules */
$api = new ApiWrapper();
$params = [
'id' => $ID,
'id' => '10',
'type_id' => NULL,
];
$return = $api->updateSUStatus($params);
print_r($return);
# Response
{
"success": true,
"info": "The status updated",
"call": "updateSUStatus",
"server_time": 1749108600
}