Werk #16051: comments: add site property to the comments endpoints
Komponente | REST API | ||||
Titel | comments: add site property to the comments endpoints | ||||
Datum | 10.08.2023 | ||||
Level | Kleine Änderung | ||||
Klasse | Bugfix | ||||
Kompatibilität | Inkompatibel - Manuelle Interaktion könnte erforderlich sein | ||||
Checkmk versions & editions |
|
This werk introduces several changes to the comments endpoints.
-
Comment IDs are integers beginning from 1, both for the main site & for remote sites. This means that the same comment ID can exist on more than one site at the same time. This caused problems when calling the DELETE endpoint as we weren't sure which ID the client wanted to delete. To get around this problem, we have introduced a mandatory "site_id" field which the client has to specify when they want to delete a comment.
-
Like point 1, calling GET comment with only a comment ID could also cause the same problem. Therefore we have also introduced the mandatory "site_id" query parameter field here too.
-
Now that the site_id field is mandatory in both the DELETE and GET comment endpoints, we now return the site_id field as a comment attribute in both the show comment and show comments endpoints.
-
This last change introduces a new optional query parameter on the show all comments endpoint. The client can now specify the site_id as a filter, so that they can list all comments for a specific site.