working on rest api