Unable to Post Comments to Jira Service Management (JSM) Alerts via API POST Request

Michel Galeno Leles Santana
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 3, 2025

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?

1 answer

0 votes
David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2025

Hello @Michel Galeno Leles Santana 

"However, this returned a 404 Not Found error, indicating that the API endpoint is not correct for posting a comment to the alert."

That is the expected behaviour. If you review the Alerts section of the JSM Ops REST API documentation, you'll see there is no such 'comments' endpoint.

It's not clear what documentation you've been reading that infers otherwise.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events