Refactor NetBoxModelViewSet to allow the creation of read-only API endpoints #11611
Labels
status: accepted
This issue has been accepted for implementation
type: housekeeping
Changes to the application which do not directly impact the end user
Milestone
Proposed Changes
Break out the methods of
NetBoxModelViewSet
which are not specific to write requests into a separate mixin or set of mixins. This should be done in a manner that backward compatibility for existing plugins is fully retained.Justification
The
NetBoxModelViewSet
class is currently written with the assumption that all REST API endpoints will support the full suite of CRUDL functionality. However, in some cases it may be desirable to employ read-only endpoints which still leverage custom NetBox functionality, such as export template support. A recent example of this is FR #11558, which introduces aDataFile
model that should not be mutable via the REST API, however it's likely we'll encounter similar requirements in the future.The text was updated successfully, but these errors were encountered: