26 lines
1.3 KiB
Python
26 lines
1.3 KiB
Python
from django.urls import path
|
|
from .views import (PredictionCreateView, PredictionListView,
|
|
PredictionHistoryListView,
|
|
PredictionHistoryDetailView,
|
|
PredictionHistoryDeleteView,
|
|
SessionView,
|
|
WhoAmIView,
|
|
get_csrf,
|
|
login_view,
|
|
logout_view)
|
|
from rest_framework.authtoken.views import obtain_auth_token
|
|
from .views import TelemetryListCreateView
|
|
urlpatterns = [
|
|
path('predictions', PredictionCreateView.as_view(), name='create_prediction'),
|
|
path('predictions/list/', PredictionListView.as_view(), name='get_predictions'),
|
|
path('token', obtain_auth_token, name = 'get_token'),
|
|
path("history", PredictionHistoryListView.as_view(), name='view_history_list'),
|
|
path("history/<uuid:pk>/", PredictionHistoryDetailView.as_view(), name='view_history_detail'),
|
|
path("history/<uuid:pk>/delete/", PredictionHistoryDeleteView.as_view(), name='delete_history'),
|
|
path("<uuid:pk>/telemetry/", TelemetryListCreateView.as_view(), name="create_telemetry"),
|
|
path('csrf/', get_csrf, name='api-csrf'),
|
|
path('login/', login_view, name='api-login'),
|
|
path('logout/', logout_view, name='api-logout'),
|
|
path('session/', SessionView.as_view(), name='api-session'), # new
|
|
path('whoami/', WhoAmIView.as_view(), name='api-whoami'), # new
|
|
]
|