Adding Comments with curl wont work anymore

After switching to IcingaDB, I can no longer add comments via curl using the WebUI.
Before the switch, I was able to add a comment using this command:
/usr/bin/curl -s -X "POST" -H 'Accept: application/json' -H 'Content-Type: application/json' -u 'icinga:icinga' 'https://my-icinga.tld/icingaweb2/monitoring/host/add-comment?host=server01' -d '{ "author": "Sascha", "comment": "TicketID 123456", "pretty": true }'

Under IcingaDB, not much has changed from the URL… At least I recognized only little:
/usr/bin/curl -s -X "POST" -H 'Accept: application/json' -H 'Content-Type: application/json' -u 'icinga:icinga' 'https://my-icinga.tld/icingaweb2/icingadb/host/add-comment?name=server01' -d '{ "author": "Sascha", "comment": "TicketID 123456", "pretty": true }'

With this command I get only in HTML the page for the comment.
What am I doing wrong?

  • Icinga DB Web version (System - About): 1.0.2
  • Icinga Web 2 version (System - About):2.11.4
  • Web browser: Chrome 110.0.5481.100
  • Icinga 2 version (icinga2 --version): r2.13.7-1
  • Icinga DB version (icingadb --version): v1.1.0
  • PHP version used (php --version): 7.4
  • Server operating system and version: Debian 10

Regards
Sascha

I don’t think that this has to be module specific.

From the documentation: ‘https://localhost:5665/v1/actions/add-comment’ at Icinga2 Api - Icinga 2 .

You could also try to use the browser developer tools to figure out, how the icingadb-web module does it.

Thanks… I’d coded my script to the Icinga API.