You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using netbox webhooks to send data to ansible awx.
I want to create two seperate webhooks to match these conditions below. This is for DCIM > Interface API and I want to determine if the dictionary data[lag] is empty or not.
If I view the code with the API Browser, it is displayed as the following: { "lag": { "id": 48, "url": "http://192.168.0.10/api/dcim/interfaces/48/", "display": "port-channel50", "device": { "id": 1, "url": "http://192.168.0.10/api/dcim/devices/1/", "display": "n9k-spine1", "name": "n9k-spine1" }, "name": "port-channel50", "cable": null, "_occupied": false },
or
{ "lag": null}
Can anyone provide advice on how to match this in a webhook conditional? I am unable to specify the value null without quotation marks, it comes back with the error
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Using netbox webhooks to send data to ansible awx.
I want to create two seperate webhooks to match these conditions below. This is for DCIM > Interface API and I want to determine if the dictionary data[lag] is empty or not.
data.lag == null
{ "and": [{ "op": "eq", "attr": "data.lag", "value": "" }] }
data.lag != null
{ "and": [{ "op": "eq", "attr": "data.lag", "negate": true, "value": "" }] }
If I view the code with the API Browser, it is displayed as the following:
{ "lag": { "id": 48, "url": "http://192.168.0.10/api/dcim/interfaces/48/", "display": "port-channel50", "device": { "id": 1, "url": "http://192.168.0.10/api/dcim/devices/1/", "display": "n9k-spine1", "name": "n9k-spine1" }, "name": "port-channel50", "cable": null, "_occupied": false },
or
{ "lag": null}
Can anyone provide advice on how to match this in a webhook conditional? I am unable to specify the value null without quotation marks, it comes back with the error
Beta Was this translation helpful? Give feedback.
All reactions