use ajax request for api ping