I want to delete an event in Vtiger Calendar using REST APIs. I'm trying the following:
POST /webservice.php HTTP/1.1
operation=delete
sessionName=sessionId // Obtained through Login Operation
id=<WEBSERVICE_ID>
but I don't know what WEBSERVICE_ID is and where to find it.
When I create an event using REST-API it returns an array with the following data:
{"subject":"Follow up Test","assigned_user_id":"49x1","date_start":"2016-06-17","time_start":"09:00:00","time_end":"18:00:00","due_date":"2016-06-17","recurringtype":"","parent_id":"","contact_id":"","taskstatus":"","eventstatus":"Planned","taskpriority":"High","sendnotification":"0","createdtime":"2016-06-23 11:18:20","modifiedtime":"2016-06-23 11:18:20","activitytype":"Event","visibility":"","duration_hours":"9","duration_minutes":"0","location":"","notime":"0","modifiedby":"49x1","created_user_id":"49x1","source":"WEBSERVICE","starred":"0","tags":"","reminder_time":"","description":"Test Description","id":"1x5748","label":"Follow up Test"}
There is an id in the array ("id":"1x5748"), but when I try to use the id as a WEBSERVICE_ID in the delete operation I'm getting the following error:
Fatal error: Uncaught exception 'Exception' with message 'Error: Id specified is incorrect'
Run this query: SELECT id, nameFROM vtiger_ws_entity
Whith this your objectTypeId
is a id for module
Get the record id
concatenate 1And2 for example: EVENTS module='18' AND record id=61900
, then the ID that you need is: 18x61900;
I use this code for delete entity
$params = array( //"id" => "35789", "id" => "18x61900", ); $record = $client->doInvoke("delete", $params, "POST");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.