Resolve an Incident with API fails to add the resolution

When resolving an incident from the API I can successfully resolve the iincident using a PUT to the /incidents/{id} endpoint, however a Note is not added with the resolution supplied. Anyone else done this before?

{
“incident”: {
“type”: “incident”,
“status”: “resolved”,
“resolution”: “im resolved!”
}
}

Hi Gavin,

If you review response samples, there is a note that Currently the only valid values are nil and merged with plans to introduce additional reasons in the future. I hope that helps.

Cheers

Hi Chiedu

I see the note on resolve_reason

The reason the incident was resolved. Currently the only valid values are nil and merged with plans to introduce additional reasons in the future.

but whats the relationship between the resolution field in the request schema:

The resolution for this incident if status is set to resolved.

How would I add a note when I resolve through the API to get an indication on the reason for resolving?

Thanks

Hell Gavin,

There is currently work being done around that field. The way add a note to the Incident following a resolution is to make a second call using the endpoint https://api-reference.pagerduty.com/#!/Incidents/post_incidents_id_notes. This could be after or before the Incident is resolved.

Cheers,