editEntry

Changes the values of a calendar entry.

Route /calendar/editEntry[/:key[/:format]]
required Parameters hash (POST)
datetimeStart (POST)
title (POST)
Optional Parameters projhash (POST)
datetimeEnd (POST)
description (POST)
eventType (POST)
priority (POST)
progress (POST)
status (POST)
format
return values hash
cross references getProjects() contains projekthashes.
hints Abhängigkeit: The parameters priority, progress and status are only considered if the parameter eventType has the value ‚todo‘.
POST: All parameters which are not atteched in the route are POST parameters.

Parameter

labeling description margin value default
projhash assignes a project to the entry see getProjects()
format Defines in what format the result will be returned. json|xml json
datetimeStart Startpoint of the event. YYYY-MM-DD H:M:S
datetimeEnd Endpoint of the event. YYYY-MM-DD H:M:S
title title string
description description string
eventType Defines the eventtype of the entry. note|todo|event
priority If the eventType has the value ‚todo‘, you can set the priority. urgent|high|normal|low
progress If the eventType has the value ‚todo‘, you can set the procentual state of the task.  0 bis 100
status If the eventType has the value ‚todo‘, you can set the state of the task. pending|processing|done

Return Values

labeling description margin value
hash Id of the organisation (a-z0-9){32}

Messages

Message Description
no permission The key has no access permission to this function.
internal error An internal error occured.
param missing A required parameter is missing.
param invalid The value of a parameter is not valid.
result empty The request was successful, but the result itself is empty.
cost error The current credit amount is not sufficient to handle the request.
0k. The processing was successful.

Example Code

$root = 'https://suite.xovi.net/api/';
$arrayPath = array(
    'service' => 'calendar',
    'method'  => 'editEntry',
    'key' => 'myAPIKey',
 );
$pathString = implode('/', $arrayPath);

$requestURL = $root.$pathString;

//build POST query
$arrayParams = array(
    'hash' = '1231lk23jlkjf3ij42309',
    'datetimeStart' => '2015-11-16 19:12:12',
    'title' => 'new Entry'
);
$paramsString = http_build_query($arrayParams);

if (!function_exists('curl_init')) die('cURL not available');

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_URL, $requestURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//setup POST
curl_setopt($ch, CURLOPT_POST, count($arrayParams));
curl_setopt($ch, CURLOPT_POSTFIELDS, $paramsString);

// Download the given URL, and return output
$output = curl_exec($ch);

// Close the cURL resource, and free system resources
curl_close($ch);

echo $output;

Beispielergebnisse

JSON

{
	"apiErrorCode": 0,
	"apiErrorMessage": "0k.",
	"apiResult": [{
		"hash": "b4b292d0c16f20eee10a7754539a189c"
	}]
}

XML

<?xml version="1.0" encoding="UTF-8"?>
<result>
 <apiErrorCode>0</apiErrorCode>
 <apiErrorMessage>0k.</apiErrorMessage>
 <apiResult>
     <entries>
         <entrie>
         <hash>3957d580698c3345c9a962e077c44961</hash>
        </entrie>
     </entries>
 </apiResult>
</result>