Replies: 1 comment
-
Sorry, I think we're missing some essential context for what you're trying to do.
Webhook receivers are standalone applications entirely external to Netbox. Therefore, what application are we talking about? Is this some code you have written yourself, or is it some existing third-party application which has a config file?
That to me looks like something generated by the Go programming language. (Aside: Netbox itself is written in Python, although you can write webhooks in whatever language you like) Therefore, without any further information, I'm guessing you're asking a question about how to decode JSON in a Go program. If so, that is probably best asked on a Go discussion group (e.g. golang-nuts on Google). But maybe I misunderstand you. If the problem is understanding the format of the JSON payload to a webhook when it has custom fields, then you could try receiving the whole message as a plain string and printing it. Or at worst, you could use tcpdump to show the raw payload (if you're using HTTP and not HTTPS) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Is there a way to easily convert the received custom_fields from webhook to a dictionary?
Webhook receiver config:
I receive it as string: i.e. "map[AS_Number: Application_Software: BGP_ASBR: BGP_RR:..........
Otherwise I have to retrieve all needed custom_fields one by one:
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions