How to get the status from scripted rest api
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2023 01:04 AM
third part tool is using Scripted rest api for creating the record in servicenow. Please let me know how to get the HTTP status
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2023 07:23 AM
Hello @Santhosh23 ,
In Scripted REST APIs we can set the Status code of the response to be send to the third party by using response.setStatus(code); ex. response.setStatus(200) but we cannot get any status code as it is an incoming request.
Please mark this comment as helpful/correct if it helps you.
Regards,
Shubham