This commit adds the decorator http_codes to a number of the API put
methods so that all now use it. This ensures any exceptions generated by
the methods return the expected status code and the response body is
JSON encoded.
Change-Id: Id24ef3687afe21e36adae225efdef7150b5d5318
Partial-bug: 1665015