- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2024 09:27 AM - edited 12-24-2024 09:50 AM
What is the use of this table 'Rest Insert Multiples' [sys_rest_insert_multiple] ?
When to use it and how to use it?
PS - I did come across below 2 posts, I did not understand its complete usage. So if you are aware of this table and its usage, please share the details.
Import Set API - Goodbye SRAPIs? - ServiceNow Community
insertMultiple Import set API - ServiceNow Community
Thanks in advance!!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2024 10:46 PM
sys_rest_insert_multiple table is primarily used when you require synchronous processing and immediate feedback for JSON data imports. If such immediate feedback is not necessary, you can proceed with the default asynchronous processing without utilizing this table.
If my response helped, please mark it as the accepted solution ✅ and give a thumbs up👍.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2024 09:43 AM
Hello @Suggy
This can be useful to you: Insert Multiple Import set API
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers locate the solution more easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2024 09:51 AM
I did come across below 2 posts, I did not understand its complete usage. So if you are aware of this table and its usage, please share the details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2024 08:03 PM
Anyone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2024 08:31 PM
Hi @Suggy ,
The Rest Insert Multiples table (sys_rest_insert_multiple) in ServiceNow is used to customize the behavior of the Import Set API when importing multiple records. It helps to process data more efficiently by allowing configurations like enabling synchronous data transformation and customizing column mappings for bulk data imports.
Scenario:
You want to import 500 new employee records into the User Table (sys_user) using a JSON API request, and you need immediate feedback on the result (e.g., number of records imported, errors, etc.).
Steps to configure:
1. Create a Record in the Rest Insert Multiples Table:
—Navigate to Rest Insert Multiples (sys_rest_insert_multiple).
—Select your Import Set table (e.g., imp_user_data).
—Enable Synchronous Transformation.
—Define Column Mappings (e.g., user_name → User Name, email → Email).
2. Make the API Call:
Use the insertMultiple API to send the bulk data:
POST https://your-instance.service-now.com/api/now/import/endpoint
Content-Type: application/json
{
"records": [
{ "user_name": "test user", "email": "test.user@example.com" },
}
3. Check the Results:
Retrieve the results from the Transform History Table (sys_import_set_run) to see how many records were inserted, updated, or had errors.
Why Use It?
— Simplifies bulk data imports.
—Provides immediate feedback when set to synchronous mode.
— Allows mapping flexibility for JSON data fields.
If my response helped, please mark it as the accepted solution ✅ and give a thumbs up👍.
Thanks,
Anand