The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Incident status is not getting update with PATCH request.

Mehvish.Ahmed
November 4, 2022

Hi, 

I am trying to update an incident status from "Investigating" to "Resolved" with a PATCH request. Basically, I created a lambda function with a patch request triggered by SNS topic. 

code:

http = urllib3.PoolManager()
encoded_args = urlencode({
"incident_update": {
"status": "resolved",
"body": "issue is Resolved now",
"deliver_notifications": "true"
}

})
API_ENDPOINT = "https://api.statuspage.io/v1/pages/%7BXXXXX%7D/incidents/%XXXXX%7D/incident_updates/%XXXXXX%7D"+ encoded_args
API_KEY = "XXXXXXXX"
HEADERS = {'Authorization': API_KEY}
response = http.request('PATCH', url = API_ENDPOINT, headers=HEADERS)
import json
json.loads(response.data.decode('utf-8'))
{'status': 'success', 'data': [], 'message': 'Successfully! Record has been updated.'}
data = json.loads(response.data)
print(data)

 

Output: {'error': 'The requested resource could not be found.'}

 

Please help me, what is missing and where am I wrong?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Mehvish.Ahmed
November 4, 2022

Seems like api is working but not able to find the incident id or incident update id, 

TAGS
AUG Leaders

Atlassian Community Events