Rest Record vs Scripted Rest? please all pros and cons for both

Mallikharjuna
Tera Contributor

Rest Record vs Scripted Rest? please all pros and cons for both

5 REPLIES 5

Brad Tilton
ServiceNow Employee
ServiceNow Employee

The Table API allows you to perform CRUD operations against a single record in a ServiceNow table. A scripted REST API is something you would write when you need to do something more complex than take an action against a specific record or record set in one call. The con is that you have to write and maintain it yourself using scripting, but the pro is that it is a lot more customizable.

Sumanth16
Kilo Patron

Hi,

I worked on scripted REST API to integrate ServiceNow with ServiceNow to bring millions of attachments.

Requirement:

We have two instances ServiceNow A (fuji version) to ServiceNow B (Jakarta version).

We have legacy attachments in the fuji version of ServiceNow instance. In the new instance, all the attachments were corrupted while migrating the fuji version of ServiceNow to the Jakarta version of ServiceNow.As per my requirement, I need to delete existing attachments in the Jakarta version of ServiceNow and need to bring all the attachments from the fuji instance and attach those attachments in the related records in the Jakarta version of ServiceNow. In this scenario, I have used scripted REST API to delete existing attachments and bring attachments from the fuji version of other instances. I have limited the records for 30000 attachments per daily to avoid performance issues.

 

Please refer below link:

https://community.servicenow.com/community?id=community_question&sys_id=49d3f4aedb6fdb44fff8a345ca96...

 Please mark it as helpful if it helps.

Thanks,

Sumanth

Prithviraj Howa
Kilo Expert

Hello Mallikharjuna,

Rest Message is used for sending outbound updates to an external system from Service Now. If a third party application supports REST then you can send data from Service Now using the rest message.

 

Create a REST message

 

Scripted REST API on the other hand enables inbound updates from an external system. If an external system needs to send data to Service Now and if you need to process custom changes(validations etc) which are not supported by OOB REST API's then you can write a scripted REST web service to process inbound requests from external systems. 


Scripted REST APIs

Please mark reply as Helpful/Correct, if applicable. Thanks!

Warm Regards,

Prithviraj Howal

SNOW Developer

Can not we take inbound data from third party other way than scripted REST?