rest api fix