Updating return_as_hash functions for REST API