api added to js