Categories
Unable to Update the Incident update using Rest API
Hello Team - I am unable to update the status of an incident.
Running below curl command -
curl --location --request PATCH 'http(s)://cloud-provisioning.custhelp.com/services/rest/connect/v1.4/incidents/{id}/' \
--header 'Authorization: Basic ************=' \
--header 'OSvC-CREST-Application-Context: This is a valid request for account.' \
--header 'Content-Type: application/json' \
--data-raw '{
"StatusWithType" :{
"statusType": {"Name": "Unresolved"}
}
}'
But getting 400 error - Invalid property specified: Incident.StatusWithType
Answers
-
There are a couple of issues with your Body. Where you have "StatusWithType", it should be "statusWithType" (the capitalization of the key names is critical).
Also, where you have "statusType", it should be "status" (you cannot set the Status Type directly - the Status drives the Status Type).
Then, where you have "Name", it should be "lookupName".
Try the below Body instead:
{"statusWithType": {"status": {"lookupName": "Unresolved"} } }
0