Table API VS Scripted API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2020 09:45 PM
Hi,
If i have table API to provide web services then what is the use of having scripted REST API?
Thankyou in advance!!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2020 09:52 PM
Hi Anusha,
The Table API allows you to perform create, read, update, and delete (CRUD) operations on existing tables WHEREAS Scripted REST API are much flexible for ex: You can define service endpoints, query parameters, and headers for a scripted REST API, as well as scripts to manage the request and response. Scripted REST APIs generally follow the REST architecture, but you can customize them to use different conventions
https://developer.servicenow.com/dev.do#!/reference/api/orlando/rest/c_TableAPI
- Pradeep Sharma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2020 11:06 PM
Hello Anusha. Let me know if I have answered your question. If so, please mark appropriate response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2020 09:55 PM
Hi,
through scripted API you can control the input/output.
- If you are sharing table API and service account then you are giving the control to other party to access all records from table and manage the table record with get/put/post operations.
- If you are creating scripted API with define set of input/output then you can process the input as filter parameter and return the output in control manner [ means you can manage the number of output parameter with filter condition].
Thanks,
Ashish
Please mark correct and helpful for others if it helps you.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2020 09:56 PM
Hey Ansuha,
Rest API: To become familiar with ServiceNow REST APIs, review this scenario which assumes that you are an integration consultant who wants to see how easily you can integrate with the Incident [incident] table using the REST Table API. The REST Table API is active by default in all instances, starting with the Eureka release.
The tasks you will perform are:
-View available resources.
-Query existing incident records.
-Create a new incident record.
-Retrieve the record you created.
-Update the record.
-Delete the record.
Scripted Rest API: The Scripted REST APIs feature allows application developers to build web service APIs.You can define service endpoints, query parameters, and headers for a scripted web service API, as well as scripts to manage the request and response.Scripted REST APIs generally follow the REST architecture, but may be customized to use different conventions.The following podcast offers additional information on the use of Scripted REST APIs.
Some things to consider:
- Table API requires creation of user roles and ACL's to manage access of consumers while a Scripted REST API would run as a script and therefore bypass ACL's unless specifically coded with the SecureGlideRecord API.
- Scripted API would require code development and maintenance while Table API generally is a no-code solution.
- Scripted API allows complex coding solutions with a single request. For complex requests with multiple queries or expensive joins, the Scripted API would allow administrators to be more prescriptive and efficient in controlling the performance impact of web service consumers. What is to stop a Table API consumer from grabbing the entire contents of a table every 2 seconds?
- Scripted API allows data to be synthesized and formatted on the fly. Table API requires that the desired data already exists in the required format before being queried.
Also refer:
Mark Correct and Helpful if it helps!!!
Best Regards,
Namrata.