Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to provide an incident update message using the API?

Johnson Earls October 17, 2024

The API documentation for the Incident API PATCH operation (labeled as "Update An Incident") does not list any way to provide an update message when updating an incident:  the only related field is `body`, which is described as "The initial message, created as the first incident update. There is a maximum limit of 25000 characters."  I don't want to replace the initial message; I want to provide an update message.

1 answer

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2024

The body is not replacing the initial message in the incident, the body in the update incident will set the first incident update message, and then if you need to add more updated you will use Incident Updates to do that. 

Johnson Earls October 17, 2024

it appears that the "Incident Updates" APIs are to _modify a previous Incident Update_, not to add updates to an incident.

My question might have been ambiguous (I'll edit it to be less so):  I am referring to using PATCH against an incident itself, within the Incidents API; I am not talking about the "Incident Updates" API.

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2024

So there are two ways to create the initial update of an incident, either via Patch or Put. But the payload is the same for both. And if you look at the description of the body that is for the initial incident update. This is the important part:

The initial message, created as the first incident update.

After you have created the initial update you will use the Incident Updates (PATCH) to add new updates.

Johnson Earls October 18, 2024

My point is, then, that the API documentation is incorrect.  (a)  The initial update is created when you create the incident (using POST).  (b)  I am looking at the PATCH API documentation and it has the verbage I put in the description, which you repeated, which is apparently not correct if that's the same field you use to provide an update message for each subsequent update.

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 18, 2024

Okay, so you can set the initial update in two (or three if you count PATCH and PUT) via the API. You can do it either via Create an incident, or via the Update incident. The body is not a required field so you just have to pick which option you like better. Then when you add a new update you will use Incident Updates.

Johnson Earls October 18, 2024

Can you please explain what you mean by "use Incident Updates"?

 

The API calls listed under the "Incident Updates" section of the API documentation explicitly say they are to Update a previous incident update -- not to add an update to an incident -- and they require the ID of an already-existing incident update to modify.

Suggest an answer

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

Atlassian Community Events