Fix migration typo/error in rest api