How to get status of task from task ID using API?