
James T
Has anyone had any luck in getting their statuspage.io integration to update a corresponding compnent status. I keep trying but keep getting a 403 error when using the component_id object as defined in the statuspage.io api documenation.
0
Comments
Please sign in to leave a comment.
Hi James,
I just tested and was able to update a component successfully. Can you post your HTTP request here (and make sure you mask things like your page ID, auth key, etc)?
Thanks,
Tom
Hi Tom,
I used the example integration on the xMatters site, however I am having trouble mapping the component update into the create and update calls. Can you please advise how you configured the api.
Thanks
James
Hey James,
When you say "the xMatters site", are you referring to the github.com repo for statuspage? There is a section for getting the API token here: https://github.com/xmatters/xm-labs-statuspage#get-statuspage-token
There is also sample code for create and update in the OutboundResponseScript.js file:
Does that help? If you can post the code you have or are trying to get to work and any error messages that would be helpful.
Happy Monday!
Hi Guys
I have managed to get the example on GitHub working :). However, how would I go about updating a component status as part of the create/update incident process? I'm struggling to get my head around the documentation on the statuspage.io site.
Hi James,
I'm able to update my component by performing an HTTP PATCH to
https://api.statuspage.io/v1/pages/<PAGE ID>/components/<COMPONENT ID>.json?api_key=<API KEY>
(replacing <PAGE ID>, <COMPONENT ID> and <API KEY> with your values) and with the following body JSON body:
{
"component": {
"status":"operational"
}
}
Thanks,
Tom
Thanks Tom,
I'll give it a go and report back.
Regards
James