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.”
@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