Rest API Status is not changed from Acknowledge to Trigger

Hi all,

I am aware that the RestAPI rules for status changes are only Resolved or Acknowledged but I need to find a way to change the status to triggered from an event API

This is what I’ve tried so far with the suggestion from another PagerDuty team member that suggested the following:

“However, I did some testing and found a workaround here. It appears that you can update from “acknowledged” to “triggered” status if something else changes as well. For example, if you set or update the incident priority in addition to updating the status to “triggered”, you should see both changes take effect.”

Link

@alerts_router.post("/api/1.0/post/incidents/P4{incident_id}", status_code=status.HTTP_202_ACCEPTED)
async def triggered_status( user:str, incident_id: str, token=Depends(auth) ):
pd_api_session = APISession(pd_key)
ack_payload =
{
“incident”: {
“type”: “incident_reference”,
“status”: “acknowledged”,
“priority”: {
“status”: “triggered”,
“id”: “P1K581”,
“type”: “priority”,
},

I only can change the priority but not the Status with this method. Could you please share a workaround that has worked?

Thanks,
Gabriel

@derrick.crash

This could depend on what you are trying to solve for in moving an acknowledged incident to a triggered state. You can accomplish this trivially by using the Update an Incident endpoint (manage incidents for bulk) and assigning the escalation_level to 1.

PUT /incidents/{id}

{
    "incident": {
        "type": "incident",
        "escalation_level": 1
    }
}

Keep in mind though this is going to retrigger your on-call’s notification paths and can quickly become an anti-pattern to the process.

Thanks, this is exactly what I needed, the use case is if someone from the team accidentally acks an alert. I found that this can also be accomplished if you change incidents from low priority to high priority using the following, the reverse won’t work (high to low)

api/1.0/put/incidents/escalate/{id}

{
    "incident": {
        "type": "incident",
        "urgency": "high",

}