Move api calls into json endpoint
Merge
Merge