Hi, I'm trying out Statuspage features and I have created an incident using the management API calls.
Below is the JSON body I have passed in the request :
{
"incident": {
"name": "Back Office Management Outage",
"status": "investigating",
"impact_override": "none",
"scheduled_for": "2013-10-21T03:00:00.007Z",
"scheduled_until": "2013-10-21T06:00:00.007Z",
"scheduled_remind_prior": true,
"auto_transition_to_maintenance_state": true,
"auto_transition_to_operational_state": true,
"scheduled_auto_in_progress": true,
"scheduled_auto_completed": true,
"auto_transition_deliver_notifications_at_start": true,
"auto_transition_deliver_notifications_at_end": true,
"metadata": {},
"deliver_notifications": true,
"backfill_date": "string",
"backfilled": true,
"body": "string",
"components": {
"k67ffm0s****": "operational"
},
"component_ids": [
"w443bbvn****"
],
"scheduled_auto_transition": true
}
}
Is there any additional information that needs to be modified in the request body? Please let me know.
Hey there Prasanth, Alan from the Statuspage support team here, happy to assist. I would just like to clarify, are you getting any errors from your API call, or are you just not seeing the components properly updated?
One thing to note in your request, is that the component ID that is having its status changed:
"components": {
"k67ffm0s****": "operational"
}
Does not match the component ID that is being passed as the component affected by the incident:
"component_ids": [
"w443bbvn****"
]
So you could be changing the component status of component ID k67ffm0s**** successfully, but not seeing it in the affected components selected for the incident.
Hi Alan,
Thanks for your reply. Yes, I am able to create an incident but not able to update the component. I have given the same component ID which you have suggested and facing error show in image.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the update, Prasanth! Can you please try changing the "status" parameter to not be in caps-lock, so "investigating"?
Let me know if that does it, please.
Regards,
Alan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alan,
No, it did not work! This is the error I am seeing now when modified to "investigating" :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Prasanth, the issue is now the parameter being passed for the component status here:
"components": {
"k67ffm0s****": "Partial outage"
},
These are the accepted parameters for component status:
"operational" "under_maintenance" "degraded_performance" "partial_outage" "major_outage"
So in this case, if you set it to "partial_outage" I believe it should fix the error. More details on these parameters, and the API endpoints can be found here:
https://developer.statuspage.io/#operation/patchPagesPageIdComponentsComponentId
Let me know if this works!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.