Write JSON API controller actions.