-
I currently use netboxs webhooks to automatically upload all changed data in netbox to our Git. The goal is to have a clean auto-updating overview of all servers and their status (interfaces,name,dns etc) in GitLab. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Can you give an example of what you're seeing, i.e. some JSON samples, and what you want to do with them? It's pretty clear that whether you change a Device, an Interface, or an IP Address, you'll get different JSON, because those are different types of object. What's the problem? Are you trying to associate those back to a Device? Your webhook can make calls back to the Netbox API if required. For example, given an IP address with an assigned interface_id, you can lookup that interface to map it to a device. At the most basic level, you can just use the webhook as a trigger, and make API calls to fetch all the other information of interest (e.g. refetch the given device, all its interfaces, and all its IPs) |
Beta Was this translation helpful? Give feedback.
Can you give an example of what you're seeing, i.e. some JSON samples, and what you want to do with them?
It's pretty clear that whether you change a Device, an Interface, or an IP Address, you'll get different JSON, because those are different types of object. What's the problem? Are you trying to associate those back to a Device?
Your webhook can make calls back to the Netbox API if required. For example, given an IP address with an assigned interface_id, you can lookup that interface to map it to a device. At the most basic level, you can just use the webhook as a trigger, and make API calls to fetch all …