Load and save events using a REST service

How can I use my own REST services to load/create/update events, instead of using the build-in functions?

By default, we can configure scheduler to load or save data like this:

scheduler.load("http://example.com/...", "json");
scheduler.dataProcessor = new dataProcessor("http://example.com/...");
...

But I want to use my own service that deliver data in different format than DHTMLX scheduler.

For data loading you can just use http url of yours web-service, as it load data by GET request, as expected.

For data sending, you need to drop the dataprocessor and use direct event handlers

scheduler.attachEvent("onEventAdded", function(id){ var obj_to_save = this.getEvent(id); //now you need to use some ajax code to send data object to the rest service })

similar handling need to be added to the updating and deleting events.