serves up fragments through the api in json format