Is it possible to update the Stage of a RITM via REST api
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2020 05:06 AM
I'm wondering if it is possible to modify the stage of a RITM via REST API?
Labels:
- Labels:
-
Workflow
13 REPLIES 13

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2020 05:20 AM
Yes, you can. you will need to know RITM number or sys_id of it.
Example:
var gr = new GlideRecord("sc_req_item");
gr.addQuery("sys_id", request.sys_id);
gr.query();
if (gr.next()) {
gr.stage = 'Completed';
gr.update();
}

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2020 05:28 AM
Hi,
Yes you can use the PUT method.
PUT https://YOURINSTANCE.service-now.com/api/now/table/sc_req_item/RECORDSYSID.
{"stage":"delivery"}
Please Mark as ✅ Correct if this solves your issue and also mark ???? Helpful if it helps resolve your problem.
Thanks,
Saji
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2020 05:41 AM
I tried the Put and sent the following json:
{
"stage": "Ready for testing",
"short_description": "Captiva Request 999"
}
The short description updated in the string that was returned, but the stage stayed in "Work in progress"

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2020 05:46 AM
Check the choice list for the stage field and put in the Value instead of Label
Thanks,
Saji