API set up, js translate to json ok