Webhooks Always Firing #1909

Closed
opened 2025-12-29 17:20:17 +01:00 by adam · 0 comments
Owner

Originally created by @WilliamMarti on GitHub (Aug 7, 2018).

Environment

Python version: Python v3.5.2
NetBox version: v2.4.1

Steps to Reproduce

Create Webhook with only Type create selected. Take action to trigger the Webhook, in my case edit or delete an IP address.

capture

Expected Behavior

I have a Flask middleware app running that should be accepting the POST once the Webhook is triggered. I am expecting to only receive a post when my IP address is created.

Observed Behavior

I am receiving POSTs for all actions, Create, Delete, and Updates. Some information has been changed, but the meat is the event tag.

{'model': 'ipaddress', 'event': 'updated', 'data': {'family': 4, 'vrf': None, 'created': '2018-08-07', 'address': '1.1.1.1/28', 'status': {'label': 'Active', 'value': 1}, 'nat_inside': None, 'description': 'test', 'interface': None, 'tags': [], 'role': None, 'nat_outside': None, 'tenant': None, 'custom_fields': {'ipam_PatchPanel': None, 'ipam_Location': 'test', 'ipam_Switch': None, 'ipam_SwitchPort': None, 'ipam_infoblox': True, 'ipam_iptype': None, 'ipam_OtherInfo': None, 'ipam_DNSZone': {'label': 'test.com', 'value': 20}}, 'id': 357776, 'last_updated': '2018-08-07T14:06:51.639353-05:00'}, 'timestamp': '2018-08-07 14:06:51.741406'}

I can work around this by having my middleware verify the event type before taking action, but this looks to be a bug.

Originally created by @WilliamMarti on GitHub (Aug 7, 2018). ### Environment Python version: Python v3.5.2 NetBox version: v2.4.1 ### Steps to Reproduce Create Webhook with _only_ `Type create` selected. Take action to trigger the Webhook, in my case edit or delete an IP address. ![capture](https://user-images.githubusercontent.com/4473602/43797257-cd4c38d4-9a54-11e8-9333-8f34e59ef304.PNG) ### Expected Behavior I have a Flask middleware app running that should be accepting the POST once the Webhook is triggered. I am expecting to _only_ receive a post when my IP address is created. ### Observed Behavior I am receiving POSTs for all actions, Create, Delete, and Updates. Some information has been changed, but the meat is the `event` tag. ``` {'model': 'ipaddress', 'event': 'updated', 'data': {'family': 4, 'vrf': None, 'created': '2018-08-07', 'address': '1.1.1.1/28', 'status': {'label': 'Active', 'value': 1}, 'nat_inside': None, 'description': 'test', 'interface': None, 'tags': [], 'role': None, 'nat_outside': None, 'tenant': None, 'custom_fields': {'ipam_PatchPanel': None, 'ipam_Location': 'test', 'ipam_Switch': None, 'ipam_SwitchPort': None, 'ipam_infoblox': True, 'ipam_iptype': None, 'ipam_OtherInfo': None, 'ipam_DNSZone': {'label': 'test.com', 'value': 20}}, 'id': 357776, 'last_updated': '2018-08-07T14:06:51.639353-05:00'}, 'timestamp': '2018-08-07 14:06:51.741406'} ``` I can work around this by having my middleware verify the `event` type before taking action, but this looks to be a bug.
adam added the type: bugstatus: accepted labels 2025-12-29 17:20:17 +01:00
adam closed this issue 2025-12-29 17:20:18 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1909