change rest api to include id