You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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?
Seems like api is working but not able to find the incident id or incident update id,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.