diff --git a/src/sentry/api/urls.py b/src/sentry/api/urls.py index d69b2353899f55..2548f5604e6639 100644 --- a/src/sentry/api/urls.py +++ b/src/sentry/api/urls.py @@ -563,9 +563,6 @@ from sentry.seer.supergroups.endpoints.organization_supergroup_details import ( OrganizationSupergroupDetailsEndpoint, ) -from sentry.seer.supergroups.endpoints.organization_supergroups import ( - OrganizationSupergroupsEndpoint, -) from sentry.seer.supergroups.endpoints.organization_supergroups_by_group import ( OrganizationSupergroupsByGroupEndpoint, ) @@ -2439,11 +2436,6 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: OrganizationSeerExplorerUpdateEndpoint.as_view(), name="sentry-api-0-organization-seer-explorer-update", ), - re_path( - r"^(?P[^/]+)/seer/supergroups/$", - OrganizationSupergroupsEndpoint.as_view(), - name="sentry-api-0-organization-supergroups", - ), re_path( r"^(?P[^/]+)/seer/supergroups/by-group/$", OrganizationSupergroupsByGroupEndpoint.as_view(), diff --git a/src/sentry/seer/signed_seer_api.py b/src/sentry/seer/signed_seer_api.py index 1563cc7f9e496b..3a3a4ee66bfad7 100644 --- a/src/sentry/seer/signed_seer_api.py +++ b/src/sentry/seer/signed_seer_api.py @@ -323,13 +323,6 @@ class SupergroupsEmbeddingRequest(TypedDict): artifact_data: dict[str, Any] -class SupergroupsListRequest(TypedDict): - organization_id: int - offset: NotRequired[int | None] - limit: NotRequired[int | None] - project_ids: NotRequired[list[int] | None] - - class SupergroupsGetRequest(TypedDict): organization_id: int supergroup_id: int @@ -439,20 +432,6 @@ def make_supergroups_embedding_request( ) -def make_supergroups_list_request( - body: SupergroupsListRequest, - viewer_context: SeerViewerContext, - timeout: int | float | None = None, -) -> BaseHTTPResponse: - return make_signed_seer_api_request( - seer_autofix_default_connection_pool, - "/v0/issues/supergroups/list", - body=orjson.dumps(body), - timeout=timeout, - viewer_context=viewer_context, - ) - - def make_supergroups_get_request( body: SupergroupsGetRequest, viewer_context: SeerViewerContext, diff --git a/src/sentry/seer/supergroups/endpoints/organization_supergroups.py b/src/sentry/seer/supergroups/endpoints/organization_supergroups.py deleted file mode 100644 index 61b6d0cf668ea0..00000000000000 --- a/src/sentry/seer/supergroups/endpoints/organization_supergroups.py +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import annotations - -import logging - -import orjson -from rest_framework.request import Request -from rest_framework.response import Response - -from sentry import features -from sentry.api.api_owners import ApiOwner -from sentry.api.api_publish_status import ApiPublishStatus -from sentry.api.base import cell_silo_endpoint -from sentry.api.bases.organization import OrganizationEndpoint, OrganizationPermission -from sentry.models.organization import Organization -from sentry.seer.signed_seer_api import SeerViewerContext, make_supergroups_list_request - -logger = logging.getLogger(__name__) - - -class OrganizationSupergroupsPermission(OrganizationPermission): - scope_map = { - "GET": ["org:read"], - } - - -@cell_silo_endpoint -class OrganizationSupergroupsEndpoint(OrganizationEndpoint): - publish_status = { - "GET": ApiPublishStatus.EXPERIMENTAL, - } - owner = ApiOwner.ISSUE_DETECTION_BACKEND - permission_classes = (OrganizationSupergroupsPermission,) - - def get(self, request: Request, organization: Organization) -> Response: - if not features.has("organizations:top-issues-ui", organization, actor=request.user): - return Response({"detail": "Feature not available"}, status=403) - - response = make_supergroups_list_request( - {"organization_id": organization.id}, - SeerViewerContext(organization_id=organization.id, user_id=request.user.id), - timeout=10, - ) - - if response.status >= 400: - return Response( - {"detail": "Failed to fetch supergroups"}, - status=response.status, - ) - - return Response(orjson.loads(response.data)) diff --git a/static/app/utils/api/knownSentryApiUrls.generated.ts b/static/app/utils/api/knownSentryApiUrls.generated.ts index 067d2cce96d1a6..5e8d1519374433 100644 --- a/static/app/utils/api/knownSentryApiUrls.generated.ts +++ b/static/app/utils/api/knownSentryApiUrls.generated.ts @@ -562,7 +562,6 @@ export type KnownSentryApiUrls = | '/organizations/$organizationIdOrSlug/seer/explorer-update/$runId/' | '/organizations/$organizationIdOrSlug/seer/onboarding-check/' | '/organizations/$organizationIdOrSlug/seer/setup-check/' - | '/organizations/$organizationIdOrSlug/seer/supergroups/' | '/organizations/$organizationIdOrSlug/seer/supergroups/$supergroupId/' | '/organizations/$organizationIdOrSlug/seer/supergroups/by-group/' | '/organizations/$organizationIdOrSlug/sent-first-event/'