Added js api handlers