Replies: 6 comments 2 replies
-
I'm also interested in this; currently I pass string vars and turn them into objects once they are inside the script. |
Beta Was this translation helpful? Give feedback.
-
I'm also interested in this, have you been able to figure if this is possible? |
Beta Was this translation helpful? Give feedback.
-
At least you can call your script :) I alway get 404 as return, no matter how i call it. |
Beta Was this translation helpful? Give feedback.
-
I've mitigated the issue in the script like this:
So it works both ways via API and GUI :) |
Beta Was this translation helpful? Give feedback.
-
My take on this is that it's a bug, but one that not many people hit. I haven't had many occasions to run a custom script via an API hook. Now that I'm trying to do it, I'm hitting the same problem you guys are, only with MultiObjectVar rather than ObjectVar. I've added the same workaround to my script. If this isn't a bug, we need to get the documentation updated so this is easier to figure out. I spent the first 5 hours head scratching this thinking my script was just wrong and surely there was some behind-the-scenes way to format the data so that netbox would accept it. |
Beta Was this translation helpful? Give feedback.
-
It looks like this has been fixed with version 4.2.4 |
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.
-
I'm trying to run a custom script with ObjectVars. I pass the object ID numbers in the HTTP POST like this:
This doesn't work. It seems like the script interprets these variables as integers instead of their object. If I print the
data
variable to the log, it looks like this:On the other hand, if I run the script from the webpage, it looks like this:
Beta Was this translation helpful? Give feedback.
All reactions