Add schema validation to measurements API.

ok, I missed that.

 :shipit: