Skip to content

Data Backends

Data sources can be defined to reference data which exists on systems of record outside NetBox, such as a git repository or Amazon S3 bucket. Plugins can register their own backend classes to introduce support for additional resource types. This is done by subclassing NetBox's DataBackend class.
from netbox.data_backends import DataBackend

class MyDataBackend(DataBackend):
    name = 'mybackend'
    label = 'My Backend'

To register one or more data backends with NetBox, define a list named backends at the end of this file:
backends = [MyDataBackend]


The path to the list of search indexes can be modified by setting data_backends in the PluginConfig instance.


A data backend represents a specific system of record for data, such as a git repository or Amazon S3 bucket.


Name Type Description

The identifier under which this backend will be registered in NetBox


The human-friendly name for this backend


A boolean indicating whether this backend accesses local data


A dictionary mapping configuration form field names to their classes


An iterable of field names for which the values should not be displayed to the user


A hook to initialize the instance's configuration. The data returned by this method is assigned to the instance's config attribute upon initialization, which can be referenced by the fetch() method.


A context manager which performs the following:

  1. Handles all setup and synchronization
  2. Yields the local path at which data has been replicated
  3. Performs any necessary cleanup