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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Incident status is not getting update with PATCH request.

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

1 accepted

1 vote
Answer accepted

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

Suggest an answer

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

Atlassian Community Events