Contents.prototype.save = function(path, model) {
/**
* We do the call with settings so we can set cache to false.
*/
var settings = {
processData : false,
type : "PUT",
dataType: "json",
data : JSON.stringify(model),
contentType: 'application/json',
};
var url = this.api_url(path);
return utils.promising_ajax(url, settings);
};
The problem is that you need put data in your request.The API will use ContentsManager.save(model, path) to save file. Your need know how to decode an .ipynb to a model, then change something in it, at last put your model to Save API to save .ipynb file.