query to get api_keys