โ04-30-2018 07:20 AM
I have a requirement for a pipeline that is supposed to accept an incoming JSON body/payload of attributes in place of sending parameters via the task URL for security related reasons.
For the sake of simplicity, we are trying to accept something in a similar format as seen here:
{
โIDโ: 15,
โfirstNameโ: โJonโ,
โlastNameโ: โSmithโ
}
So far we have tried to โacceptโ incoming data through a Mapper snap with no success. We have tested the pipeline by executing the task URL, and passing the JSON body data in tandem. Weโve tried formatting a Mapper snap in the following way at the beginning of our pipeline:
Is there a way of doing this correctly with the default, OOTB snaps? We do not currently utilize any extra snap packs. Thank you for the help in advance.
Solved! Go to Solution.
โ04-30-2018 08:07 AM
The beginning snap should be a JSON Parser that would feed into your Mapper snap.
โ04-30-2018 08:07 AM
The beginning snap should be a JSON Parser that would feed into your Mapper snap.
โ04-30-2018 09:24 AM
Hi del, thanks for the response.
To clarify, I shouldnโt need to place anything else before the JSON Parser snap correct? Everything thatโs being fed to the pipeline via the JSON body/payload will be read by the Parser and then passed to my Mapper?
โ04-30-2018 09:40 AM
That is correct. Two things to note:
โ04-30-2018 10:06 AM
Excellent, both very helpful tips.
I was able to test this method, and can confirm it works great. Thanks again for the quick help!