insert multiple records using table api

nishanthdeva
Kilo Explorer

Is there a way to insert multiple records by sending a huge json object with an array of records through external script using table APIs ??

4 REPLIES 4

nishanthdeva
Kilo Explorer

Sample payload I'm trying to send -



{


  'records': [{


  'field1': 'val1',


  'field2': 'val2'


  },


  {


  'field1': 'val3',


  'field2': 'val4'


  },


  {


  'field1': 'val5',


  'field2': 'val6'


  }]


}



I want this to create three records in a table.


sachin_namjoshi
Kilo Patron
Kilo Patron

Hi,



Below post should provide you resolution



Can we send multiple records to Service Now within a single REST request?



Regards,


Sachin


ralvarez
Tera Guru

Hi,

 

If you prefer not to use the Import Sets, you can try the ServiceNow Batch API, which works with the Table API to insert multiple records.

 

The Batch API reduces client-server overhead but isn’t suitable for parallel processing. Long requests may exceed the max transaction time and fail.

 

Best,

Roberto