Change ajax get to rest syntax