Dirk Vogt | 7160b5e | 2016-10-12 17:04:40 +0200 | [diff] [blame] | 1 | from django.conf.urls import url |
Dirk Vogt | f2a3342 | 2016-10-11 17:17:26 +0200 | [diff] [blame] | 2 | from . import rest_api_devices |
| 3 | from . import rest_api_crashreports |
Dirk Vogt | c9e10ab | 2016-10-12 13:58:15 +0200 | [diff] [blame] | 4 | from . import rest_api_heartbeats |
Dirk Vogt | 7160b5e | 2016-10-12 17:04:40 +0200 | [diff] [blame] | 5 | from . import rest_api_logfiles |
| 6 | |
Dirk Vogt | f130c75 | 2016-08-23 14:45:01 +0200 | [diff] [blame] | 7 | |
| 8 | urlpatterns = [ |
Dirk Vogt | 3663569 | 2016-10-17 12:19:10 +0200 | [diff] [blame] | 9 | # crashreports |
Dirk Vogt | 7160b5e | 2016-10-12 17:04:40 +0200 | [diff] [blame] | 10 | url(r'^api/v1/crashreports/$', |
Dirk Vogt | e178488 | 2016-10-13 16:09:38 +0200 | [diff] [blame] | 11 | rest_api_crashreports.ListCreateView.as_view(), |
Dirk Vogt | 7160b5e | 2016-10-12 17:04:40 +0200 | [diff] [blame] | 12 | name='api_v1_crashreports'), |
Dirk Vogt | e178488 | 2016-10-13 16:09:38 +0200 | [diff] [blame] | 13 | url(r'^api/v1/devices/(?P<uuid>[a-f0-9-]+)/crashreports/$', |
| 14 | rest_api_crashreports.ListCreateView.as_view(), |
| 15 | name='api_v1_crashreports_by_uuid'), |
| 16 | url(r'^api/v1/crashreports/(?P<id>[0-9]+)/$', |
| 17 | rest_api_crashreports.RetrieveUpdateDestroyView.as_view(), |
| 18 | name='api_v1_crashreport'), |
Dirk Vogt | 0d9d5d2 | 2016-10-13 16:17:57 +0200 | [diff] [blame] | 19 | url(r'^api/v1/devices/(?P<device__uuid>[a-f0-9-]+)/crashreports/' + |
Dirk Vogt | e178488 | 2016-10-13 16:09:38 +0200 | [diff] [blame] | 20 | '(?P<device_local_id>[0-9]+)/$', |
| 21 | rest_api_crashreports.RetrieveUpdateDestroyView.as_view(), |
| 22 | name='api_v1_crashreports_by_uuid'), |
Dirk Vogt | c9e10ab | 2016-10-12 13:58:15 +0200 | [diff] [blame] | 23 | |
Dirk Vogt | 3663569 | 2016-10-17 12:19:10 +0200 | [diff] [blame] | 24 | # logfiles |
| 25 | |
| 26 | url(r'^api/v1/devices/(?P<uuid>[a-f0-9-]+)/crashreports/' + |
| 27 | '(?P<device_local_id>[0-9]+)/logfile_put/(?P<filename>[^/]+)/$', |
| 28 | rest_api_logfiles.logfile_put, |
| 29 | name='api_v1_putlogfile_for_device_id'), |
| 30 | |
Dirk Vogt | e178488 | 2016-10-13 16:09:38 +0200 | [diff] [blame] | 31 | # url(r'^api/v1/logfile_put$', |
| 32 | # rest_api_logfiles.logfile_put, |
| 33 | # name='api_v1_crashreports_put_logfile'), |
Dirk Vogt | 7160b5e | 2016-10-12 17:04:40 +0200 | [diff] [blame] | 34 | |
Dirk Vogt | 3663569 | 2016-10-17 12:19:10 +0200 | [diff] [blame] | 35 | # heartbeats |
Dirk Vogt | 7160b5e | 2016-10-12 17:04:40 +0200 | [diff] [blame] | 36 | url(r'^api/v1/heartbeats/$', |
Dirk Vogt | e178488 | 2016-10-13 16:09:38 +0200 | [diff] [blame] | 37 | rest_api_heartbeats.ListCreateView.as_view(), |
| 38 | name='api_v1_heartbeats'), |
| 39 | url(r'^api/v1/devices/(?P<uuid>[a-f0-9-]+)/heartbeats/$', |
| 40 | rest_api_heartbeats.ListCreateView.as_view(), |
| 41 | name='api_v1_heartbeats_by_uuid'), |
| 42 | url(r'^api/v1/heartbeats/(?P<id>[0-9]+)/$', |
| 43 | rest_api_heartbeats.RetrieveUpdateDestroyView.as_view(), |
| 44 | name='api_v1_heatbeat'), |
Dirk Vogt | 3663569 | 2016-10-17 12:19:10 +0200 | [diff] [blame] | 45 | url(r'^api/v1/devices/(?P<uuid>[a-f0-9-]+)/heartbeats/' + |
Dirk Vogt | e178488 | 2016-10-13 16:09:38 +0200 | [diff] [blame] | 46 | '(?P<device_local_id>[0-9]+)/$', |
| 47 | rest_api_heartbeats.RetrieveUpdateDestroyView.as_view(), |
| 48 | name='api_v1_heartbeat_by_uuid'), |
Dirk Vogt | f2a3342 | 2016-10-11 17:17:26 +0200 | [diff] [blame] | 49 | |
Dirk Vogt | 3663569 | 2016-10-17 12:19:10 +0200 | [diff] [blame] | 50 | # devices |
| 51 | |
Dirk Vogt | 7160b5e | 2016-10-12 17:04:40 +0200 | [diff] [blame] | 52 | url(r'^api/v1/devices/$', rest_api_devices.ListCreateDevices.as_view(), |
| 53 | name='api_v1_list_devices'), |
| 54 | url(r'^api/v1/devices/(?P<uuid>[a-f0-9-]+)/$', |
| 55 | rest_api_devices.RetrieveUpdateDestroyDevice.as_view(), |
| 56 | name='api_v1_retrieve_device'), |
| 57 | url(r'^api/v1/devices/register/$', rest_api_devices.register_device, |
| 58 | name='api_v1_register_device'), |
Dirk Vogt | d134521 | 2016-09-14 14:31:45 +0200 | [diff] [blame] | 59 | ] |