Fixes on rest API posting