We have been trying to extract comments/Acks via the APi from check_mk enterprise 2.1.
The official API document does not show a means to do so - only create an ACK /domain-types/acknowledge/collections/host and service.
The only hint I found (while researching another portion of the API for a different use-case) was using the endpoint:
/api/1.0/domain-types/service/collections/all?columns=comments_with_extra_info&query={"op":"and","expr":[{"op":">","left":"acknowledgement_type","right":"0"}]}
The issue is that the result returns info of comments_with_extra_info but does not provide end times for an ACK - just a list with: comment-id, user, comment, type-id, start time
So how can we extract this via the Rest API?
I understand that ACKs with end times are only supported in Enterprise versions, so this omission may be due to that…
Ideally the endpoints:
- /domain-types/acknowledge/collections/host
- /domain-types/acknowledge/collections/services
would allow listing acknowledgements (Comments) as well (analogous to /api/v0/domain-types/downtime/collections/all
) and also provide all the necessary info including end time.