Can we use JSON with new REST API?
Posted: Tue Jul 19, 2016 8:59 am
Now that we have fixed the REST API with our 5.2.8 setup, I am wondering if we can pass JSON using POST for the object API?
We already have code that does this, but simple tests make it seem like it's not happy with this:
Using a post to:
https://nagiosxi-pgh02.eagleaccess.com/ ... y=lmcc2lbq
With a body like this:
Is this possible or does it need to be refactored into:
Thanks.
-D
We already have code that does this, but simple tests make it seem like it's not happy with this:
Using a post to:
https://nagiosxi-pgh02.eagleaccess.com/ ... y=lmcc2lbq
With a body like this:
Code: Select all
{"host_name": "pghorchest04.eagleinvsys.com", "hostgroups": ["PGH_Infrastructure","linux_server"], "max_check_attempts": "3", "check_period": "24x7","notification_interval": "60", "notification_period": "24x7","contacts": ["EagleCSI"], "address": "10.70.7.74"}Code: Select all
host_name=pghorchest04.eagleinvsys.com&hostgroups=linux_server&max_check_attempts=3&check_period&24x7¬ification_interval=60¬ification_period=24x7&contacts=EagleCSI&address=10.70.7.74
-D