Added an API decorator which returns json