I'm trying to post a comment to a specific "alert" in Jira Service Management (JSM) via a POST request, but I'm encountering an issue where the comment is being posted to the Jira issue instead of the alert. Here are the details:
Alert URL: The alert in Jira Ops has a URL pattern like: https://domain.atlassian.net/jira/ops/teams//alerts/
For example, an alert URL might look like: https://domain.atlassian.net/jira/ops/teams/team_id/alerts/0c7e5f2e-0dcd-414f-be58-108739ee522a-1738619579064
The alert ID seems to be a long unique identifier (UUID), which is part of the URL.
POST Request Attempt: I attempted to post a comment to the alert using the following API endpoint:
POST https://domain.atlassian.net/rest/ops/3/alert/0c7e5f2e-0dcd-414f-be58-108739ee522a/comment
However, this returned a 404 Not Found error, indicating that the API endpoint is not correct for posting a comment to the alert.
Jira Issue URL vs Alert URL: When clicking on the alert in the Jira Ops interface, the URL pattern is similar to the one above. However, when I post a comment using the Jira issue API:
POST https://domain.atlassian.net/rest/api/3/issue/OA-29218/comment
The comment appears on the Jira issue, not on the JSM alert.
Expected Behavior: The comment should be posted to the alert in Jira Service Management (JSM) instead of being added to the associated Jira issue.
Request for Help: I need assistance in figuring out the correct API endpoint and method for posting a comment directly to the alert in JSM, not the Jira issue. How can I achieve this via a POST request to the Jira Ops alert?