Updating a component using API

choi September 29, 2021

Hello

I want to update components on the StatusPage using webhook from another service.
But I can't update the components.

I set it up like this

----------

・URL
https://api.statuspage.io/v1/pages/{page_id}/components/{component_id}?api_key={api_key}

・Payload
{
  "component": {
    "status": "{status name}"
  }
}

----------

Do you have any idea what's wrong?
It is possible to change the status of a related component using the Incident Creation API.
so There is nothing wrong with {component_id} and {api_key}

Appreciate any assistance

1 answer

1 accepted

0 votes
Answer accepted
Dave Parrish _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 29, 2021

Hey @choi! For that endpoint, make sure you're using the PATCH method (not POST). Does that do the trick?

choi September 30, 2021

Hi @Dave Parrish _Atlassian_ 

thank you for reply.
in case using Curl, Specify PATCH using the (-X) option.

But in case using payload,
Both PATCH Update a component and PUT Update a component have the same sample content type.

How can I make user I'm using the PATCH method?

Thanks!

choi October 4, 2021

I found that only POST is possible where I'm using webhook

Like David Hawkesworth likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events