Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Not able to update component status when incident is created via postman.

Prasanth dasari October 21, 2022

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. 

1 answer

0 votes
Alan Violada
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2022

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.

Prasanth dasari October 24, 2022

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. StatusPagePNG.PNG

Alan Violada
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2022

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

Prasanth dasari October 24, 2022

Hi Alan,

No, it did not work! This is the error I am seeing now when modified to "investigating" :

 "error": "cannot update component to invalid status"
Thanks,
Prasanth
Alan Violada
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2022

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!

Like Prasanth dasari likes this
Prasanth dasari October 24, 2022

Hi Alan, 

Yes it is working now.

Thanks,

Prasanth

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events