Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(crons): Remove unused non-org endpoints #45183

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


@region_silo_endpoint
class MonitorCheckInAttachmentEndpoint(MonitorCheckInEndpoint):
class OrganizationMonitorCheckInAttachmentEndpoint(MonitorCheckInEndpoint):
# TODO(davidenwang): Add documentation after uploading feature is complete
private = True
authentication_classes = MonitorCheckInEndpoint.authentication_classes + (DSNAuthentication,)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

@region_silo_endpoint
@extend_schema(tags=["Crons"])
class MonitorDetailsEndpoint(MonitorEndpoint):
class OrganizationMonitorDetailsEndpoint(MonitorEndpoint):
public = {"GET", "PUT", "DELETE"}

@extend_schema(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


@region_silo_endpoint
class MonitorStatsEndpoint(MonitorEndpoint, StatsMixin):
class OrganizationMonitorStatsEndpoint(MonitorEndpoint, StatsMixin):
# TODO(dcramer): probably convert to tsdb
def get(
self, request: Request, project, monitor, organization_slug: str | None = None
Expand Down
48 changes: 20 additions & 28 deletions src/sentry/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,8 @@
InternalWarningsEndpoint,
)
from .endpoints.issue_occurrence import IssueOccurrenceEndpoint
from .endpoints.monitor_checkin_attachment import MonitorCheckInAttachmentEndpoint
from .endpoints.monitor_checkin_details import MonitorCheckInDetailsEndpoint
from .endpoints.monitor_checkins import MonitorCheckInsEndpoint
from .endpoints.monitor_details import MonitorDetailsEndpoint
from .endpoints.monitor_stats import MonitorStatsEndpoint
from .endpoints.organization_access_request_details import OrganizationAccessRequestDetailsEndpoint
from .endpoints.organization_activity import OrganizationActivityEndpoint
from .endpoints.organization_api_key_details import OrganizationApiKeyDetailsEndpoint
Expand Down Expand Up @@ -294,6 +291,11 @@
OrganizationMetricsCompatibility,
OrganizationMetricsCompatibilitySums,
)
from .endpoints.organization_monitor_checkin_attachment import (
OrganizationMonitorCheckInAttachmentEndpoint,
)
from .endpoints.organization_monitor_details import OrganizationMonitorDetailsEndpoint
from .endpoints.organization_monitor_stats import OrganizationMonitorStatsEndpoint
from .endpoints.organization_monitors import OrganizationMonitorsEndpoint
from .endpoints.organization_onboarding_continuation_email import (
OrganizationOnboardingContinuationEmail,
Expand Down Expand Up @@ -664,11 +666,6 @@
r"^monitors/",
include(
[
url(
r"^(?P<monitor_id>[^\/]+)/$",
MonitorDetailsEndpoint.as_view(),
name="sentry-api-0-monitor-details",
),
url(
r"^(?P<monitor_id>[^\/]+)/checkins/$",
MonitorCheckInsEndpoint.as_view(),
Expand All @@ -679,11 +676,6 @@
MonitorCheckInDetailsEndpoint.as_view(),
name="sentry-api-0-monitor-check-in-details",
),
url(
r"^(?P<monitor_id>[^\/]+)/stats/$",
MonitorStatsEndpoint.as_view(),
name="sentry-api-0-monitor-stats",
),
]
),
),
Expand All @@ -692,11 +684,6 @@
r"^organizations/(?P<organization_slug>[^\/]+)/monitors/",
include(
[
url(
r"^(?P<monitor_id>[^\/]+)/$",
MonitorDetailsEndpoint.as_view(),
name="sentry-api-0-organization-monitor-details",
),
url(
r"^(?P<monitor_id>[^\/]+)/checkins/$",
MonitorCheckInsEndpoint.as_view(),
Expand All @@ -707,16 +694,6 @@
MonitorCheckInDetailsEndpoint.as_view(),
name="sentry-api-0-organization-monitor-check-in-details",
),
url(
r"^(?P<monitor_id>[^\/]+)/checkins/(?P<checkin_id>[^\/]+)/attachment/$",
MonitorCheckInAttachmentEndpoint.as_view(),
name="sentry-api-0-organization-monitor-check-in-attachment",
),
url(
r"^(?P<monitor_id>[^\/]+)/stats/$",
MonitorStatsEndpoint.as_view(),
name="sentry-api-0-organization-monitor-stats",
),
]
),
),
Expand Down Expand Up @@ -1336,6 +1313,21 @@
OrganizationMonitorsEndpoint.as_view(),
name="sentry-api-0-organization-monitors",
),
url(
r"^(?P<organization_slug>[^\/]+)/monitors/(?P<monitor_id>[^\/]+)/$",
OrganizationMonitorDetailsEndpoint.as_view(),
name="sentry-api-0-organization-monitor-details",
),
url(
r"^(?P<organization_slug>[^\/]+)/monitors/(?P<monitor_id>[^\/]+)/stats/$",
OrganizationMonitorStatsEndpoint.as_view(),
name="sentry-api-0-organization-monitor-stats",
),
url(
r"^(?P<organization_slug>[^\/]+)/monitors/(?P<monitor_id>[^\/]+)/checkins/(?P<checkin_id>[^\/]+)/attachment/$",
OrganizationMonitorCheckInAttachmentEndpoint.as_view(),
name="sentry-api-0-organization-monitor-check-in-attachment",
),
url(
r"^(?P<organization_slug>[^\/]+)/pinned-searches/$",
OrganizationPinnedSearchEndpoint.as_view(),
Expand Down
4 changes: 2 additions & 2 deletions src/sentry/apidocs/public_exclusion_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
InternalStatsEndpoint,
InternalWarningsEndpoint,
)
from sentry.api.endpoints.monitor_stats import MonitorStatsEndpoint
from sentry.api.endpoints.organization_access_request_details import (
OrganizationAccessRequestDetailsEndpoint,
)
Expand Down Expand Up @@ -231,6 +230,7 @@
OrganizationMetricsTagDetailsEndpoint,
OrganizationMetricsTagsEndpoint,
)
from sentry.api.endpoints.organization_monitor_stats import OrganizationMonitorStatsEndpoint
from sentry.api.endpoints.organization_monitors import OrganizationMonitorsEndpoint
from sentry.api.endpoints.organization_onboarding_tasks import OrganizationOnboardingTaskEndpoint
from sentry.api.endpoints.organization_pinned_searches import OrganizationPinnedSearchEndpoint
Expand Down Expand Up @@ -617,7 +617,7 @@
BroadcastDetailsEndpoint,
AcceptProjectTransferEndpoint,
AcceptOrganizationInvite,
MonitorStatsEndpoint,
OrganizationMonitorStatsEndpoint,
UserIndexEndpoint,
UserDetailsEndpoint,
UserAvatarEndpoint,
Expand Down
Loading