2

I am having the change management number CH****12. I want to get the records for this change management number in ServiceNow API.

For example, I had incident number and got the records with incident number INC*****12 through accessing https://instance.service-now.com/incident.do?SOAP service url and appropriate credentials(username and password) with getRecords.

Similarly, I want to get records for the given change management number.

Earth
  • 3,477
  • 6
  • 37
  • 78

3 Answers3

2

Consider using the ServiceNow REST Table API for this type of request. Using the REST table API the URL for a specific Change Request would be: https://{instance_name}.service-now.com/api/now/table/change_request/{sys_id}

Where sys_id is the id of the Change Request you want to retrieve.

For Example: https://{instance_name}.service-now.com/api/now/table/change_request/a9e9c33dc61122760072455df62663d2.

If you are using ServiceNow Fuji Release you can use the REST API Explorer to help you build and test these requests.

Hope that helps.

Bryan
  • 551
  • 4
  • 9
1

I found the change management service url and used it.

https://instance.service-now.com/change_request.do?SOAP

It contains getRecords function and it gives the corresponding record after providing the change management number as input.

Earth
  • 3,477
  • 6
  • 37
  • 78
-1
https://instance.service-now.com/change_request.do?JSONv2=&sysparm_action=getRecords&sysparm_query=number=CHG000001

The above query should work. Change instance.service-now.com to your service now DNS name.

user229044
  • 232,980
  • 40
  • 330
  • 338
GRR
  • 11
  • 1