REST API: Create comment should return comment ID after successful creation

4 votes

When using the Checkmk REST API to create a comment for a host or service via:

- POST /cmk/check_mk/api/1.0/domain-types/comment/collections/host
- POST /cmk/check_mk/api/1.0/domain-types/comment/collections/service

the API responds with HTTP 204 No Content, returning no data about the created comment.

Problem
While the comment is successfully created, the lack of a response makes it difficult to interact with the comment afterward. There's no way to get the id or other metadata without a separate query, which adds complexity and fragility to automated workflows.

Proposal
Return the full comment object upon creation, matching the existing comment structure.

Under consideration RestAPI Suggested by: Tom Upvoted: 24 Sep, '25 Comments: 0

Comments: 0