jumpserver/apps/applications/urls/api_urls.py

22 lines
566 B
Python
Raw Normal View History

2016-11-16 10:12:14 +00:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
2016-12-25 09:44:39 +00:00
from django.conf.urls import url
2016-11-16 10:12:14 +00:00
from rest_framework import routers
from .. import api
app_name = 'applications'
2016-11-16 10:12:14 +00:00
router = routers.DefaultRouter()
router.register(r'v1/terminal/heatbeat', api.TerminalHeatbeatViewSet, 'terminal-heatbeat')
2016-12-27 16:28:52 +00:00
router.register(r'v1/terminal', api.TerminalViewSet, 'terminal')
2016-11-16 10:12:14 +00:00
2016-12-25 09:44:39 +00:00
urlpatterns = [
2016-12-27 16:28:52 +00:00
url(r'^v1/terminal/register/$', api.TerminalRegisterView.as_view(), name='terminal-register'),
# url(r'^v1/terminal/heatbeat/$', api.TestHeatbeat.as_view())
2016-12-25 09:44:39 +00:00
]
2016-11-16 10:12:14 +00:00
2016-12-30 14:21:50 +00:00
urlpatterns += router.urls