netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.76k stars 2.54k forks source link

Extend the default object representation to include the "full" representation of related objects in webhook body #16549

Open FloMeyer opened 3 months ago

FloMeyer commented 3 months ago

NetBox version

v4.0.5

Feature type

Data model extension

Proposed functionality

As discussed but may be forgotten in https://github.com/netbox-community/netbox/issues/9594 I would like ask you to implement a full representation of related objects in the webhook body or at least device_role.

Use case

If you update an interface i would like to fire a webhook. But only if the interface belongs to a device with a specific device_role - this should be filtered via webhook condition.

Database changes

No response

External dependencies

No response

crytectobi commented 1 month ago

Hi,

I have the very same use case. I'm from the network department and try to automate interface configuration of network devices. I would like to check the device role to trigger only for network devices (e.g. device role network-access-switch, router, etc.). But Netbox is used by all IT departments, and my automation would trigger from all devices. Only solutions would be to tag every single interface, but that is more a workaround and makes zero sense outside of this trigger condition. So this feature would be very much appreciated for automation. :)