Jamhson
Jamhson

Reputation: 13

Retrieving Change Information with Affected Configuration Items (CIs) using ServiceNow API

I am seeking assistance on how to retrieve information about a change, including the affected Configuration Items (CIs), using the ServiceNow API.

I have already attempted the following API request.

https://company.service-now.com/api/now/table/cmdb_rel_ci?sysparm_query=parent.sys_class_name%3Dchan...

Could anyone please help on how to successfully retrieve the desired change information, along with the affected CIs, using the ServiceNow API?

Thank you in advance for your assistance.

I have already attempted the following API request.

https://company.service-now.com/api/now/table/cmdb_rel_ci?sysparm_query=parent.sys_class_name%3Dchange_request%5Eparent.numberINCHG8568541

It should have returned some json result back.

Upvotes: 0

Views: 610

Answers (1)

BradB
BradB

Reputation: 21

Use the ServiceNow REST API Explorer... Wonderful tool built-in to ServiceNow that will allow you to specify the API query you wish to make and it'll give you the exact API envelope/endpoint for you query-- even provides sample code for the main languages you'd likely be using.

Ref: https://developer.servicenow.com/dev.do#!/learn/learning-plans/utah/servicenow_application_developer/app_store_learnv2_rest_utah_introduction_to_the_rest_api_explorer

Upvotes: 0

Related Questions