Close a change request using rest API

Jaydeep Yadav
Tera Contributor

Hi Everyone,

 

How to Close a change request using rest API.

Tried PATCH request to  https://XXXXdev.service-now.com/api/sn_chg_rest/change/{sys_id}

and providing close code, close note and state,

close code and notes are updating but the state is not changing to close state.

 

Please help.

 

Regards,

Jaydeep Yadav

7 REPLIES 7

@Jaydeep Yadav making fields read only might not effect, I just tried one in My PDI.

 

Is there any Data Policy on this table, which might be preventing it.

 

OR

 

Have you tried using Standard Change PATCH end point?

 

PATCH https://dev95429.service-now.com/api/sn_chg_rest/change/standard/{sys_id}

 

Thanks,
Anvesh

Hi @AnveshKumar M ,

 

We are using PATCH request to the provided API endpoint.

No data policy on this table is preventing it.

 

Regards,

Jaydeep Yadav

Vishal Birajdar
Giga Sage

Hi @Jaydeep Yadav 

 

Can you check backend value choices of state field you are passing is correct..?

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates