OPTIONS request for a REST API list endpointNOTE: This release completely removes support for embedded graphs.
NOTE: The Django templating language (DTL) is no longer supported for export templates. Ensure that all export templates use Jinja2 before upgrading.
This release introduces support for modeling L3VPN route targets, which can be used to control the redistribution of advertised prefixes among VRFs. Each VRF may be assigned one or more route targets in the import and/or export direction. Like VRFs, route targets may be assigned to tenants and support tag assignment.
The REST API now supports the bulk deletion of objects of the same type in a single request. Send a DELETE HTTP request to the list to the model's list endpoint (e.g. /api/dcim/sites/) with a list of JSON objects specifying the numeric ID of each object to be deleted. For example, to delete sites with IDs 10, 11, and 12, issue the following request:
curl -s -X DELETE \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
http://netbox/api/dcim/sites/ \
--data '[{"id": 10}, {"id": 11}, {"id": 12}]'
Similar to bulk deletion, the REST API also now supports bulk updates. Send a PUT or PATCH HTTP request to the list to the model's list endpoint (e.g. /api/dcim/sites/) with a list of JSON objects specifying the numeric ID of each object and the attribute(s) to be updated. For example, to set a description for sites with IDs 10 and 11, issue the following request:
curl -s -X PATCH \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
http://netbox/api/dcim/sites/ \
--data '[{"id": 10, "description": "Foo"}, {"id": 11, "description": "Bar"}]'
NetBox v2.10 introduces a completely overhauled approach to custom fields. Whereas previous versions used CustomFieldValue instances to store values, custom field data is now stored directly on each model instance as JSON data and may be accessed using the cf property:
>>> site = Site.objects.first()
>>> site.cf
{'site_code': 'US-RAL01'}
>>> site.cf['foo'] = 'ABC'
>>> site.full_clean()
>>> site.save()
>>> site = Site.objects.first()
>>> site.cf
{'foo': 'ABC', 'site_code': 'US-RAL01'}
Additionally, custom selection field choices are now defined on the CustomField model within the admin UI, which greatly simplifies working with choice values.
All end-to-end cable paths are now cached using the new CablePath backend model. This allows NetBox to now immediately return the complete path originating from any endpoint directly from the database, rather than having to trace each cable recursively. It also resolves some systemic validation issues present in the original implementation.
Note: As part of this change, cable traces will no longer traverse circuits: A circuit termination will be considered the origin or destination of an end-to-end path.
<app>.<model> string/api/status/) which returns NetBox's current operational status/api/extras/content-types/)obj_type to content_typescommit argument is now required argument in a custom script's run() methodPUT, PATCH, and DELETE operations on list endpoints (bulk update and delete)/extras/content-types/ endpoint for Django ContentTypes/extras/custom-fields/ endpoint for custom fields/extras/_custom_field_choices/ endpoint (replaced by new custom fields endpoint)/status/ endpoint to convey NetBox's current status/trace/ endpointconnection_status with connected_endpoint_reachable (boolean)cable_peer and cable_peer_typeport_speed may now be nullcustom_fieldsconnection_status with connected_endpoint_reachable (boolean)cable_peer and cable_peer_typeconnection_status from nested serializerconnection_status with connected_endpoint_reachable (boolean)cable_peer and cable_peer_typeconnection_status from nested serializer/trace/ endpoint with /paths/, which returns a list of cable pathscable_peer and cable_peer_typeconnection_status with connected_endpoint_reachable (boolean)cable_peer and cable_peer_typeconnection_status from nested serializer_depth field has been added to reflect MPTT positioning/trace/ endpointconnected_endpoint, connected_endpoint_type, connected_endpoint_reachable, cable_peer, and cable_peer_typeconnection_status with connected_endpoint_reachable (boolean)cable_peer and cable_peer_typeconnection_status from nested serializercustom_fieldsconnection_status with connected_endpoint_reachable (boolean)cable_peer and cable_peer_typeconnection_status from nested serializercustom_fields/trace/ endpoint with /paths/, which returns a list of cable pathscable_peer and cable_peer_typecustom_fieldstemplate_language field has been removedcontent_type now takes a string in the form <app>.<model>changed_object_type now takes a string in the form <app>.<model>tenant fieldport to ports; now holds a list of one or more port numbersimport_targets and export_targets fieldsdevice field; replaced with assigned_object generic foreign key. This may represent either a device or a virtual machine. Assign an object by setting assigned_object_type and assigned_object_id.