Update transaction serialization for api. Fix label query parsing for
api.