How to cancel a change from the REST API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2020 04:31 PM
Everytime I try to move the state of a New change to -4 (Cancelled) I get a 400 BAD REQUEST back, but no more information as to what information is needed in the request
How can I cancel a change via the REST API?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2020 04:45 PM
Hi,
You can use PATCH method to cancel the change request.
End point
https://<instance_name>.com/api/now/table/change_request/<sys_id_of_CR>
Payload
{"state":"4"} // 4 = Cancel
Please mark this accepted/helpful, if applicable.
Thanks & Regards,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2020 04:52 PM
Thanks Sharjeel.
This works - but why is this against the table API and not the change request API?
I am endlessly confused as to why there is two endpoints for interacting with records.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2020 05:07 PM
Glad it worked!
I believe Change request API gives the ability to control in depth process of change management e.g.
- Updating any field that exists in the change task table and work tasks from creation through closure/cancellation.
- Retrieve a specific change request, standard template, or change request task.
- Retrieve multiple change requests, standard templates, or change request tasks using pagination.
- Generate and process any related approval activity associated with a change request.
- Identify potential scheduling conflicts and identify periods where conflicts do not exist.
I hope this helps.
Please mark this accepted/helpful, if applicable.
Thanks & Regards,
Sharjeel
Muhammad