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(), |
Franz-Xaver Geiger | 67504d0 | 2018-03-19 15:04:48 +0100 | [diff] [blame^] | 22 | name='api_v1_crashreport_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 |
Dirk Vogt | 3663569 | 2016-10-17 12:19:10 +0200 | [diff] [blame] | 25 | url(r'^api/v1/devices/(?P<uuid>[a-f0-9-]+)/crashreports/' + |
| 26 | '(?P<device_local_id>[0-9]+)/logfile_put/(?P<filename>[^/]+)/$', |
| 27 | rest_api_logfiles.logfile_put, |
| 28 | name='api_v1_putlogfile_for_device_id'), |
| 29 | |
Dirk Vogt | 83107df | 2017-05-02 12:04:19 +0200 | [diff] [blame] | 30 | url(r'^api/v1/logfiles/$', |
| 31 | rest_api_logfiles.ListCreateView.as_view(), |
| 32 | name='api_v1_logfiles'), |
| 33 | url(r'^api/v1/logfiles/(?P<pk>[0-9]+)/$', |
| 34 | rest_api_logfiles.RetrieveUpdateDestroyView.as_view(), |
| 35 | name='api_v1_logfiles_by_id'), |
Dirk Vogt | 7160b5e | 2016-10-12 17:04:40 +0200 | [diff] [blame] | 36 | |
Dirk Vogt | 3663569 | 2016-10-17 12:19:10 +0200 | [diff] [blame] | 37 | # heartbeats |
Dirk Vogt | 7160b5e | 2016-10-12 17:04:40 +0200 | [diff] [blame] | 38 | url(r'^api/v1/heartbeats/$', |
Dirk Vogt | e178488 | 2016-10-13 16:09:38 +0200 | [diff] [blame] | 39 | rest_api_heartbeats.ListCreateView.as_view(), |
| 40 | name='api_v1_heartbeats'), |
| 41 | url(r'^api/v1/devices/(?P<uuid>[a-f0-9-]+)/heartbeats/$', |
| 42 | rest_api_heartbeats.ListCreateView.as_view(), |
| 43 | name='api_v1_heartbeats_by_uuid'), |
| 44 | url(r'^api/v1/heartbeats/(?P<id>[0-9]+)/$', |
| 45 | rest_api_heartbeats.RetrieveUpdateDestroyView.as_view(), |
Franz-Xaver Geiger | 67504d0 | 2018-03-19 15:04:48 +0100 | [diff] [blame^] | 46 | name='api_v1_heartbeat'), |
Dirk Vogt | 3663569 | 2016-10-17 12:19:10 +0200 | [diff] [blame] | 47 | url(r'^api/v1/devices/(?P<uuid>[a-f0-9-]+)/heartbeats/' + |
Dirk Vogt | e178488 | 2016-10-13 16:09:38 +0200 | [diff] [blame] | 48 | '(?P<device_local_id>[0-9]+)/$', |
| 49 | rest_api_heartbeats.RetrieveUpdateDestroyView.as_view(), |
| 50 | name='api_v1_heartbeat_by_uuid'), |
Dirk Vogt | f2a3342 | 2016-10-11 17:17:26 +0200 | [diff] [blame] | 51 | |
Dirk Vogt | 3663569 | 2016-10-17 12:19:10 +0200 | [diff] [blame] | 52 | # devices |
Dirk Vogt | 7160b5e | 2016-10-12 17:04:40 +0200 | [diff] [blame] | 53 | url(r'^api/v1/devices/$', rest_api_devices.ListCreateDevices.as_view(), |
| 54 | name='api_v1_list_devices'), |
| 55 | url(r'^api/v1/devices/(?P<uuid>[a-f0-9-]+)/$', |
| 56 | rest_api_devices.RetrieveUpdateDestroyDevice.as_view(), |
| 57 | name='api_v1_retrieve_device'), |
| 58 | url(r'^api/v1/devices/register/$', rest_api_devices.register_device, |
| 59 | name='api_v1_register_device'), |
Dirk Vogt | d134521 | 2016-09-14 14:31:45 +0200 | [diff] [blame] | 60 | ] |