Added support for 'hook' parameter for 'create task' API call to TaskAPI method createTask