Update the variables on RITM(TASK) using REST api patch/put call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 05:13 AM
Hello, I am trying to update the variables on in_progress RITM(TASK) using REST api patch/put method to sc_item_option table with sys_id of variable. I tried the same on sc_req_item table as well by passing variables its name and value which return code 200, but values are not getting updated. I am able to update the fields on service now UI when logged in through service account as interactive user so as per our SNOW development team we should be able to update the fields through api call as well. I do not have scripted REST API access so I preferred REST api option
I am getting the RITM mapped sc_item_option using sc_item_option_mtom table and withing sc_item_option we have item_option_value which have the attributes w.r.t variable
API endpoint:
https://<SNOW_instance>.service-now.com/api/now/table/sc_item_option/<sys_id_variable>
method: put/patch
Body: Json
{
"value": "Updated_value"
}
credentials: tried basic auth as well as token
while updating on sc_req_item I used:
API endpoint:
https://<SNOW_instance>.service-now.com/api/now/table/sc_req_item /<sys_id_RITM>
method: put/patch
Body: Json
{
"variables.justification": "Updated_value"
}
credentials: tried basic auth as well as token