Add task info api

Added API to get task info.