from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.CircuitsRootView # Providers router.register('providers', views.ProviderViewSet) # Circuits router.register('circuit-types', views.CircuitTypeViewSet) router.register('circuits', views.CircuitViewSet) router.register('circuit-terminations', views.CircuitTerminationViewSet) app_name = 'circuits-api' urlpatterns = router.urls
from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.ExtrasRootView # Webhooks router.register('webhooks', views.WebhookViewSet) # Custom fields router.register('custom-fields', views.CustomFieldViewSet) # Custom links router.register('custom-links', views.CustomLinkViewSet) # Export templates router.register('export-templates', views.ExportTemplateViewSet) # Tags router.register('tags', views.TagViewSet) # Image attachments router.register('image-attachments', views.ImageAttachmentViewSet) # Journal entries router.register('journal-entries', views.JournalEntryViewSet) # Config contexts router.register('config-contexts', views.ConfigContextViewSet) # Reports
from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.VirtualizationRootView # Clusters router.register('cluster-types', views.ClusterTypeViewSet) router.register('cluster-groups', views.ClusterGroupViewSet) router.register('clusters', views.ClusterViewSet) # VirtualMachines router.register('virtual-machines', views.VirtualMachineViewSet) router.register('interfaces', views.VMInterfaceViewSet) app_name = 'virtualization-api' urlpatterns = router.urls
from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.UsersRootView # Users and groups router.register('users', views.UserViewSet) router.register('groups', views.GroupViewSet) # Permissions router.register('permissions', views.ObjectPermissionViewSet) # User preferences router.register('config', views.UserConfigViewSet, basename='userconfig') app_name = 'users-api' urlpatterns = router.urls
from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.WirelessRootView router.register('wireless-lan-groups', views.WirelessLANGroupViewSet) router.register('wireless-lans', views.WirelessLANViewSet) router.register('wireless-links', views.WirelessLinkViewSet) app_name = 'wireless-api' urlpatterns = router.urls
from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.DCIMRootView # Sites router.register('regions', views.RegionViewSet) router.register('site-groups', views.SiteGroupViewSet) router.register('sites', views.SiteViewSet) # Racks router.register('locations', views.LocationViewSet) router.register('rack-roles', views.RackRoleViewSet) router.register('racks', views.RackViewSet) router.register('rack-reservations', views.RackReservationViewSet) # Device types router.register('manufacturers', views.ManufacturerViewSet) router.register('device-types', views.DeviceTypeViewSet) # Device type components router.register('console-port-templates', views.ConsolePortTemplateViewSet) router.register('console-server-port-templates', views.ConsoleServerPortTemplateViewSet) router.register('power-port-templates', views.PowerPortTemplateViewSet) router.register('power-outlet-templates', views.PowerOutletTemplateViewSet) router.register('interface-templates', views.InterfaceTemplateViewSet) router.register('front-port-templates', views.FrontPortTemplateViewSet) router.register('rear-port-templates', views.RearPortTemplateViewSet) router.register('device-bay-templates', views.DeviceBayTemplateViewSet)
from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.SecretsRootView # Secrets router.register('secret-roles', views.SecretRoleViewSet) router.register('secrets', views.SecretViewSet) # Miscellaneous router.register('get-session-key', views.GetSessionKeyViewSet, basename='get-session-key') router.register('generate-rsa-key-pair', views.GenerateRSAKeyPairViewSet, basename='generate-rsa-key-pair') app_name = 'secrets-api' urlpatterns = router.urls
from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.IPAMRootView # VRFs router.register('vrfs', views.VRFViewSet) # Route targets router.register('route-targets', views.RouteTargetViewSet) # RIRs router.register('rirs', views.RIRViewSet) # Aggregates router.register('aggregates', views.AggregateViewSet) # Prefixes router.register('roles', views.RoleViewSet) router.register('prefixes', views.PrefixViewSet) # IP addresses router.register('ip-addresses', views.IPAddressViewSet) # VLANs router.register('vlan-groups', views.VLANGroupViewSet) router.register('vlans', views.VLANViewSet) # Services
from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.TenancyRootView # Tenants router.register('tenant-groups', views.TenantGroupViewSet) router.register('tenants', views.TenantViewSet) app_name = 'tenancy-api' urlpatterns = router.urls
from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.TenancyRootView # Tenants router.register('tenant-groups', views.TenantGroupViewSet) router.register('tenants', views.TenantViewSet) # Contacts router.register('contact-groups', views.ContactGroupViewSet) router.register('contact-roles', views.ContactRoleViewSet) router.register('contacts', views.ContactViewSet) router.register('contact-assignments', views.ContactAssignmentViewSet) app_name = 'tenancy-api' urlpatterns = router.urls
from netbox.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.TopologyViewsRootView router.register('preselectdeviceroles', views.PreSelectDeviceRolesViewSet) router.register('preselecttags', views.PreSelectTagsViewSet) router.register('search', views.SearchViewSet, basename='search') router.register('save-coords', views.SaveCoordsViewSet, basename='save_coords') urlpatterns = router.urls