Added get_by_key method to API