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

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
4,556,813
Community Members
 
Community Events
184
Community Groups

Unable to create component in the API

I thought I was following the API documentation correctly but I am unable to create a component via the statuspage.io API.  

Here is the payload I am sending via POST  https://api.statuspage.io/v1/pages/<mypageID>/components

{'component': {'name': 'placeholder', 'showcase': False, 'only_show_if_degraded': False, 'description': 'placeholder', 'status': 'operational'}}

I get back:

{'error': 'component is missing'}

What am I doing wrong here?

1 answer

1 accepted

0 votes
Answer accepted
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 09, 2020

Hi @Patrick Rutledge ,

welcome to the community!

I think the main problem is you are using single quotes - The JSON standard requires double quotes.

Try to change it like this:

{
"component": {
"name": "placeholder",
"showcase": false,
"only_show_if_degraded": false,
"description": "placeholder",
"status": "operational"
}
}

Thank you so much for your response.  Ok actually I think its something wrong with python.  I will try some different things.

Ok you lead me down the correct path I fixed it like this (in python):

 

response = requests.post(spioURL + url, headers=head, data=json.dumps(payload))

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events