Invoke server side script using REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 12:14 AM
Hi,
Do we have a REST API interface to invoke the server side scripts (not scripted apis) eg., sys_script_include, so to invoke these from outside SN. The logic would execute on server side only, but the invocation happens from outside using REST api and by passing the input values as needed by the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 12:20 AM
I believe, for your case, the best practice is to create a scripted REST API in ServiceNow, mention your script in it, and trigger the scripted REST API from the external source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 12:37 AM - edited 11-28-2023 12:39 AM
As I mentioned I do not want to create api wrappers. Is there any direct OOB SN REST API way for this? If not, and if api wrapper is the only way, then is there a way to create just one general wrapper that is capable of invoking any server side script? How will the input parameters be taken care of in this scenario?