modify the api to json