Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to update multiple records using rest api url ?

sowmya24
Kilo Explorer

is it possible to update multiple records using end point url from code?
is sys_id is mandatory?
is there any other way to update the records ?

1 REPLY 1

Tony Chatfield1
Kilo Patron

If your rest message contains multiple records then you will need to iterate through each record,
You can do this utilizing a scripted rest api (and import sets)

 Tony Vecchgio has provided a very helpful guide
https://www.youtube.com/watch?v=DyIuma1cZrg
https://community.servicenow.com/community?id=community_article&sys_id=d5c94462dbf557002328f3231f961...

You need a unique identifier for the record, and for tasks this could be the task number or sys_id,
for other record types this may be a single field match or a combination of fields, as long as the result is always 1 to 1 match.

SOAP would also allow multiple record updates, but I believe that scripted REST is the recommended solution.