Unify PUT and POST method in rest api

Signed-off-by: walteryang <walteryang47@users.noreply.github.com>