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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Not able to update Component status using python



I am trying to update the status of a component using python and i am not able to get it to work. I am getting the following error


Helper python code


import requests
import json

class StatusPageHelper:
def __init__(self, url):
self.url = url
self.url_prefix = "https://" + url + "/v1/pages/"
self.session = requests.Session()

def updateStatusDashboard(self, token, page_id, component_id, status):
self.token = token
self.component_id = str(component_id)
self.page_id = str(page_id)
self.status = str(status)
print(self.url_prefix + page_id + "/components/" + self.component_id)
headers = {'Content-type': 'application/json', 'Authorization': 'OAuth ' + self.token} = json.dumps({"component[status]": "partial_outage"})
response = self.session.put(self.url_prefix + page_id + "/components/" + self.component_id,, verify=False, timeout=30)
if response.status_code == 200:
print("{0}: Update success".format(self.url))
print("{0}: Update failed: {1}".format(self.url, response.text))


Error: Update failed: {"error":"component is missing"}


Can someone help me to get the code to work or point me to the right direction as this is not helping. I printed the full url and it seems to be correct

2 answers

1 accepted

0 votes
Answer accepted

I figured out my mistake and got it to work. 

so how did you get it to work?

Also when i tried the same with Curl the command worked. So its kind of surprising that Python is not working

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events