- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2020 11:06 AM
Hi,
Urgent Help
We have a scripted rest API post method which gets a request from another API, based on the request we get we have to do some validation (I used a script include by calling it from scripted rest api & tried to update some fields in a table.) but it's not working. it's not working when i tried to do the same thing by declaring the variables it's working fine.
Scripted Rest API :
POST method
Script Include
Logs
Table
I was wondering why the values are not being set on the table even the script is written correct. to check if the script works at all .... created a sampletest_pvk function . The same thing works i.e. values are set (from test_pvk function) .Could anyone help on this please
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2020 04:32 PM
same question has been asked on below thread.
answer has been mentioned on this thread.
Kindly mark the answer as correct and close this thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2020 11:53 AM
Hello,
In your screpted REST API in line 3 replace
request.body.dataString
with
request.body.data
In your script include you are considering this parameter as JSON objeect not as string so from scripted REST API we need to pass object as well.
Regards,
Sateesh Kumar Devadoss
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2020 01:10 PM
I have tried that as well but not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2020 01:07 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2020 04:32 PM
same question has been asked on below thread.
answer has been mentioned on this thread.
Kindly mark the answer as correct and close this thread.