vamperayani
(Venkata Siva Sai Umakarthik Amperayani)
1
Hello,
I am working on a webservice connector configuration - Need suggestion on how to use the JSON response attribute value of Aggregation 1 as “Context URL” for Aggregation 2.
Ex: “nextRecordsUrl” attribute will be returned in JSON response after aggregation 1. Need to substitute the attribute value of “nextRecordsUrl” as contextURL for aggregation 2.
I have tried defining the value "$response.nextRecordsUrl$ directly in context URL field of aggregation 2, but that doesn’t work.
The response from the Aggregation. URL is always same or different?
vamperayani
(Venkata Siva Sai Umakarthik Amperayani)
4
The response from the initial aggregation - Aggregation 1 (I think you are referring to “nextRecordsUrl” attribute with Context URL) is different every time. However, You can hardcode the value received for “nextRecordsURL” in aggregation Operation 2. But, While running the aggregation, It won’t pick any new users that have been created after you have fetched and hardcoded the context URL.
We need to enter the Context URL specific to our operation. Then connector appends the context URL to the source’s Base URL.
Only attribute response from account aggregation-1 can be mapped to account aggregation-2 based on my understanding.
-Vasanth
vamperayani
(Venkata Siva Sai Umakarthik Amperayani)
6
Hi Vasanth,
“nextRecordsUrl” is one of the attribute in Aggregation 1 response. I want this response value to be substituted as Context URL in Aggregation 2 dynamically. Will this be possible?
Something like this. Now you want to use this variable in the next Aggregation2 api call.
So for this Aggregation2 API call would be crafted something like this: “$response.nextRecordUrl$” In case this needs to be added to some endpoint so the call will look like: “/api/$response.nextRecordUrl$”.
NOTE: This will first run the Aggregation 1 api call and then form there it will goto the Aggregation 2 api call and pull the rest of the information for this particular user which was aggregated by the Aggregation 1 api call.
P.S if your usecase is something like.
“Users are aggregated using Aggregation 1 api call and then next set of users who needs to be aggregated the API call for those will be present in nextRecordUrl, then rather than setting up the Aggregation2 api endpoint you will have to setup the pagination for Aggregation 1 api call.”
You can follow the @neeraj99 steps, and make sure that you have to add schema response path in the 1st Aggregation Operation for the next user value to read it for 2nd Aggregation Operation as a response.
Thanks,
Siva.K
vamperayani
(Venkata Siva Sai Umakarthik Amperayani)
9
Thanks Neeraj. Tried the steps you have advised - Still I am not getting the expected results. Do you have any link to documentation supporting this particular use case?
If you don’t mind sharing the steps that you do to perform the agg. via Postman maybe we can help. Or if you could share the api document link here, i could have a look and see what could be done.
vamperayani
(Venkata Siva Sai Umakarthik Amperayani)
11