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

{"error":"incident is missing"} when using PATCH or PUT to update an incident

Norman Khine June 19, 2020

Hello,

When I try to submit a PATCH or PUT request to update an incident, I get:

{"error":"incident is missing"} 

Here is my request:

 

curl --location --request PATCH 'https://api.statuspage.io/v1/pages/xxxx/incidents/lf7****nf2?api_key=xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"incident": "Requests Failed (500)",
"status": "identified"
}'

 

I have also tried with Authorization: Oauth <api-key> approach

I am able to create an incident and am also able to list them, so I am unsure what is going on.

 

I am following https://developer.statuspage.io/#operation/putPagesPageIdIncidentsIncidentId and https://developer.statuspage.io/#operation/patchPagesPageIdIncidentsIncidentId

 

What am I missing?

 

Any advice is much appreciated

 

2 answers

1 accepted

0 votes
Answer accepted
Norman Khine June 19, 2020

i need to use https://doers.statuspage.io/api/v1/ methods

0 votes
Zach
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 19, 2020

Hey Norman 

 

Yeah, you're going to need to wrap everything in an incident container. So your call would need to look similar to the example shown on doers.statuspage.io - 

 

curl https://api.statuspage.io/v1/pages/{page_id}/incidents.json \
-H "Authorization: OAuth **************" \
-X PATCH \
-d "incident[name]=Requests Failed (500)" \
-d "incident[status]=identified" \
-d "incident[body]=Sample update" \
-d "incident[component_ids][]=yxrqcr0kc3hx" \

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events