add task history api