Is there a REST API to update multiple rows in a table as a batch?

Surya Kiran
Tera Contributor

Hi There - 

I noticed that there is a BATCH API (https://developer.servicenow.com/dev.do#!/reference/api/paris/rest/batch-api) to send multiple requests to ServiceNow as a batch. The example shows support for batching multiple GET and POST requests. However, it fails when we batch PUT requests to update specific fields for a table. We tested this in Paris and Quebec releases.

Is there any way to batch multiple PUT requests?

Please help provide link to appropriate documentation. Thanks in advance for your time. Have a good day!!

Best,

Surya.

7 REPLIES 7

Maik Skoddow
Tera Patron
Tera Patron

Hi @Surya Kiran 

why don't you build a simple Scripted REST API which you would pass four parameters

1) table name
2) encoded query string
3) field name
4) new value

That way you have the full control over behavior and the result.

Kind regards
Maik

If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

Hello, Surya and Maik. 

 

I'm new to ServiceNow Integration. Have you made this work? Can you share the script you used in the Scripted REST API to update the multiple rows via API? 

 

Thank you in advance.

 

Best regards,

Catherine

Surya Kiran
Tera Contributor

Thank you @Maik Skoddow for the answer. In essence, now I understand there is nothing provided by the platform. App developers or Integration developers have to build their own Scripted REST APIs for performing a batch PUT operation.

 

Thanks again!!

Hi @Surya Kiran 

Thank you for marking my response as helpful.

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

If not, please tell me what you are still missing!

Many thanks & kind regards
Maik