Added webservice/graph.py and changes to restapi.py