Close a change request using rest API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 08:07 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 08:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 08:24 AM
Hi @AnveshKumar M ,
Thanks for responding.
No errors/warnings are there in Logs.
Regards,
Jaydeep Yadav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 12:32 AM
What is the type of change you are trying to close?
I tried this using the same PATCH, it worked perfectly.
End Point: PATCH https://dev95429.service-now.com/api/sn_chg_rest/change/{sys_id}
Body: {"close_code":"successful","close_notes":"test notes","state":"3"}
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 01:15 AM
Hi @AnveshKumar M ,
We are trying to close standard change,
Also, We have made state field as read only, hence rest api is not able to change the states.
Regards,
Jaydeep Yadav