Adding Json endpoint for data
Adjusts template to use endpoint