list API endpoint with proper json serialization