What is the use of this table 'Rest Insert Multiples' [sys_rest_insert_multiple] ?

Suggy
Giga Sage

What is the use of this table 'Rest Insert Multiples' [sys_rest_insert_multiple] ?

When to use it and how to use it?

Suggy_0-1735061250746.png

 

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!!!

1 ACCEPTED SOLUTION

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

View solution in original post

8 REPLIES 8

Juhi Poddar
Kilo Patron

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

@Juhi Poddar 

 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

Suggy
Giga Sage

Anyone

Anand Kumar P
Giga Patron
Giga Patron

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_nameUser Name, emailEmail).

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.

 

https://www.servicenow.com/docs/bundle/xanadu-api-reference/page/integrate/inbound-rest/concept/c_Im...

If my response helped, please mark it as the accepted solution and give a thumbs up👍.
Thanks,
Anand