Standard Change Risk Assessment via REST API

Maria3
Kilo Contributor

I'm trying to complete the risk assessment bit for a standard change via the REST API. Creating the change is no problem, and I can GET the change. But when I do a PATCH /sn_chg_rest/change/standard/{sys_id}/risk as described at https://developer.servicenow.com/app.do#!/rest_api_doc?v=madrid&id=changemgmt-PATCH-std-chng-risk, I get "Requested URI does not represent any resource: /sn_chg_rest/change/standard/32061b0cdb86ff00bb0cd12c5e9619e3/risk". Why does the documentation say that I can PATCH to that URI if the resource doesn't actually exist? Is there some other way to complete the risk assessment so I can move this change along in the workflow? What am I missing?

5 REPLIES 5

sachin_namjoshi
Kilo Patron
Kilo Patron

You can use PUT function for REST API on change_risk_asmt table.

Use below REST API on your instance to update records on change_risk_asmt table.

 

find_real_file.png

 

https://<<<YOUR_INSTANCE_NAME>>>.service-now.com/api/now/table/change_risk_asmt/sys_id


Regards,
Sachin

Maria3
Kilo Contributor

So is it an error that the documentation suggests a route exists for this, beyond just the table route?

How do I know the sys_id of the risk assessment for a change? I thought it might just be the sys_id of the change itself, but that failed - "Requested URI does not represent any resource: /sn_chg_rest/now/table/change_risk_asmt/32061b0cdb86ff00bb0cd12c5e9619e3"

I am not sure about documentation.

But, you can get sys_id of change risk in change_risk_asmt table.

 

change_risk_asmt.LIST

 

Regards,

Sachin

Nope, I tried to get a few entries on that table to see what they look like and that doesn't work either. "Requested URI does not represent any resource: /sn_chg_rest/now/table/change_risk_asmt/"