How to transfer data from one instance to another using HTTPS method

Devina Khare
Kilo Contributor

Hi All,

I want to transfer the data from one instance to another using HTTPS method. Can anyone help me with the step by step process to be followed to accomplish that. Any help would be appriciated.

Thanks

Devina

7 REPLIES 7

P-Rudenko-SN
ServiceNow Employee
ServiceNow Employee

You can use the REST API for this. Check the 'REST API Explorer' on your source instance where you may find the available methods and the script examples.

For instance, you may get the list of incidents from the source instance with following Method: 

GET https://instance.service-now.com/api/now/table/incident?sysparm_limit=1

Then you can use the ServiceNow script sample at your target instance as a scheduled job (check the code samples in the same REST API explorer window):

var request = new sn_ws.RESTMessageV2();
request.setEndpoint('https://instance.service-now.com/api/now/table/incident?sysparm_limit=1');
request.setHttpMethod('GET');

//Eg. UserName="admin", Password="admin" for this code sample.
var user = 'admin';
var password = 'admin';

request.setBasicAuth(user,password);
request.setRequestHeader("Accept","application/json");

var response = request.execute();
gs.log(response.getBody());

 This is a sample script. You will have to update it to parse the JSON response from the webservice and map the data to your target table. Let me know if you need more help here. 

Hi Pavlo,

Actually we wanted to use data source with file retrieval method of HTTPS only.

Can you help me with that?

Thanks

Devina

Hi Devina,

Please refer steps mentioned in the docs here. Let me know if you have any questions.

https://docs.servicenow.com/bundle/orlando-platform-administration/page/administer/import-sets/task/...

 

- Pradeep Sharma

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you will have to use Data Source with Type as HTTPS

Server - instance endpoint - possibly having the table data

There is not much documentation around this

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader