โ10-14-2020 06:05 AM
Hi,
Iโm still relatively new to snaplogic but iโm really enjoying the learning process on it as I work through my assigned task. Iโve been able to build out a pipeline that:
What i need to do afterwards is where things go off. Iโve done pipelines that post to an endpoint succesfully but what i want to do is take the values from the returned data in the GET snap, along with some values passed along the way on the previous mapper snap and combine those into a new JSON body that will post in the right schema.
Iโve googled and searched on how to actually add a schema so that itโll show up properly in the post body but i canโt find anything that lines up with my need. Maybe iโm thinking of it in the wrong way.
ANY suggestions on design choices would be appreciated.
Thanks,
Mark
โ10-14-2020 06:31 AM
What Iโve done is to add the json schema for the rest post in a JSON formatter snap, mapped my input directly to that schema, and then removed the formatter snap in place of the rest post snap.
Here is where you can add the schema:
โ10-15-2020 07:31 AM
Thanks for the reply @acesario . Yeah, i was trying to play around with the formatter snap, I was having a bit of a hard timing understanding how iโd map directly to it. Also, i seemed to then be forced to use a snap that had a triangular input rather than the REST POST which used the circular. But what i eventually ended up doing was actually adding in the nested format in the mapper without the formatter added to it and the output body looked exactly how I needed it to.
iโll need to try it with a larger file filled with more records but as of now it looks like thisโll work.
Lots of learning going on.
โ10-14-2020 07:44 AM
Hi @masantiago- How you need those value to pass? Is that from Header attribute or from Query Param?
Seems you need create message payload and pass to API endpoint, such scenario use Rest Post snap, you should get response from endpoint.
โ10-15-2020 07:33 AM
Hi @Supratim ,
i needed the values to post as nested objects in a json body as part of a specific schema. so far it looks like iโve been able to format it how i want using the mapper snap.