API to query sc_req_item, sc_task

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 06:00 AM
Hi Team ,
We have a request to create API to query sc_req_item and sc_task table based on following fields,
should I use OOB API or scripted rest messages(if the response body needs to be changed)?
any update on this would be much appreciated.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 07:39 AM
For me the question to use the table api is mainly based on the source doing the querying. if it is an internal reporting team, then I might go table api. is it however an external source like a partner organisation then I would go with custom scripted api.
in short, depending on the bigger picture one would be prefered over an other.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 08:05 AM
Feddy,
Recommendation - Dont go OOB API and not advisable. You should select as Scripted API and many benefits inside. You customize response what business and you required.
Question - Is the external going to get the data from service now or You sending the data to external ? If you are sending you can restrict the data with simple business rule itself.
Note: No other external should not allow to access the target tables like sc_req_item, sc_task tables.
Please mark as helpful/correct answer if it helped.
Regards,
Suresh.
Suresh.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2022 12:23 AM
yes , we are going to send the data to external. The ask is we need to give them API details and they should be able to query ritm,sc_task table based all the mentioned fields and catalog variables. Is it possible use table API or service catalog API for this requirement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2022 12:31 AM
Hello,
For just your requirement you can surely use the Table API, but if you are going to give the API to an external org then I would not recommend it as table API filter is applied on the API link itself so if the other org want they can even access other fields of the form by changing the filter.
Go ahead with Scripted rest API as it would only allow them to get the field details which you want. It gives you more control and security over the API.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2022 03:52 AM
I do agree with Saurav. You send the data external then use the scripted rest api. The more control and security are the exact reasons why.
Please mark answer correct/helpful based on Impact