Commit 24942ab
authored
Sync Data Between Two ServiceNow Instances via REST API (#1381)
* Create SyncData.js
The script leverages the ServiceNow REST API to retrieve records from a specified table on the source instance, then transmits them to the target instance for insertion.
As an example, it is set up to sync active user records, but it can be easily modified for any other table and filter criteria.
Usage:
The script is configured with the following parameters:
table: Specifies the name of the table to sync (Example is sys_user).
query: A GlideRecord query string to filter the records to be synchronized
targetInstance: The ServiceNow instance to which data will be sent.
user and password: Credentials for authenticating with the target instance.
* Create readme.md
The script leverages the ServiceNow REST API to retrieve records from a specified table on the source instance, then transmits them to the target instance for insertion.
As an example, it is set up to sync active user records, but it can be easily modified for any other table and filter criteria.
Usage:
The script is configured with the following parameters:
table: Specifies the name of the table to sync (Example is sys_user).
query: A GlideRecord query string to filter the records to be synchronized
targetInstance: The ServiceNow instance to which data will be sent.
user and password: Credentials for authenticating with the target instance.1 parent 9ad7cb4 commit 24942ab
File tree
2 files changed
+51
-0
lines changed- Fix scripts/Sync Data Between Instances
2 files changed
+51
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments