fix rest api