oncall-engine/engine/apps/grafana_plugin/urls.py
Matias Bordese 35f23cdcc6
Rework organization sync and grafana plugin engine backend (#4756)
Related to
https://github.com/grafana/oncall-private/issues/2806#issuecomment-2246286918.

Prepare engine for the backend plugin enablement/migration:

 - Refactor sync code
- Improve plugin user authentication to set up user on-the-fly (when
missing)
- Implement v2 endpoints for install, sync and status (to be used via
the backend plugin)

(most of the changes come from
https://github.com/grafana/oncall/pull/4657; backport all engine changes
that keep backwards compatibility)
2024-07-31 16:12:56 +00:00

25 lines
903 B
Python

from django.urls import re_path
from apps.grafana_plugin.views import (
InstallV2View,
InstallView,
RecaptchaView,
SelfHostedInstallView,
StatusV2View,
StatusView,
SyncOrganizationView,
SyncV2View,
)
app_name = "grafana-plugin"
urlpatterns = [
re_path(r"v2/sync/?", SyncV2View().as_view(), name="sync-v2"),
re_path(r"v2/status/?", StatusV2View().as_view(), name="status-v2"),
re_path(r"v2/install/?", InstallV2View().as_view(), name="install-v2"),
re_path(r"self-hosted/install/?", SelfHostedInstallView().as_view(), name="self-hosted-install"),
re_path(r"status/?", StatusView().as_view(), name="status"),
re_path(r"install/?", InstallView().as_view(), name="install"),
re_path(r"sync_organization/?", SyncOrganizationView().as_view(), name="sync-organization"),
re_path(r"recaptcha/?", RecaptchaView().as_view(), name="recaptcha"),
]