:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(customer-analytics): hide flag-gated external account endpoints from public API docs (#113934)
Arthur Moreira de Deus149e60d2762e
diff --git a/products/customer_analytics/backend/presentation/views/external.py b/products/customer_analytics/backend/presentation/views/external.pyindex 82d5b594bfd4..82995d025056 100644--- a/products/customer_analytics/backend/presentation/views/external.py+++ b/products/customer_analytics/backend/presentation/views/external.py@@ -122,6 +122,9 @@ class ExternalAccountListTeamSustainedThrottle(ProjectSecretApiKeyTeamRateThrottrate = ExternalAccountSustainedThrottle.rate+_INTERNAL_SCHEMA_EXTENSIONS = {"x-internal": True}++def _customer_analytics_enabled(team: Team) -> bool:organization_id = str(team.organization_id)return bool(@@ -320,6 +323,7 @@ class ExternalAccountView(APIView):scope_object = "account"@extend_schema(+ extensions=_INTERNAL_SCHEMA_EXTENSIONS,parameters=[OpenApiParameter("external_id",@@ -365,6 +369,7 @@ class ExternalAccountView(APIView):return handle_account_get(team, external_id)@extend_schema(+ extensions=_INTERNAL_SCHEMA_EXTENSIONS,request=ExternalAccountCreateSerializer,responses={200: OpenApiResponse(response=ExternalAccountSerializer, description="The account already existed."),@@ -557,6 +562,7 @@ class ExternalAccountListView(APIView):scope_object = "account"@extend_schema(+ extensions=_INTERNAL_SCHEMA_EXTENSIONS,parameters=[ExternalAccountListQuerySerializer],responses={200: OpenApiResponse(response=ExternalAccountListPageSerializer, description="Page of external accounts."),