Quebec Tour Part 3:Import Set REST API – Insert Multiple

In Quebec release, ServiceNow introduce new capability to enable users to insert multiple records into a staging table and trigger a transformation that is based on predefined transform maps in a single API request. In this post i am going to use the Insert Multiple REST API end point.

POST https://INSTANCENAME.service-now.com/api/now/import/{stagingTableName}/insertMultiple

First thing, I am going to structure my JSON, I use company.do?JSONv2 to help me structure my JSON

{"records":[
{"name":"Company1","customer":"false","country":"USA","status":"active"},

{"name":"Company2","customer":"false","country":"USA","status":"active"}

]}

I copy my JSON to a note pad and save my the file as JSON, after that i attach it to my data source. that’s basically would help me to accelerate building my transform map.

Key attributes to be set in my data source are

  • Path for each row = Path expression
  • format= JSON

now, I am going to use REST API Explorer to insert multiple records into my staging table in a single REST POST call.

RET API Explorer

I can see response status code 201 and 2 records have been created in core_compay table.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s