Add API support for cancelling operations