Closed kryptonit1 closed 1 year ago
Thanks for the feedback! I like this idea and agree that it would be useful - I'll wrap up the v3.0.2 release first (hopefully quickly) and tentatively plan to add this in for v3.0.3. I think it will be a pretty light lift to add in, and we can also include an option to use a custom key name with returning the script output if needed.
Thanks for the feedback! I like this idea and agree that it would be useful - I'll wrap up the v3.0.2 release first (hopefully quickly) and tentatively plan to add this in for v3.0.3. I think it will be a pretty light lift to add in, and we can also include an option to use a custom key name with returning the script output if needed.
Thanks a lot! Sounds good! đź‘Ť
added in #37
I've got a non-Jamf Pro system on which I've created a webhook in. When that webhook is triggered I want it to send a POST request to JAWA, which will run a script that collects information from Jamf Pro.
So I've created a custom webhook in JAWA and the non-Jamf Pro system is able to send a POST request to JAWA which JAWA receives. So far so good. The problem now is that I want to send a custom JSON response to that POST request based on the output of the script being executed by JAWA. But it seems that JAWA is only returning the original JSON string that was sent with the POST request from the non-Jamf Pro system when it responds with HTTP 200 OK on a successful POST request.
Would it be possible to change so that the response is the output of the script that is being executed for the custom webhook in JAWA? Or at least make it optional to return the script output as response?
My Python scripting skills are not very good, but I've looked at jawa_receiver.py and it could look something like this (not tested):
There's probably a much more efficient way to return the output of the script than to run the script one more time via the run_script function though.
This would be really helpfully! I really appreciate that JAWA exists! :)