I am trying to do a bulk delete for photos with the titanium sdk and I cannot get the send request to run. I get the error "Requested API endpoint does not exist. Check that you are using the correct GET, POST, PUT, or DELETE HTTP method."
i tried it without the created date in case that might have been causing an issue but its the same error. Type is a custom object for my photo. How do i get this to work?
//try to delete old pictures of fish var twoweeksago = moment().subtract(14, 'days'); Cloud.sendRequest({ url : "https://api.cloud.appcelerator.com/v1/photos/batch_delete.json?key=MYAPPKEY&pretty_json=true", method : "DELETE", data : { "Type" : "Fish Pictures", "created_at" : { "$lte" : twoweeksago } } }, function(e) {// The callback called when the request completes if (e.success) { var photo = e.photo[0]; Ti.API.info("Success in deleteing all pictures" + JSON.stringify(e)); } else { Ti.API.info('Error deleting all pictures:' + ((e.error && e.message) || JSON.stringify(e))); } });