Not able to update component status when incident is created via postman.
Asked by Prasanth dasari:

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.


Answers:
author: Alan Violada
body: 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\*\*\*\**** *s*uccessfully, but not seeing it in the affected components selected for the incident.

comments: author: Prasanth dasari
body: 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](https://community.atlassian.com/t5/image/serverpage/image-id/222236iF017FA75483C12D1/image-dimensions/503x371?v=v2 "StatusPagePNG.PNG")


author: Alan Violada
body: 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


author: Prasanth dasari
body: 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


author: Alan Violada
body: 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!


author: Prasanth dasari
body: Hi Alan,

Yes it is working now.

Thanks,

Prasanth


Tags: cloud

component