The CreatorCon Call for Content is officially open! Get started here.

Not able to resolve incident using restapi

rajesh_solanki
Kilo Explorer

Hi ,

I m trying to resolve an incident using restapi. This is what I have done.

1) via rest api I have populated every field it needs for resolving an incident. (in my pay load I m not settings State : 6 . I have another request for resolving incident)

2) At this moment I can go in SNOW url , open my incident and if I click resolve button , incident goes in resolved state.

3) if I do step 1 again and then submit another rest api pay load which ONLY has {"state":6} it should move incident in Resolved state right ? even though I get error 200 in my response , I still do not see ticket in resolved state

4) why the State field is not updating when using RestAPI ?

what am I missing ?

23 REPLIES 23

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Rajesh,



Can you please check if there is any data policy or business rule defined which is aborting the transaction.


Give me 5 minutes I will check and let you know.


chirag_bagdai
ServiceNow Employee
ServiceNow Employee

Hi Rajesh,



Are you using "Rest API Explorer" during this test ? Can you please share the screenshot of request payload and response ?


REST API explorer


Chirag



right now I m using postman.



I m getting detail about my incident with GET method.



Then with PUT method I m submitting this in payload



{"state":6,"urgency":3,"assigned_to": "Rajesh Solanki", "close_code":"Solved", "caller_id":"e2ebef694fb1b200571150ee0310c70e", "u_close_subcode":"Permanent","close_notes":"Auto Closed by postman","work_notes":"Alert resolved by postman"}