rest: return 404 if metric id is empty

Change-Id: Idec6bfed5731c3c37fe1114a0352698ce6a1c5cc
Merge "rest: return 404 if metric id is empty"