Using REST API how to retrieve all the affected_ci or ci_item from a change request

gany_sn
Kilo Contributor

i tried this API GET method but getting error as below

url: https://test.service-now.com/api/sn_chg_rest/change/standard/b64842d2dbeb64508074215fd3961934

 

output:

<response>
<error>
<detail>ReferenceError: "ChangeRequestStateHandler" is not defined. (sys_script_include.cb22cf935303130096c3ddeeff7b12a1.script; line 26)</detail>
<message>"ChangeRequestStateHandler" is not defined.</message>
</error>
<status>failure</status>
</response>
1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi, 

You can get that from this endpoint: 

GET https://instanceName.service-now.com/api/now/table/task_ci?sysparm_query=task%3D0126961347c12200e0ef563dbb9a717e

At the end of the endpoint is the sys_id of the change record that you want to get the "affected ci's" of. 

Thanks
Mike

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

Hi, 

You can get that from this endpoint: 

GET https://instanceName.service-now.com/api/now/table/task_ci?sysparm_query=task%3D0126961347c12200e0ef563dbb9a717e

At the end of the endpoint is the sys_id of the change record that you want to get the "affected ci's" of. 

Thanks
Mike

gany_sn
Kilo Contributor
Thanks Mike thats working