rest: returns 404 on entity not found rather than 400

Change-Id: Ic501555020e2acef2ec0dbe2ae970e9aafc820ca
Merge "rest: returns 404 on entity not found rather than 400"