added api/pk/satellite, authorisation endpointsm, pagination
This commit is contained in:
parent
cc5187c3a1
commit
8225b18a2a
16 changed files with 284 additions and 26 deletions
26
api/urls.py
26
api/urls.py
|
|
@ -1,16 +1,26 @@
|
|||
from django.urls import path
|
||||
from .views import (PredictionCreateView, PredictionListView, PredictionDeleteView,
|
||||
from .views import (PredictionCreateView, PredictionListView,
|
||||
PredictionHistoryListView,
|
||||
PredictionHistoryDetailView,
|
||||
PredictionHistoryDeleteView,)
|
||||
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', PredictionListView.as_view(), name='get_predictions'),
|
||||
path('predictions/<uuid:pk>', PredictionDeleteView.as_view(), name='delete_prediction'),
|
||||
path('token/', obtain_auth_token),
|
||||
path("history/", PredictionHistoryListView.as_view()),
|
||||
path("history/<uuid:pk>/", PredictionHistoryDetailView.as_view()),
|
||||
path("history/<uuid:pk>/delete/", PredictionHistoryDeleteView.as_view()),
|
||||
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
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue