Table API vs scripted REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2018 01:16 PM
When to use table based API and scripted REST API? Pros and cons for both?
- Labels:
-
Integrations
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2018 02:23 PM
For me, I use the table apis for simple actions (create read update delete) on a given table. I leverage scripted api's when I'm creating a more complex action. Scripted API's are much flexible and whether you are leveraging pre built ones, or building your own (in a scoped app maybe), scripted API's are for exposing much more flexible and often more complex functions.
For instance a scripted api may perform actions against different tables, whereas a table based api allows you access to a single table (though there may be business rules etc triggered by the action)
eg Table API on user table to insert a user
Scripted api for create new user, insert user, adds it to a group, sets the manager, sends an email etc
If you let me know what you are trying to accomplish, then I'm happy to help however I can
Cheers
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2018 02:49 PM
Hi Jon,
I need to create a Webservice API where input is: Sys ID of any record and output is: all *related* active records to that sys id. The relationships between the tables is maintained in Relationships under system definition.
Could you please guide me how to implement this?
Input: Sys ID of the record
Output: All *RELATED* active records from *VARIOUS* tables (in the following JSON format):
{
"result": [
{
"Sys ID": "5520267",
"CI Name": "Record 1",
"Table Name": "u_table_a"
},
{
"Sys ID": "5520367",
"CI Name": "Record 2",
"Table Name": "u_table_a"
},
{
"Sys ID": "8331210",
"CI Name": "Record 1",
"Table Name": "u_table_b"
},
{
"Sys ID": "8321210",
"CI Name": "Record 2",
"Table Name": "u_table_b"
},
{
"Sys ID": "3042006",
"CI Name": "Record 3",
"Table Name": "u_table_b"
},
{
"sys_id": "4509847",
"CI Name": "Record 1",
"Table Name": ""u_table_c"
}
{
"sys_id": "4509247",
"CI Name": "Record 2",
"Table Name": ""u_table_c"
}
]
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2019 07:16 AM
As you have mentioned in the below thread.
"
eg Table API on user table to insert a user
do we can only insert the user by using table API, why cannot we user POST method in table API to create a user in the user table, Is it not possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2019 07:17 AM
As you have mentioned in the below thread.
"
eg Table API on user table to insert a user
do we can only insert the user by using table API, why cannot we user POST method in table API to create a user in the user table, Is it not possible?