StatusPage.io Component Updates

Not Yet Reviewed

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

6 comments
Date Votes

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

    0
  • 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

    0
  • 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:

    // Create
    var statusPageData = StatusPage.createStatusPageIncident( callback.eventProperties.number, "A new issue has been detected.");

    // Update
    StatusPage.updateStatusPageIncident( callback.eventProperties.number, "update", callback.annotation );

    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!

    0
  • 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.

     
    Have you had any luck?
    0
  • 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

    0
  • Thanks Tom,

    I'll give it a go and report back.

    Regards

    James

    0

Didn't find what you were looking for?

New post