'update( self, trans, id, payload, **kwd )
* PUT /api/histories/{id}
updates the values for the history with the given ``id``
:type   id:      str
:param  id:      the encoded id of the history to update
:type   payload: dict
:param  payload: a dictionary containing any or all the
fields in :func:`galaxy.model.History.to_dict` and/or the following:
* annotation: an annotation for the history
:param  keys: same as the use of `keys` in the `index` function above
:param  view: same as the use of `view` in the `index` function above
:rtype:     dict
:returns:   an error object if an error occurred or a dictionary containing
any values that were different from the original and, therefore, updated'

@expose_api
def update(self, trans, id, payload, **kwd):

    history = self.history_manager.get_owned(self.decode_id(id), trans.user, current_history=trans.history)
    self.history_deserializer.deserialize(history, payload, user=trans.user, trans=trans)
    return self.history_serializer.serialize_to_view(history, user=trans.user, trans=trans, **self._parse_serialization_params(kwd, 'detailed'))
