Rest json response find correlation id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 01:51 AM
Im creating incident to third party using POST REST. Then doing GET method to get number/sysid of that incident so I can set it as correlation id in my instance.
Using GET I'm getting response -
Transactions[
..
.
body{
Incident 1 In encrypted base 64
}
body{
Incident 2 In encrypted base 64
}
So on
How can I iterate through this response array and then decode it to set correlation id?
Please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 04:22 AM
I cannot define jsonString cause it is dynamic data and will change in each GET call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 04:10 AM
Sorry, not working, i would not be able to define response strong cause it may contain multiple records.. so i think i need to decrypt body using base64 decide function and then iterate through it to match my incident number using gliderecord to incident table.
If i get to some help on it, it will be grateful, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 04:54 AM
I just shared an example. you can always enhance it as per your case.
We are not really sure what exactly you are writing.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader