Adding endpoints to fetch json data for graphs