Added api for tasks