write a script to create a record in scripted rest api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 02:25 AM
Hi All,
I need to write a script to create a record on existing table in SN.
Can anyone please suggest the format to write a script?
Thanks..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 04:05 AM
Have you looked at using the Table API, or Import Set API? Are you restricted based on the inbound payload format?
More details would be needed to provide a suitable solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 03:38 AM
Hi @Kieran Anson ,
I am new to implement integration request. Looking for solution which will not impact prod.
Below is the requirement:
Users in the Splunk team have a table in ServiceNow that shows Splunk indexes (existing custom table) and their ownership.
This table is static and has to be manually updated when splunk team create new indexes.
they would like it to be dynamically updated from Splunk, most feasible solution is via REST API.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 04:16 AM
The import set API can do this. https://developer.servicenow.com/dev.do#!/reference/api/xanadu/rest/c_ImportSetAPI#import-POST
You'd need to create the import set table and relevant transform map to map the inbound data to the target table. The Splunk team can then send a payload to the import set API as documented in the above.
Some additional details https://www.servicenow.com/community/developer-articles/import-set-api-goodbye-srapis/ta-p/2318624