2022-07-13 16:18:55 -04:00
|
|
|
from netbox.api.routers import NetBoxRouter
|
2017-01-26 17:58:36 -05:00
|
|
|
from . import views
|
2016-07-26 14:58:37 -04:00
|
|
|
|
|
|
|
|
2022-03-11 15:59:03 -05:00
|
|
|
router = NetBoxRouter()
|
2020-08-13 12:45:38 -04:00
|
|
|
router.APIRootView = views.TenancyRootView
|
2017-03-09 13:24:02 -05:00
|
|
|
|
|
|
|
# Tenants
|
2020-02-05 16:12:48 -05:00
|
|
|
router.register('tenant-groups', views.TenantGroupViewSet)
|
|
|
|
router.register('tenants', views.TenantViewSet)
|
2017-02-03 16:20:14 -05:00
|
|
|
|
2021-10-18 11:45:05 -04:00
|
|
|
# Contacts
|
|
|
|
router.register('contact-groups', views.ContactGroupViewSet)
|
|
|
|
router.register('contact-roles', views.ContactRoleViewSet)
|
|
|
|
router.register('contacts', views.ContactViewSet)
|
|
|
|
router.register('contact-assignments', views.ContactAssignmentViewSet)
|
|
|
|
|
2017-04-05 14:26:33 -04:00
|
|
|
app_name = 'tenancy-api'
|
2017-03-09 13:24:02 -05:00
|
|
|
urlpatterns = router.urls
|