Working on rest api