- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 11:11 PM
Hi All,
I have a REST message of type GET (Location data )
Next Step is to create a Scheduled job to parse this REST message in a Import set table and later transform it to the Location table.
Any idea on the script to call the GET method JSON via a scheduled job or any other way to do it.
Thank you,
Regards,
Ranjit
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2022 07:11 PM
Hi Akshay,
I finally used the Flow Designer and the REST API action which was simple and straight forward as I didn't need scripting to generate the Object and parse it via the Flow
Appreciate your help
Thank you,
Regards,
Manji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 11:20 PM
Hello @manji5
Could you please try below code snippet
var request, response, status;
request = new sn_ws.RESTMessageV2();
request.setEndpoint('https://xyz.com');
request.setHttpMethod('GET');
request.setRequestHeader("Accept","application/json");
request.setRequestHeader('Content-Type','application/json');
response = request.execute();
gs.info('Response body' + response.getBody());
var JSONData = new global.JSON().decode(response.getBody());
gs.info('Country Code: '+ JSONData.countryCode + ' Country Name: '+JSONData.countryName);
return JSONData.countryCode + ' , ' + JSONData.countryName;
Please Mark ✅ Correct & 👍 Helpful, if applicable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2022 07:11 PM
Hi Akshay,
I finally used the Flow Designer and the REST API action which was simple and straight forward as I didn't need scripting to generate the Object and parse it via the Flow
Appreciate your help
Thank you,
Regards,
Manji