testing ajax with api