Hi,
I want to set a schedule downtime for a hostgroup over the api.
With curl -k -s -u xxxxxxxxx:xxxxxxxxx ‘https://localhost:5665/v1/objects/hosts’
I become an output.
When I run the command :
curl -k -s -u xxxxxxx:xxxxxxxx -H ‘Accept: application/json’
-X POST ‘https://localhost:5665/v1/actions/schedule-downtime’
-d “$(jo -p pretty=true type=Host filter=“match(“update”, hosts.group)” all_services=true author=icingaadmin comment=“stepnova release” fixed=true start_time=$(date +%s -d “+0 hour”) end_time=$(date +%s -d “+1 hour”))”
I get
“error”: 404.0,
“status”: “No objects found.”
permissions are [*]
I must say that we use for the configuration the icinga director.
Thanks for help.
Matthias