Adding REST/JSON API