REST API - Asynchronous Inbound flow to return sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 10:02 AM
We are using REST API - Asynchronous trigger (post) and created an Inbound flow.
The requirement is after the payload from a 3rd party application is inserted to SN table, we need to do the following :
{
"sysId": "SN SysId"
}Error response
{
"error": "description of error"
}PUT:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 09:39 AM
Hi @Jugmaz,
With the scripted Rest API in ServiceNow, we can do whathever you've explained above, but I am asking, how we can send back the custom response with the REST API - Asynchronous Inbound flow?
Hope I am clear with my query!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 11:12 PM
Yes, understood.
And answer is that you need to setup the answer/response.
In a scripted web service - you need to define the Response, right!? Do that within the script of any given scripted WS, eg. between the:
Please see any OOB equivalent for more info!
Please, trial and error helps as well as postman eg.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 12:58 AM
Hi @Jugmaz ,
Yes I know, we can return back the custom response through scripted web service, but I want to know, how we can do the same with REST API - Asynchronous Inbound flow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 01:02 AM
I would imagine that there is similar possibility, in a same action that you handle the inbound.
BUT, i dont have experience on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 01:07 AM
Yes, I am also looking for that. Thanks for the help.