diff --git a/src/sentry/api/urls.py b/src/sentry/api/urls.py index f25e1b58d741..3a2f581a9ac4 100644 --- a/src/sentry/api/urls.py +++ b/src/sentry/api/urls.py @@ -489,7 +489,6 @@ from sentry.relocation.api.endpoints.recover import RelocationRecoverEndpoint from sentry.relocation.api.endpoints.retry import RelocationRetryEndpoint from sentry.relocation.api.endpoints.unpause import RelocationUnpauseEndpoint -from sentry.replays.endpoints.data_export_notifications import DataExportNotificationsEndpoint from sentry.replays.endpoints.organization_replay_count import OrganizationReplayCountEndpoint from sentry.replays.endpoints.organization_replay_details import OrganizationReplayDetailsEndpoint from sentry.replays.endpoints.organization_replay_events_meta import ( @@ -3795,11 +3794,6 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: AcceptOrganizationInvite.as_view(), name="sentry-api-0-organization-accept-organization-invite", ), - re_path( - r"^data-export/notifications/google-cloud/$", - DataExportNotificationsEndpoint.as_view(), - name="sentry-api-0-data-export-notifications", - ), re_path( r"^notification-defaults/$", NotificationDefaultsEndpoints.as_view(), diff --git a/src/sentry/replays/endpoints/data_export_notifications.py b/src/sentry/replays/endpoints/data_export_notifications.py deleted file mode 100644 index 89d1bb36402a..000000000000 --- a/src/sentry/replays/endpoints/data_export_notifications.py +++ /dev/null @@ -1,25 +0,0 @@ -import logging - -from rest_framework.request import Request -from rest_framework.response import Response - -from sentry.api.api_owners import ApiOwner -from sentry.api.api_publish_status import ApiPublishStatus -from sentry.api.base import Endpoint, control_silo_endpoint -from sentry.api.permissions import SentryIsAuthenticated -from sentry.replays.data_export import request_run_transfer_job, retry_transfer_job_run - -logger = logging.getLogger() - - -@control_silo_endpoint -class DataExportNotificationsEndpoint(Endpoint): - """PubSub notifications endpoint.""" - - owner = ApiOwner.DATA_BROWSING - publish_status = {"POST": ApiPublishStatus.PRIVATE} - permission_classes = (SentryIsAuthenticated,) - - def post(self, request: Request) -> Response: - retry_transfer_job_run(request.data, request_run_transfer_job) - return Response("", status=200) diff --git a/static/app/utils/api/knownSentryApiUrls.generated.ts b/static/app/utils/api/knownSentryApiUrls.generated.ts index df57f5786763..f80f30e39d2d 100644 --- a/static/app/utils/api/knownSentryApiUrls.generated.ts +++ b/static/app/utils/api/knownSentryApiUrls.generated.ts @@ -30,7 +30,6 @@ export type KnownSentryApiUrls = | '/authenticators/' | '/broadcasts/' | '/broadcasts/$broadcastId/' - | '/data-export/notifications/google-cloud/' | '/doc-integrations/' | '/doc-integrations/$docIntegrationIdOrSlug/' | '/doc-integrations/$docIntegrationIdOrSlug/avatar/' diff --git a/tests/sentry/replays/endpoints/test_data_export_notifications.py b/tests/sentry/replays/endpoints/test_data_export_notifications.py deleted file mode 100644 index d7b304855894..000000000000 --- a/tests/sentry/replays/endpoints/test_data_export_notifications.py +++ /dev/null @@ -1,35 +0,0 @@ -import base64 -from unittest.mock import patch - -from sentry.testutils.cases import APITestCase -from sentry.testutils.silo import control_silo_test -from sentry.utils import json - - -@control_silo_test -class DataExportNotificationsTestCase(APITestCase): - endpoint = "sentry-api-0-data-export-notifications" - - def setUp(self) -> None: - super().setUp() - self.login_as(user=self.user) - - @patch("sentry.replays.endpoints.data_export_notifications.retry_transfer_job_run") - def test_simple(self, retry_transfer_job_run) -> None: # type: ignore[no-untyped-def] - retry_transfer_job_run.return_value = None - - data = { - "data": base64.b64encode( - json.dumps( - { - "transferOperation": { - "status": "FAILED", - "transferJobName": "test", - "projectId": "test-project", - } - } - ).encode() - ).decode("utf-8") - } - self.get_success_response(method="post", **data, status_code=200) - assert retry_transfer_job_run.called