create web api and use ajax