Fixed the api_list function