refactored api target factory to support mixed types
fixing e2e test