Getting Change Management records with Service Now API
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.
Solution 1:
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.
Solution 2:
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.